[Matplotlib-users] problem in showing the plot!!!

2010-09-10 Thread sa6113

when I want to show the plot canvas, it doesn't stay at all, note that I need
to use backendQtagg, I mean when I use pylab there is no problem in
showing the plot canvas, what is the problem? please help me.
I use this simple code:

from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as
FigureCanvas
from matplotlib.figure import Figure

x = numarray.arange(10)
y = numarray.arange(10)
fig = Figure(figsize=(5, 5))

axes = fig.add_subplot(111)
axes.plot(x,y)
canvas   = FigureCanvas(   fig)
xlabel('sahar')
canvas.show()

The plot just winks.
-- 
View this message in context: 
http://old.nabble.com/problem-in-showing-the-plot%21%21%21-tp29675128p29675128.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem in showing the plot!!!

2010-09-10 Thread Benjamin Root
On Fri, Sep 10, 2010 at 4:44 AM, sa6113 s.payan...@gmail.com wrote:


 when I want to show the plot canvas, it doesn't stay at all, note that I
 need
 to use backendQtagg, I mean when I use pylab there is no problem in
 showing the plot canvas, what is the problem? please help me.
 I use this simple code:
 
 from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as
 FigureCanvas
 from matplotlib.figure import Figure

 x = numarray.arange(10)
 y = numarray.arange(10)
 fig = Figure(figsize=(5, 5))

 axes = fig.add_subplot(111)
 axes.plot(x,y)
 canvas   = FigureCanvas(   fig)
 xlabel('sahar')
 canvas.show()
 
 The plot just winks.


This is just a complete guess, but I wonder if you might be having
conflicting backends.  Try adding this to the beginning of your code.

import matplotlib
matplotlib.use('QtAgg')

Also, I wonder if you should be using Qt4Agg?

Ben Root
--
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users