|
From: sa6113 <s.p...@gm...> - 2008-02-18 13:07:07
|
How can I show my plot figure in the specific location or part of an application , I am using pylab. -- View this message in context: http://www.nabble.com/Showing-the-plot-in-the-specific-location-tp15545079p15545079.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2008-02-18 13:53:35
|
On Feb 18, 2008 7:07 AM, sa6113 <s.p...@gm...> wrote: > How can I show my plot figure in the specific location or part of an > application , I am using pylab. What kind of application are you writing -- are you using a GUI toolkit like Tkinter? We need more details please. It is not very clear from your question what you want to do, or what the current problem is. If indeed you are writing a GUI applicaiton, you will need to follow the examples/embedding_in_your_gui_toolkit*.py examples in the matplotlib src distribution rather than pylab. JDH |
|
From: sa6113 <s.p...@gm...> - 2008-02-19 04:59:45
|
I am writting an application that evaluate curve fit and draw its plot in a GUI , I want to draw or show the plot on the GUI not on the pop up window, but I don't want to save the figure in first step , user just enter an order for the curve fit and see their plots on the main window (GUI) . How can I use pylab for this purpose , does it return and QImage object for exm. ? sa6113 wrote: > > How can I show my plot figure in the specific location or part of an > application , I am using pylab. > -- View this message in context: http://www.nabble.com/Showing-the-plot-in-the-specific-location-tp15545079p15553192.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Alan G I. <ai...@am...> - 2008-02-19 13:09:40
|
On Mon, 18 Feb 2008, apparently wrote: > I am writting an application that evaluate curve fit and > draw its plot in a GUI , I want to draw or show the plot > on the GUI not on the pop up window, but I don't want to > save the figure in first step , user just enter an order > for the curve fit and see their plots on the main window > (GUI) . How can I use pylab for this purpose , does it > return and QImage object for exm. ? I believe John already told you this: do NOT use pylab. See <URL:http://matplotlib.sourceforge.net/leftwich_tut.txt> and the other resources that have been posted on this list. Cheers, Alan Isaac |
|
From: sa6113 <s.p...@gm...> - 2008-02-19 09:32:27
|
I am writting an application that evaluate curve fit and draw its plot in a GUI , I want to draw or show the plot on the GUI not on the pop up window, but I don't want to save the figure in first step , user just enter an order for the curve fit and see their plots on the main window (GUI) . How can I use pylab for this purpose , does it return and QImage object for exm. ? sa6113 wrote: > > How can I show my plot figure in the specific location or part of an > application , I am using pylab. > -- View this message in context: http://www.nabble.com/Showing-the-plot-in-the-specific-location-tp15545079p15560493.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2008-02-19 13:56:46
|
On Feb 19, 2008 3:32 AM, sa6113 <s.p...@gm...> wrote: > > I am writting an application that evaluate curve fit and draw its plot in a > GUI , I want to draw or show the plot on the GUI not on the pop up window, > but I don't want to save the figure in first step , user just enter an order > for the curve fit and see their plots on the main window (GUI) . > How can I use pylab for this purpose , does it return and QImage object for > exm. ? In addition to the tutorial Alan pointed out to you, take a look at http://matplotlib.sourceforge.net/examples/embedding_in_qt.py http://matplotlib.sourceforge.net/examples/embedding_in_qt4.py and http://matplotlib.sf.net/faq.html#OO JDH |
|
From: sa6113 <s.p...@gm...> - 2008-02-23 05:04:30
|
I could return the output object of the plot as image file , would you please tell me how I have to convert image to QImage in order to use it in my GUI ? sa6113 wrote: > > How can I show my plot figure in the specific location or part of an > application , I am using pylab. > -- View this message in context: http://www.nabble.com/Showing-the-plot-in-the-specific-location-tp15545079p15648399.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: John H. <jd...@gm...> - 2008-02-23 15:49:36
|
On Fri, Feb 22, 2008 at 11:04 PM, sa6113 <s.p...@gm...> wrote: > > I could return the output object of the plot as image file , would you please > tell me how I have to convert image to QImage in order to use it in my GUI ? I could, but this is a very poor way to do it. First, you would not be able to interact with your figure (pan, zoom, etc). 2nd, you would be using qimage to rescale your plot with the embedded window size an this would be far inferior to having matplotlib draw into the requested size. The right way to use this is to follow the example of http://matplotlib.sourceforge.net/examples/embedding_in_qt4.py JDH |
|
From: Darren D. <dar...@co...> - 2008-02-23 17:09:59
|
On Saturday 23 February 2008 10:49:25 am John Hunter wrote: > On Fri, Feb 22, 2008 at 11:04 PM, sa6113 <s.p...@gm...> wrote: > > I could return the output object of the plot as image file , would you > > please tell me how I have to convert image to QImage in order to use it > > in my GUI ? > > I could, but this is a very poor way to do it. First, you would not > be able to interact with your figure (pan, zoom, etc). 2nd, you would > be using qimage to rescale your plot with the embedded window size an > this would be far inferior to having matplotlib draw into the > requested size. The right way to use this is to follow the example of > http://matplotlib.sourceforge.net/examples/embedding_in_qt4.py Yes, please follow the example John pointed out. The qt4agg backend already provides a widget that you can embed in your program, an example is in embedding_in_qt4.py, it does the conversion to a QImage already, you dont need to reimplement it. |