SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S




1
(3)
2
(9)
3
(4)
4
(1)
5
6
(5)
7
(8)
8
(11)
9
(15)
10
(5)
11
(2)
12
13
(7)
14
(4)
15
(13)
16
(6)
17
(1)
18
19
(16)
20
(10)
21
(13)
22
(13)
23
(3)
24
(1)
25
(3)
26
(4)
27
(1)
28
(6)
29
(6)
30
(1)
31

Showing 16 results of 16

From: Stephen R. <snr...@ya...> - 2004年07月19日 21:23:21
There is a backend from wx to maplotlib, along with GTK and TKinter 
also. I'm just recently started using matplotlib and wx. Seems to work 
fine - though not very fast for what we're trying to do (multiple 
graphs on screen, updated at a fixed multi-Hz rate). Having said that, 
matplotilb does a decent job and the feedback and turnaround on its 
mailing list is great. I haven't delved far into wx yet, but for the 
most part its decent with pretty good documentation.
HTH
Stephen
On Jul 19, 2004, at 4:59 PM, Uwe Schmitt wrote:
>>
>> Hi everyone,
>
> Hi Darren,
>
>>
>> Now that I have become an intermediate python programmer, I want to
>> learn how to build some GUIs. I am trying to decide between WX and 
>> GTK,
>> and was hoping to get input from this list specifically.
>>
>
> wxPython wraps wxWidgets which wraps GTK on Unix machines.
>
> From wxwidgets.com:
> "wxWidgets gives you a single, easy-to-use API for writing GUI
> applications
> on multiple platforms. Link with the appropriate library for your 
> platform
> (Windows/Unix/Mac, others coming shortly) and compiler (almost any 
> popular
> C++ compiler),
> and your application will adopt the look and feel appropriate to that
> platform. "
>
> So you get cross platform support for free. I had a look at pyQt which 
> looks
> very promising, but has some limitations if you want to sell pyQT
> applications
> for windows machines.
>
> There is a package called PythonCard (http://pythoncard.sf.net) which 
> is
> a layer above wxPython. PythoCard simpliefies programming simple GUIs,
> but is restricted in its functionality.
>
> wxPython is my workorse for GUI programming for some years now and
> I'm quite happy with it. The mailing list is friendly and helpfull, 
> too.
>
> According to http://matplotlib.sf.net there is a wx backend, but I 
> never
> used it.
>
> Greetings, Uwe.
From: Uwe S. <sc...@nu...> - 2004年07月19日 20:56:32
>
> Hi everyone,
Hi Darren,
>
> Now that I have become an intermediate python programmer, I want to
> learn how to build some GUIs. I am trying to decide between WX and GTK,
> and was hoping to get input from this list specifically.
>
wxPython wraps wxWidgets which wraps GTK on Unix machines.
From wxwidgets.com:
 "wxWidgets gives you a single, easy-to-use API for writing GUI
applications
 on multiple platforms. Link with the appropriate library for your platform
 (Windows/Unix/Mac, others coming shortly) and compiler (almost any popular
C++ compiler),
 and your application will adopt the look and feel appropriate to that
platform. "
So you get cross platform support for free. I had a look at pyQt which looks
very promising, but has some limitations if you want to sell pyQT
applications
for windows machines.
There is a package called PythonCard (http://pythoncard.sf.net) which is
a layer above wxPython. PythoCard simpliefies programming simple GUIs,
but is restricted in its functionality.
wxPython is my workorse for GUI programming for some years now and
I'm quite happy with it. The mailing list is friendly and helpfull, too.
According to http://matplotlib.sf.net there is a wx backend, but I never
used it.
Greetings, Uwe.
>
From: Stephen W. <ste...@cs...> - 2004年07月19日 20:56:17
On Mon, 2004年07月19日 at 10:28, John Hunter wrote:
> As for
> resetting the axes to the original view, redraw would not have done
> that. In the next generation toolbar, I might be able to add a button
> to support that. It already has a forward / back button to navigate
> between previous views.
Er, it does? I don't see them, at least not with either the default
backend on FC1, which I'm guessing is GTK, nor with the TkAgg one.
Incidentally, the on line .matplotlibrc example file still has the
"toolbar" keyword, which is gone, and is missing the "datapath" one.
-- 
Stephen Walton <ste...@cs...>
Dept. of Physics & Astronomy, Cal State Northridge
From: Darren D. <dd...@co...> - 2004年07月19日 18:25:36
Attachments: dd55.vcf
Hi everyone,
Now that I have become an intermediate python programmer, I want to 
learn how to build some GUIs. I am trying to decide between WX and GTK, 
and was hoping to get input from this list specifically.
GTK seems to have the most active support in matplotlib. Is this true? 
The amount of demo code for learning pygtk is not as good as for 
wxPython, for example, I cant figure out how to call a print dialog with 
gtk. Does one exist?
WX seems to have the most broad support in the Python community. WX 
seems easier to work with based on the demo code, but once I graduate 
and make the switch to Linux, it seems a waste to be interfacing GTK 
through wxPython. WX needs another person to help with maintanence, and 
I want to help with Matplotlib when I become experienced enough to be of 
use to the project. But for now, I need to be able to analyze data and 
finish school.
While undecided on a GUI, I am decided on python and matplotlib, so your 
input would be valuable. Right now I don't have enough experience to 
make an intelligent decision.
Thanks in advance,
Darren
-- 
Darren S. Dale
dd...@co...
PGP public key available
From: Curtis C. <cu...@hi...> - 2004年07月19日 18:12:50
Hi,
I have been using the colorbar() method along with pcolor to make image
plots of data. Normally, the colorbar legend is correct. However, when
the range of numbers to plot is less than 1, such as 10^-3 - 2*10^-3, the
colorbar labels just show up as 0.0 on the top and bottom.
Thanks,
Curtis
From: John H. <jdh...@ac...> - 2004年07月19日 17:52:27
>>>>> "Stephen" == Stephen Walton <ste...@cs...> writes:
 Stephen> I have played with version 0.50 a bit before, but I asked
 Stephen> about the "missing" widgets because they're still in the
 Stephen> online tutorial. Plus, I had thought the redraw button
 Stephen> would be a convenient way to reset a plot to its default
 Stephen> after zooming and/or scrolling in one or the other axis.
 Stephen> This last function is one I actually need, but I was
 Stephen> unable to see anywhere in the documentation how it might
 Stephen> be done.
Thanks for letting me know about the tutorial problem. As for
resetting the axes to the original view, redraw would not have done
that. In the next generation toolbar, I might be able to add a button
to support that. It already has a forward / back button to navigate
between previous views. By clicking back enough times, you'll get
back to your original view. Still, if you are deep enough in, a
"reset" button might be nice.
 Stephen> This turned out to be SOE (Stupid Operator Error). I
 Stephen> didn't have the tk-devel and tcl-devel packages
 Stephen> installed. Unfortunately the lack of tk.h and/or tcl.h
 Stephen> causes so many error messages in the compile that the
 Stephen> line complaining about their lack is easy to miss. Not a
 Stephen> matplotlib problem, I hasten to add.
Yep, you have to train yourself to find that first error, the rest are
often meaningless.
JDH
From: John H. <jdh...@ac...> - 2004年07月19日 17:48:24
>>>>> "Arnd" == Arnd Baecker <arn...@we...> writes:
 Arnd> Hi, I am following this mailing list for a while now and
 Arnd> considering to convert to matplotlib at some point. Whether
 Arnd> this is feasable depends on the following two points:
 Arnd> 1) I would like to know if there is an equivalent to the
 Arnd> scipy.xplt.mouse command which (in its simplest form) waits
 Arnd> for a mouse click and returns its coordinates:
 Arnd> Example: #------------------------------------- from
 Arnd> scipy.xplt import * x=arange(0.0,1.0,0.1) plg(x*x,x)
 Arnd> m=mouse(1,-1,"click with the mouse") print "x,y=",m[0],m[1]
 Arnd> #-------------------------------------
 Arnd> John's reply
 Arnd> http://mail.python.org/pipermail/python-list/2004-April/216550.html
 Arnd> shows that it is possible to connect mouse events with
 Arnd> functions. However, that code depends on the back-end and
 Arnd> is not as short as the above one (though more flexible, of
 Arnd> course ;-).
For some time, we've provided basic cross GUI event handling with the
canvas.connect method. Todd Miller had the idea to port the gtk
connect interface to Tk. For example, the demo coords_demo.py runs
unchanged on TkAgg and GTKAgg. This is only a partial implementation,
and in CVS I've extended it a bit more. The new method is called
mpl_connect, and you will be able to do, across GUIs, calls like
def on_move(event):
 # get the x and y coords
 x, y = event.x, event.y
 ...snip...
canvas.mpl_connect('motion_notify_event', on_move)
I plan to provide the motion notify, on click, and key press events,
and provide some extra positional information in the events, namely
canvas coordinate location and axes coordinate location. The backend
will handle things like flipy so the script can ignore it. I'm in the
process of designing a better toolbar and am using this cross-GUI
event handling to minimize the burden of implementing the toolbar in
the various backends.
In order to do something like the 
 m = mouse(1,-1,"click with the mouse") 
 print "x,y=",m[0],m[1]
example, it would be necessary to implement some cross gui blocking
capability, so that the execution of the script is halted until the
block is removed. I don't see this as a major problem, but will
require some input from people with experience on the not-GTK GUIs.
It's probably not be necessary, though, since it's only a few more
keystrokes to do
def on_click(event): print 'x, y =', event.x, event.y
canvas.mpl_connect(''button_press_event', on_click)
This should be ready by the 0.61 release. BTW, as a wx expert,
perhaps you have a code snippet I can use which calls the event
Connect and Disconnect methods directly. I'm currently trying to
figure this out for the wx implementation of mpl_connect and
mpl_disconnect.
 Arnd> 2) For one set of applications I would like to be able to
 Arnd> plot several times 1000 points (or more). Optimally would
 Arnd> be to plot one point after another to get a dynamical
 Arnd> impression. In the application I have in mind there would
 Arnd> be no need to store these points (ie zooming is not
 Arnd> necessary) which normally degrades performance. Presently
 Arnd> for me the solution for this type of things is our
 Arnd> PlottingCanvas for wxPython, see
 Arnd> http://www.physik.tu-dresden.de/~baecker/python/plot.html
 Arnd> and there the StandardMap.py example.
There is a lot of interest in making dynamical plotting more
efficient. Currently, the entire figure is redrawn with each frame
update, which is clearly not ideal for dynamic figures in which only a
portion needs to be redrawn. I'm interested in making some changes to
better support "real time" data acquisition, where the quotes mean
"fast enough to handle most use cases".
My current thought is to support drawing to subsections of the agg
canvas, eg, so that a single axes, line or patch could be updated
without updating the entire figure canvas. To support this, each
object would need to know it's rectangular extent (done), take a
snapshot of the background canvas before drawing (to be done) and know
how to render itself to canvas (done). In addition, agg and the
backends would need to be extended to allow drawing of subregions of
the canvas, which should be fairly easy. By calling the right
combination of store_background, draw and erase, you could get much
faster dynamic plots.
The current implementation (redrawing the entire figure) is pretty
fast on a fast machine, but needs to be faster.
How do you do this in PlottingCanvas? Do simply add objects to the
canvas and redraw the entire canvas if you need to remove an object,
or do you support selective erasing and removal of objects?
JDH
From: Stephen W. <ste...@cs...> - 2004年07月19日 16:41:53
On Mon, 2004年07月19日 at 08:24, John Hunter wrote:
> >>>>> "GStephen" == Stephen Walton <ste...@cs...> writes:
>
> GStephen> I am not seeing the redraw or close widgets on
> GStephen> the plot windows I produce. 
> 
> Your post says you are a new user but the content suggests you've used
> matplotlib before.
I have played with version 0.50 a bit before, but I asked about the
"missing" widgets because they're still in the online tutorial. Plus, I
had thought the redraw button would be a convenient way to reset a plot
to its default after zooming and/or scrolling in one or the other axis. 
This last function is one I actually need, but I was unable to see
anywhere in the documentation how it might be done.
> As for the FC1 [compile] problem,
This turned out to be SOE (Stupid Operator Error). I didn't have the
tk-devel and tcl-devel packages installed. Unfortunately the lack of
tk.h and/or tcl.h causes so many error messages in the compile that the
line complaining about their lack is easy to miss. Not a matplotlib
problem, I hasten to add.
Thanks for the responses.
From: John H. <jdh...@ac...> - 2004年07月19日 15:55:17
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> Can text created with mathtext can be rotated? I am trying
 Darren> to label a y axis like y = ylabel(r'$rm{Temperature}
 Darren> (^\circ C)$') and y.set_rotation() does not respond to
 Darren> 'horizontal' or 'vertical' settings.
Vertical rotation is not supported yet. I adjust the alignment args
so at least the horizontal ylabels are in the right place
 ylabel(r'$\Delta_{i+1}$', fontsize='x-large',
 verticalalignment='center',
 horizontalalignment='right',
 rotation='horizontal'
 )
The good news is that Jim Benson just sent me a patch to support
vertical mathtext in *Agg, which will be included in the next release.
Cheers,
JDH
From: John H. <jdh...@ac...> - 2004年07月19日 15:53:31
>>>>> "Jonathan" == Jonathan Hanson <ha...@ph...> writes:
 > [Fri Jul 16 16:30:30 2004] [error]
 > [Fri Jul 16 16:30:30 2004] [error] from backend_gtkagg import
 > error_msg, draw_if_interactive, show, new_figure_manager
Here is your problem - a web app server should not be using gtkagg
(this is a GUI interface). You should be using Agg (which doesn't
require X11, a DISPLAY var etc).
You can either set backend : Agg to be your default backend in
matplotlib rrc - http://matplotlib.sf.net/.matplotlibrc or do the
following at the top of your script (before importing
matplotlib.matlab)
import matplotlib
matplotlib.use('Agg')
from matplotlib.matlab import .... whatever you usually do
Should work...
JDH
From: John H. <jdh...@ac...> - 2004年07月19日 15:50:23
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
 Darren> Hi Everyone, I'm having trouble saving plot images with
 Darren> the *Agg backends. I've tried TkAgg, GTKAgg, WXAgg, and
 Darren> get the following error message (here for WXAgg):
 Darren> Do not know how to handle extension *.jpg 14:48:54 Debug
 Darren> e:\Projects\wx2.4\src\msw\app.cpp(439):
 Darren> 'UnregisterClass(canvas)' failed with error 0x00000584
 Darren> (class still has open windows)
 Darren> WX and GTK backends work. I'm using the precompiled 0.60.2
 Darren> version of Matplotlib (congratulations on the new
 Darren> release), python 2.3.4, windows XP. I'm calling my program
 Darren> from a DOS prompt to get the error messages, working in
 Darren> non-interactive mode and trying to save the image using
 Darren> the save-button widget.
The agg backend can only save png, ps, eps, and svg. jpeg is
available from backend_wx and backend_gtk. Personally, I've never
encountered a figure for which jpeg was a better output format than
png, which is why I haven't worked to provide a jpeg output to agg,
but it would be a good thing to add, at some point.
Cheers,
JDH
From: John H. <jdh...@ac...> - 2004年07月19日 15:48:28
>>>>> "GStephen" == Stephen Walton <ste...@cs...> writes:
 GStephen> As a new user of matplotlib, I'm surprised I haven't
 GStephen> seen this mentioned, offhand, in the mailing list
 GStephen> archive. I am not seeing the redraw or close widgets on
 GStephen> the plot windows I produce. The platform is Fedora Core
 GStephen> 1, although I built on RHEL3 because matplotlib-0.60-2
 GStephen> won't build on FC1 (some problem with tk-devel,
 GStephen> apparently).
Your post says you are a new user but the content suggests you've used
matplotlib before. In early versions there was both a redraw button
and a close button. The former was there because sometimes the figure
would get into an inconsistent state (after exposes, or resizes for
example) but these problems were fixed and I no longer saw a need for
it. The close button was dropped after Steve Chaplin pointed me to
some user interface design guidelines that argued close buttons should
never be placed on toolbars. So it is by design that these are
missing. Is this a problem for you?
As for the FC1 problem, perhaps Fernando Perez can comment - I
believe he has used matplotlib with FC1. I have no experience here.
JDH
From: Arnd B. <arn...@we...> - 2004年07月19日 07:33:31
Hi,
I am following this mailing list for a while now
and considering to convert to matplotlib at some point.
Whether this is feasable depends on the following two points:
1) I would like to know if there is an equivalent to the
 scipy.xplt.mouse command which (in its simplest form)
 waits for a mouse click and returns its coordinates:
Example:
#-------------------------------------
from scipy.xplt import *
x=arange(0.0,1.0,0.1)
plg(x*x,x)
m=mouse(1,-1,"click with the mouse")
print "x,y=",m[0],m[1]
#-------------------------------------
 John's reply
 http://mail.python.org/pipermail/python-list/2004-April/216550.html
 shows that it is possible to connect mouse events with functions.
 However, that code depends on the back-end and is not as
 short as the above one (though more flexible, of course ;-).
2) For one set of applications I would like to be able to plot
 several times 1000 points (or more).
 Optimally would be to plot one point after another
 to get a dynamical impression.
 In the application I have in mind there would be no
 need to store these points (ie zooming is not necessary)
 which normally degrades performance.
 Presently for me the solution for this type of things
 is our PlottingCanvas for wxPython, see
 http://www.physik.tu-dresden.de/~baecker/python/plot.html
 and there the StandardMap.py example.
 (this is not to advertise this, but just that you
 get an idea of what I have in mind.
 In the code there are couple of tricks to speed things up).
 In the end I would be happy to dump our PlottingCanvas
 in favour of matplotlib!
Best,
Arnd
From: Malte M. <Mal...@cs...> - 2004年07月19日 06:56:15
I have sarge (with a few unstable bits and pieces)
It 'shouldn't' be dependent on "unstable".
You can always see what extra libs it wants and decide then if you wnat 
it or not.
Cheers,
Malte.
Arnd Baecker wrote:
>
>
>Before I screw up my installation ;-)
> - did anyone successfully use these on sarge (debian testing)?
> - and/or are there deb's available for sarge?
>
>Many thanks,
>
>Arnd
> 
>
From: Arnd B. <arn...@we...> - 2004年07月19日 06:52:55
Hi,
On 2004年7月19日, Malte Marquarding wrote:
> I installed it from
>
> http://mentors.debian.net
> the other day.
>
> The debian package is:
>
> python-matplotlib
>
> It is version 0.60.2
>
> 'apt-cache search matplotlib' should give you the names of all the
> relevant matplotlib packages if you don't know them.
>
> Cheers,
> Malte
Before I screw up my installation ;-)
 - did anyone successfully use these on sarge (debian testing)?
 - and/or are there deb's available for sarge?
Many thanks,
Arnd
From: Malte M. <Mal...@cs...> - 2004年07月19日 01:34:08
I installed it from
http://mentors.debian.net
the other day.
The debian package is:
python-matplotlib
It is version 0.60.2
'apt-cache search matplotlib' should give you the names of all the 
relevant matplotlib packages if you don't know them.
Cheers,
Malte
John Hunter wrote:
> Charles> I can't see the matplotlib package with "apt-get". I
> Charles> have these lines in my sources.list and I've rerun
> Charles> "apt-get update".
>
> Charles> # Matplotlib deb http://mentors.debian.net/debian
> Charles> unstable main contrib non-free deb-src
> Charles> http://mentors.debian.net/debian unstable main contrib
> Charles> non-free
>
> Charles> I can see matplotlib-doc, but not matplotlib. Any ideas?
>
>Hi Charles, I think messages about the debian distribution should be
>sent to the devel list; I'm not sure Vittorio reads the users list.
>I've CCd him on this email.
>
>Cheers,
>JDH
>

Showing 16 results of 16

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /