Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill area under curve #9

Closed
olavolav opened this issue May 1, 2021 · 1 comment
Closed

Fill area under curve #9

olavolav opened this issue May 1, 2021 · 1 comment
Labels
feedback wanted Looking for input from users low prio Low priority

Comments

@olavolav
Copy link
Owner

olavolav commented May 1, 2021

This was on the roadmap but have not heard anyone actually request it. So I'll leave the prototypical hack here as an issue in case anyone wants to actually have it.

So in theory we could have an option like y_fill_level that enables filling the are between the points and a given vertical level, usually the zero line.

It might look something like:

plot(ys, title="Sine wave", y_fill_level=-2.5)
                          Sine wave
┌────────────────────────────────────────────────────────────┐
│                                                    ▟█▙     │ 
│                                                   ▗███▌    │ 
│                                       ▗██▖        ▟████    │ 
│                                       ▟███       ▗█████▌   │ 2
│                           ▟█▙        ▗████▌      ▐██████   │ 
│                          ▐███▖       ▟█████      ███████▌  │ 
│              ▗██▖        █████      ▗██████▌    ▐████████  │ 
│              ███▙       ▗█████▖     ▐██████▙    ▟████████▌ │ 
│  ▟█▖        ▐████▖      ▟█████▙     ████████▖  ▗██████████▄│ 1
│ ▐███▖       █████▙      ███████▖   ▗████████▙  ▟███████████│ 
│ ████▙      ▗██████▖    ▐███████▙   ▟█████████▙▟████████████│ 
│▐█████▖     ▐██████▌    █████████▖ ▗████████████████████████│ 
│▟█████▌     ████████   ▗██████████▄█████████████████████████│ 
│███████────▐████████▙──▟████████████████████████████████████│ 0
│███████▌   ██████████▙▟█████████████████████████████████████│ 
│████████  ▐█████████████████████████████████████████████████│ 
│████████▙▄██████████████████████████████████████████████████│ 
└────────────────────────────────────────────────────────────┘
         100       200       300       400       500       600

And then with colors it might look like:
Screen Shot 2021-05-01 at 18 18 25

Let me know if this feature would be useful.

@olavolav olavolav added low prio Low priority feedback wanted Looking for input from users labels May 1, 2021
@olavolav
Copy link
Owner Author

Seems not critical right now, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback wanted Looking for input from users low prio Low priority
Projects
None yet
Development

No branches or pull requests

1 participant