I have a scrollable/zoomable CorePlot based line graph with 2 y-axis plots. Sometimes one of the plots can be very noisy and make it hard to see the other plot. There is a very large amount of data (high sample count). I'd like to apply a dynamic smoothing/averaging to clean up the noise that is based on the current scroll/zoom position. So a completely zoomed out view would be heavily smoothed, while a very zoomed in view would have effectively little or no smoothing.
How can I accomplish this with CorePlot? I don't know if CorePlot has something like this built in. Since it anyway has to average the samples to draw the data (for example if 100 of my samples fit into the distance of 1 pixel on screen), it would seem like they have something builtin, but I cannot find it. If not, should I listen to scroll/zoom changed, and reload all data with a new datasource sample count size reflecting the number of pixels and do my own averaging down to 1 sample per pixel?
Core Plot doesn't have a way to drop extra data points when they're too close together, so you'll have to do that in the datasource and reload whenever there's a significant change. The scatter plot does have an
interpolationsetting. One of the choices iscurved(with several algorithmic options), but this only smoothes the line through the given data points without averaging values or dropping outliers.