bytebrew / slope

C/Gtk+ data visualization library.
GNU Lesser General Public License v3.0
102 stars 16 forks source link

Changed plotting function #13

Closed crazyBaboon closed 7 years ago

crazyBaboon commented 7 years ago

I changed the plotting function from "slope_xyseries_set_data(SLOPE_XYSERIES(series), x, y, n);" to "series = slope_xyseries_new_filled("Sine", x, y, n, "b-");" because the later causes the Y-axis values to be fixed, which is what you would expect in most animations.

elvismt commented 7 years ago

The fixed axis seems nicer but please note the following: 1 - calling slope_xyseries_new_filled() actually creates a new object each frame in the animation and we are not freeing, so that's a ~memory leak~. and 2 - The amplitude of the wave is changing so the fixed axis would no reflect the real values. There are of course ways to get this to be more beautiful and acurate, but that is too much code, since the demos are suposed to be simple. I am sorry I will not merge this. In the future when new methods for customization will be in place we can change this.

elvismt commented 7 years ago

You gave me a good ides here @crazyBaboon. I am sorry for not having merged your PR. the memory leak is really a problem. But I have improved that example and now the axis is fixed.