Open Schnark opened 7 years ago
The library itself is meant to plot the points given, and it would not be appropriate to have this library making decisions about which points to include or not. I can see two possible solutions: 1) Add a layer that does the analysis you are talking about. Pro - you get the desired behavior, con, the library renders by interpolation, so removing points arbitrarily could change the shape of the plot. 2) Add a control to define the plot region, both in x and y. I'll consider the latter as a feature request linked to the pan/zoom option.
Currently, the plotting area is set to include all given points. This is a bit problematic when there are points with extreme coordinates, e.g. when you want to plot the function 1/x. It would be nice if the library would detect such points (some methods are listed in https://en.wikipedia.org/wiki/Outlier#Detection) and ignore them when determining the plotting area and when plotting points/lines.