Open Modiug opened 5 years ago
This is an issue with the subplot implementation in the Python-Wrapper. The subplot logic works by not clearing the workstation except for the first subplot. As methods like ylim
cause a redraw of the current (sub)plot, this can lead to the problem you are describing.
The subplot logic needs to be reworked in general, due to other problems as well.
Indeed, I see more issues when trying to use things like hold(), ylabel() and legend(). OK, best to stay away from subplot() for now.
Background: I wanted to use some live plotting of measured signals in a GUI application. Matplotlib is rather slow, therefore GR. I was using the mlab wrapper for convenience. I should better use the GR API directly.
Versions: Runtime: 0.41.0 Python: 1.11.0
The following script illustrates the issue. You will see double drawings in the second subplot.
The example is using the Python wrapper, but I guess this is more an issue of the underlying framework.
Well, by looking at the Python wrapper code I got aware that I could also pass ylim=(...) to the plot command directly. That solves my issue, so no high urgency on this one.
Regards Guido