[Matplotlib-users] (no subject)

garyr garyr at fidalgo.net
Mon Aug 10 11:59:59 CEST 2015

I have a PyQt4 program that has matplotlib imbedded. I followed the example code
in embedding_in_qt4.py and the plotting works very well but I have a couple of 

I would like to display some text in the plot area. I can do that but the text 
is overwritten by subsequent plots. Is there a way to clear the text between 
plots? I would also like to display a grid. Is that possible?

Below is an outline of my plotting code.

from embedding_in_qt4  import MyMplCanvas

    self.mplEmbed = MyMplCanvas()

    def test(self):
        t = arange(0.0, 3.0, 0.01)
        s = sin(2*pi*t)
        ax = self.mplEmbed.axes
        fig = self.mplEmbed.fig
        fig.text(0.13, 0.85, "Now is the time", fontsize=10)
        fig.suptitle("The quick brown fox")
        ax.plot(t, s)

More information about the Matplotlib-users mailing list