Closed esternin closed 2 years ago
The workaround is to execute clear\-replot
every time before replot
@vadz: I was hoping it was a wxWidgets bug, but the problem persists under wx v.3.2.1.
Sorry, I don't think there is any specifically wx-related bug here, why do you think so?
Because I was locked into thinking about it as the (sub)window not being painted white, while in fact its was the same stupid typo in the (sub)window coordinate box that showed itself as "erasing the wrong (sub)window".
Fixed by 3b9c58a.
P.S. With that fixed, [Edit: most, though not all] gdk errors stopped showing up! They seemed benign, and I could not decipher that it was writing white background rectangle beyond canvas that was doing it, the error messages were, e.g.:
(extrema:1253): Gtk-CRITICAL **: 21:13:15.458: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
And now they are gone!
replot
is a command that is typically used to rescale the axes, so that all the data fits (the axes are scaled by the firstgraph
command, and all subsequentgraph\overlay
do not rescale the axes, so some data may not fit inside the plot scaled by the firstgraph
command.Because of that,
replot
needs to blank the canvas before replotting. Right now, it re-plots the new, rescaled graph, right on top of the one that is already there, doubling axes etc. Here's a small sample: