Skip to content

Signal and Scatter: GetYDataRange()#1946

Merged
swharden merged 4 commits intoScottPlot:mainfrom
bclehmann:feature/GetYDataRange
Jul 14, 2022
Merged

Signal and Scatter: GetYDataRange()#1946
swharden merged 4 commits intoScottPlot:mainfrom
bclehmann:feature/GetYDataRange

Conversation

@bclehmann
Copy link
Member

Purpose:
Adds GetYDataRange to IHasPointsGenericX. This interface is implemented by ScatterPlots and SignalPlots (and their derivatives). #1942, #1929

(double yMin, double yMax) = scat.GetYDataRange(xStart, xEnd);

I wrote some tests, though they might be a little sparse. I'm not sure how this should be put in the cookbook? I suppose we could just draw a line at the bounds like we did for nth-order statistics and quantiles: https://scottplot.net/cookbook/4.1/category/statistics/#quantiles

@swharden
Copy link
Member

Looks great, thanks @bclehmann! 🚀

should be put in the cookbook?

Behavior like this can be pretty difficult to document effectively in the cookbook (especially as it affects multiple - but not all - plottables). I added XML docs to these functions which I think will make it a little easier to find, but I think tactically mentioning them by name in answers to questions is the most practical way to reference them.

@swharden swharden enabled auto-merge July 14, 2022 02:33
@swharden swharden linked an issue Jul 14, 2022 that may be closed by this pull request
@swharden swharden changed the title GetYDataRange Signal and Scatter: GetYDataRange() Jul 14, 2022
@swharden swharden merged commit c98d984 into ScottPlot:main Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YDataRange for ScatterPlots, SignalPlots

2 participants