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

Showing 13 results of 13

From: Adam <kef...@gm...> - 2008年10月26日 23:35:04
Hi, I'm trying to make myself a set of widgets for the first time.
 I've gotten to the point that I can draw rectangles and lines and make
 them do the right things when re-drawing figures, zooming, etc., but
 I'm still a little lost on some points, and I haven't found any really
 good documentation.
So, first question: Where should I go for documentation first?
I've been using examples, e.g. widgets.py, and the pygtk event
 handling page, http://www.pygtk.org/pygtk2tutorial/sec-EventHandling.html.
 This page was a useful explanation of the stuff in widgets.py:
 http://www.nabble.com/some-API-documentation-td16204232.html.
Second question: I have two subplots of different data with the same
 dimensions. I'd like to zoom in to the same region on both figures
 when I use zoom-to-box on either one. How can I do this? (I'm using
 tkAgg)
 Thanks,
 Adam
From: Eric F. <ef...@ha...> - 2008年10月26日 22:44:21
Ryan May wrote:
> They're the same plotting interface, just different names. Pylab pulls 
> in a few extra functions that aren't specific to plotting, but aid in 
> providing matlab-alike functionality. To use matplotlib.pyplot instead 
> of pylab for any of the examples, just replace lines of:
> 
> import pylab
> 
> with:
> 
> import matplotlib.pyplot
Not quite--the above, taken literally, will not actually work.
To elaborate: pyplot provides a matlab-style state-machine interface to 
the underlying object-oriented interface in matplotlib. Pylab lumps 
pyplot together with numpy in a single namespace, making that namespace 
(or environment) even more matlab-like, particularly if one uses the 
ipython shell with the "-pylab" option, which imports everything from pylab.
Regarding matplotlib examples: we have been gradually converting them 
from pure matlab-style, using "from pylab import *", to a preferred 
style in which pyplot is used for some convenience functions, either 
pyplot or the object-oriented style is used for the remainder of the 
plotting code, and numpy is used explicitly for numeric array operations.
In this preferred style, the imports at the top are:
import matplotlib.pyplot as plt
import numpy as np
Then one calls, for example, np.arange, np.zeros, np.pi, plt.figure, 
plt.plot, plt.show, etc.
Example, pure matlab-style:
from pylab import *
x = arange(0, 10, 0.2)
y = sin(x)
plot(x, y)
show()
Now in preferred style, but still using pyplot interface:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 10, 0.2)
y = np.sin(x)
plt.plot(x, y)
plt.show()
And using pyplot convenience functions, but object-orientation for the rest:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 10, 0.2)
y = np.sin(x)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(x, y)
plt.show()
So, why do all the extra typing required as one moves away from the pure 
matlab-style? For very simple things like this example, the only 
advantage is educational: the wordier styles are more explicit, more 
clear as to where things come from and what is going on. For more 
complicated applications, the explicitness and clarity become 
increasingly valuable, and the richer and more complete object-oriented 
interface will likely make the program easier to write and maintain.
Eric
> 
> Ryan
> 
> On Sun, Oct 26, 2008 at 11:29 AM, <ch...@se... 
> <mailto:ch...@se...>> wrote:
> 
> On Sun, Oct 26, 2008 at 11:51:48AM -0400, Charlie Moad wrote:
> > The matplotlib.pyplot is favored over the pylab module now.
> 
> Thanks! I find your comment very interesting. As I have negligible
> experience
> with Matlab, I'd love to use matplotlib.pyplot.
> 
> The problem is all the docs use pylab right? Where find
> matplotlib.pyplot
> examples?
> 
> Chris
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> 
> 
> -- 
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Ryan M. <rm...@gm...> - 2008年10月26日 19:59:21
They're the same plotting interface, just different names. Pylab pulls in a
few extra functions that aren't specific to plotting, but aid in providing
matlab-alike functionality. To use matplotlib.pyplot instead of pylab for
any of the examples, just replace lines of:
 import pylab
with:
 import matplotlib.pyplot
Ryan
On Sun, Oct 26, 2008 at 11:29 AM, <ch...@se...> wrote:
> On Sun, Oct 26, 2008 at 11:51:48AM -0400, Charlie Moad wrote:
> > The matplotlib.pyplot is favored over the pylab module now.
>
> Thanks! I find your comment very interesting. As I have negligible
> experience
> with Matlab, I'd love to use matplotlib.pyplot.
>
> The problem is all the docs use pylab right? Where find matplotlib.pyplot
> examples?
>
> Chris
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: David A. <dwa...@su...> - 2008年10月26日 19:19:24
Eric et al,
Very nice. However, I am running the latest Enthought EPD on Mac OS X 
10.4.11 and I get this:
In [6]: clabel(cs,inline=1,fontsize=10,manual=True)
Select label locations manually using first mouse button.
End manual selection with second mouse button.
/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/ 
site-packages/matplotlib-0.98.3.0001-py2.5-macosx-10.3-fat.egg/ 
matplotlib/backend_bases.py:1448: DeprecationWarning: Using default 
event loop until function specific to this GUI is implemented
 warnings.warn(str,DeprecationWarning)
It works, adding labels whenever I click with my mouse, but I cannot 
end labeling. I've tried various combinations with the mouse (ctrl 
+click, option+click, command+click) and keyboard (Enter), to no avail.
Has anyone tried this on a Mac and got the labeling to end?
Thanks.
D.
On Oct 25, 2008, at 5:21 PM, Eric Firing wrote:
> David Arnold wrote:
>> All,
>> Does Matplotlib have a form of the clabel command that uses the 
>> switch manual, as in Matlab:
>> [c,h]=contour(x,y,z);
>> clabel(c,h,'manual')
>> Which allows the user to pick the contours to label with the mouse?
>
> Yes, this was added recently by David Kaplan. It is in svn; I 
> don't know whether it has appeared a released version yet.
>
> The relevant part of the docstring, describing the keyword 
> argument, is:
>
> *manual*:
> if *True*, contour labels will be placed manually using
> mouse clicks. Click the first button near a contour to
> add a label, click the second button (or potentially both
> mouse buttons at once) to finish adding labels. The third
> button can be used to remove the last label added, but
> only if labels are not inline. Alternatively, the keyboard
> can be used to select label locations (enter to end label
> placement, delete or backspace act like the third mouse 
> button,
> and any other key will select a label location).
>
> Eric
>
>> David Arnold
>> College of the Redwoods
>> http://msemac.redwoods.edu/~darnold/index.php
>> --------------------------------------------------------------------- 
>> ----
>> This SF.Net email is sponsored by the Moblin Your Move Developer's 
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win 
>> great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in 
>> the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Gideon S. <si...@ma...> - 2008年10月26日 18:55:20
This might be something wrong with the way fink has built GTK, but the 
following warnings are showing up for me:
/opt/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py: 
72: GtkWarning: Unable to find default local directory monitor type
 gtk.main()
/opt/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py: 
1033: GtkWarning: Unable to find default local directory monitor type
 if self.run() != int(gtk.RESPONSE_OK):
-gideon
From: <ch...@se...> - 2008年10月26日 16:29:07
On Sun, Oct 26, 2008 at 11:51:48AM -0400, Charlie Moad wrote:
> The matplotlib.pyplot is favored over the pylab module now.
Thanks! I find your comment very interesting. As I have negligible experience
with Matlab, I'd love to use matplotlib.pyplot.
The problem is all the docs use pylab right? Where find matplotlib.pyplot
examples?
Chris
From: Charlie M. <cw...@gm...> - 2008年10月26日 15:51:52
Pylab is just a name for a module in matplotlib that is supposed to mimic
matlab. I would say its intent it to ease the transition for matlab users.
 It wouldn't really make sense to refer to matplotlib as pylab. The
matplotlib.pyplot is favored over the pylab module now.
- Charlie
On Sun, Oct 26, 2008 at 1:28 AM, <ch...@se...> wrote:
>
> So is matplotlib the name of the low level plotting engine?
>
> And, pylab is the user-friendly wrapper?
>
> Would it be ok to call the whole system "Pylab" instead of Matplotlib then?
>
>
> Chris
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: massimo s. <mas...@un...> - 2008年10月26日 14:22:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
ch...@se... ha scritto:
> So is matplotlib the name of the low level plotting engine?
> 
> And, pylab is the user-friendly wrapper?
> 
> Would it be ok to call the whole system "Pylab" instead of Matplotlib then?
Personally I'd say "no" exactly because they are two different things,
as you correctly pointed out.
m.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJBG/SpnWWEXZ5PA4RAg7nAKCJ1Jo78MApS3FP5t4FFLnMMel8mwCgpCHL
JSqrVwgyzX3JAD7y77Iyxnw=
=D9oR
-----END PGP SIGNATURE-----
From: Oz N. <na...@gm...> - 2008年10月26日 09:32:26
I'm answering to myself on the mailing list just in case it might help some
in the future.
As, someone pointed out the error is in the assignment operator:
I wrote in the code:
 sum1 =+ (i-mx)*(j-my)
which does not add the values but puts them.
Instead I should have wrote
 sum1 += (i-mx)*(j-my)
a little difference that does a lot... :-)
here is the correct function:
def slope(x,y):
 sum1 = 0
 sum2 = 0
 mx = mean(x)
 my = mean(y)
 for i,j in zip(x,y):
 sum1 += (i-mx)*(j-my)
 print sum1
 sum2 += (i-mx)**2
 slope = sum1/sum2
 return slope
-- 
 .''`.
: :' : We are debian.org. Lower your prices,
`. `' surrender your code.
 `- We will add your hardware and software
 distinctiveness to our own.
 Resistance is futile.
----
 Imagine there's no countries
 It isn't hard to do
 Nothing to kill or die for
 And no religion too
 Imagine all the people
 Living life in peace
----
 You all must read 'The God Delusion'
 http://en.wikipedia.org/wiki/The_God_Delusion
---
when one person suffers from a delusion it is called insanity. When many
people suffer from a delusion it is called religion."
Robert Pirsig, Zen and the Art of Motorcycle Maintenance
From: <ch...@se...> - 2008年10月26日 05:28:27
So is matplotlib the name of the low level plotting engine?
And, pylab is the user-friendly wrapper?
Would it be ok to call the whole system "Pylab" instead of Matplotlib then?
Chris
I measured the displayed Matplotlib PDF on the screen and noticed it
has a 4/3 (1.333...) aspect ratio by default.
Is it EXACTLY 4/3? Even if I do:
pylab.figure().subplots_adjust(left = EXTRA_ROOM,
 bottom = EXTRA_ROOM)
???
(Why doesn't the subplots_adjust command seem to mess up the default aspect
ratio?? )
Chris
On 10/25/2008 6:07 PM I. Soumpasis wrote:
> The programs are GPL licensed. More info on the section of copyrights
 > http://wiki.deductivethinking.com/wiki/Deductive_Thinking:Copyrights.
> I hope it is ok,
Well, that depends what you mean by "ok".
Obviously, the author picks the license s/he prefers.
But a GPL license means that some people will avoid
your code, so you make wish to make sure you thought
the licensing issue for this code carefully.
As a point of comparison,
note that all your package dependencies have
a new BSD license.
Alan Isaac
From: Eric F. <ef...@ha...> - 2008年10月26日 00:21:24
David Arnold wrote:
> All,
> 
> Does Matplotlib have a form of the clabel command that uses the 
> switch manual, as in Matlab:
> 
> [c,h]=contour(x,y,z);
> clabel(c,h,'manual')
> 
> Which allows the user to pick the contours to label with the mouse?
Yes, this was added recently by David Kaplan. It is in svn; I don't 
know whether it has appeared a released version yet.
The relevant part of the docstring, describing the keyword argument, is:
 *manual*:
 if *True*, contour labels will be placed manually using
 mouse clicks. Click the first button near a contour to
 add a label, click the second button (or potentially both
 mouse buttons at once) to finish adding labels. The third
 button can be used to remove the last label added, but
 only if labels are not inline. Alternatively, the keyboard
 can be used to select label locations (enter to end label
 placement, delete or backspace act like the third mouse button,
 and any other key will select a label location).
Eric
> 
> David Arnold
> College of the Redwoods
> http://msemac.redwoods.edu/~darnold/index.php
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Showing 13 results of 13

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 によって変換されたページ (->オリジナル) /