I found something interesting. When I change the code to change the
number of data points between 500 and 501 randomly, it seems that the
graph will rescale properly. Maybe something doesn't trigger the bounds
change unless one of the two things happens:
- The number of data points changes
If the data change, everything should be updated. It's strange that it
might not be the case when only y data change. I need to investigate.
Le jeudi 10 septembre 2009 à 10:27 -0400, David Brigada a écrit :
I found something interesting. When I change the code to change the
number of data
Hello,
I'm using the goffice library to plot some graphs in a custom
application. The first time I plot data on a graph, the bounds of the
graph automatically adjust to fit the data. However, subsequent times,
when I update the series with new data, sometimes it doesn't redo the
bounds of
What's your code? Do you call gog_series_set_dim when you change the
data? or anything else?
Regards,
Jean
Le vendredi 04 septembre 2009 à 12:47 -0400, David Brigada a écrit :
Hello,
I'm using the goffice library to plot some graphs in a custom
application. The first time I plot data on a
Jean,
The relevant part on new data looks something like this (simplified a bit):
void new_data(GogSeries *series, gdouble *x, gdouble *y)
{
GOData *dat;
GError *error;
dat = go_data_vector_val_new(x, 501, NULL);
gog_series_set_dim(series, 0, dat, error);
I'd say that this should work. You might try to use
gog_object_request_update for the series. There is some similar code in
gchemutils (gchemutils.nongnu.org) file libs/gcu/spectrumdoc.cc.
Le vendredi 04 septembre 2009 à 13:06 -0400, David Brigada a écrit :
Jean,
The relevant part on new data