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

Showing 11 results of 11

From: Eric F. <ef...@ha...> - 2007年06月06日 23:44:15
fred wrote:
> Hi,
> 
> My issue is quite simple: I reload several times an image
> with the colorbar enabled, and thus, I have several colorbars, not only one.
> 
> How can I disable this, and thus, get only one colorbar ?
> 
> Cheers,
> 
You may need to post a small code example so we can see what you are 
doing; but an interactive example using ipython -pylab may give you 
enough information to answer your question:
im = imshow(rand(20,20))
colorbar()
im.set_data(rand(20,20))
draw()
im.set_data(rand(20,20)*5)
im.autoscale() # to change the colormap limits
draw()
etc....
Eric
From: Nicolas <nic...@ya...> - 2007年06月06日 20:14:58
I can't figure why Polygons are used even when I simply draw lines.
But I know at least why I use empty list of vertices. ;)
In fact, I use matplotlib for a dynamic geometry software (something like
GeoGebra), and systematic use of high-level functions of matplotlib would be
to slow for that purpose.
And yet, I didn't want to use too low-level functions, like the renderer's
ones, for I didn't want to depend too much of a particular renderer.
So, I created once a set of plots and fills for every object, and then I
modified its attributes . I used to set its vertices to an empty list when I
didn't want it to appear on the figure.
I suppose now I'd better use instead something like.
 my_plot._visible = False
Nevertheless, I think empty vertices should be supported here (or not
supported at all for all renderers - for in 0.90.1 it still works with tkagg
for example)
Nicolas
On 6/6/07, John Hunter <jd...@gm...> wrote:
>
> On 6/6/07, Nicolas <nic...@ya...> wrote:
>
> > Unfortunately, I didn't use instantiated Polygon items myself, so for
> now I
> > can't figure which part of my code produces indirectly such empty
> > Polygons...
> >
> > May it be however possible to modify a little matplotlib code, so as to
> > assure the compatibility with the previous existing versions of
> matplotlib ?
> > Something like :
>
> I don't have a problem with this, but it just makes it easier for
> latent bugs in your code to remain hidden. Should we raise in the
> Polygon constructor is you pass in an empty list of vertices? Of
> course, you can always set xy directly, so this won't catch all the
> errors unless we use properties or traits.
>
> JDH
>
From: John H. <jd...@gm...> - 2007年06月06日 19:16:41
On 6/6/07, Nicolas <nic...@ya...> wrote:
> Unfortunately, I didn't use instantiated Polygon items myself, so for now I
> can't figure which part of my code produces indirectly such empty
> Polygons...
>
> May it be however possible to modify a little matplotlib code, so as to
> assure the compatibility with the previous existing versions of matplotlib ?
> Something like :
I don't have a problem with this, but it just makes it easier for
latent bugs in your code to remain hidden. Should we raise in the
Polygon constructor is you pass in an empty list of vertices? Of
course, you can always set xy directly, so this won't catch all the
errors unless we use properties or traits.
JDH
From: David G. <Dav...@no...> - 2007年06月06日 16:20:26
Thanks for doing this Russell; it installed, imported, and confirmed 
version fine on my Intel Mac (but I haven't actually had a chance to 
"use" it yet).
DG
Chr...@no... wrote:
> David,
>
> Can you test this?
>
> -CHB
>
>
> -------- Original Message --------
> Subject: [Matplotlib-users] matplotlib 0.90.1 binary installer for Mac
> Date: 2007年6月04日 14:19:18 -0700
> From: Russell E. Owen <ro...@ce...>
> Organization: University of Washington
> To: mat...@li...
>
> I've built a binary installer for matplotlib 0.90.1 for Mac that
> includes support for:
> - TkAgg that works with a user-installed Aqua Tcl/Tk (unlike the
> standard build) or the standard old Tcl/Tk from Apple
> - WXAgg using wxPython 2.8.
>
> I've only checked WXAgg and TKAgg on my PPC Mac. If anyone could test it
> on an Intel Mac I would be grateful.
>
> For now you can get it here:
> <http://www.astro.washington.edu/rowen/pythonpackages/>
>
> In the long run it will be available here:
> <http://pythonmac.org/packages/py25-fat/index.html>
>
> -- Russell
>
> P.S. Build instructions are here:
> <http://www.astro.washington.edu/rowen/BuildingMatplotlibForMac.html>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> 
-- 
ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>
From: John H. <jd...@gm...> - 2007年06月06日 15:25:38
On 6/6/07, Matthias Michler <Mat...@gm...> wrote:
> By the way: What do you think about the "insert a 'l' or 'g' into your TextBox
> and get a grid or log-scale"-issue? Is there a possibility to switch the
> mpl-meaning of 'l', 'g' and 'f' off?
Yes, this is clearly an issue that has to be dealt with in a cleanup.
The current implementation has no concept of whether the text box is
the active widget. We would need to do something like activate the
text box when you click on it (and figure out the right cursor
location based on the click if there is already text in there) and
deactivate it on a carriage return or click in another axes. The
current implementation was only a proof of concept.
JDH
From: Matthias M. <Mat...@gm...> - 2007年06月06日 15:11:44
Hello John,
first of all thank you very much for adding this patch.
By the way: What do you think about the "insert a 'l' or 'g' into your TextBox 
and get a grid or log-scale"-issue? Is there a possibility to switch the 
mpl-meaning of 'l', 'g' and 'f' off?
best regards, 
Matthias 
On Wednesday 06 June 2007 16:19, John Hunter wrote:
> On 6/6/07, Matthias Michler <Mat...@gm...> wrote:
> > Some time ago I posted a suggestion to that (subject: 'additional key
> > events'), which may be got lost among the lots of mpl-mails.
> > I just send the patch once more, because I think it would be helpful
> > for such a prompt.
>
> Thanks for the reminder -- this is indeed a useful patch. I just
> committed it.
>
> I'd like to do a few enhancements to the text box widget and then add
> it to svn.
>
> JDH
From: John H. <jd...@gm...> - 2007年06月06日 14:47:03
On 6/5/07, Erik Wickstrom <er...@er...> wrote:
> ax = fig.add_subplot(111)
> #from pylab import *
> N = 7
> menMeans = (20, 35, 30, 35, 27, 21, 60)
> ind = arange(N) # the x locations for the groups
> #print ind
> width = 0.35 # the width of the bars
> ax = bar(ind, menMeans, width, color='b')
You have commented out the line 'from pylab import *' which is the
right thing for a web app server. But then you wrote
ax = bar(ind, menMeans, width, color='b')
which should raise a NameError because bar is defined in the pylab
namespace. So it looks like somewhere in your code which you are not
showing to us you have imported from pylab, which is wrong. What you
want to do is
ax = fig.add_subplot(111)
ax.bar(ind, menMeans, width, color='b')
and after that, read the user's guide, tutorial,
the FAQ http://matplotlib.sourceforge.net/faq.html#OO, and the API
tutorial http://matplotlib.sourceforge.net/leftwich_tut.txt <wink>
JDH
From: John H. <jd...@gm...> - 2007年06月06日 14:19:25
On 6/6/07, Matthias Michler <Mat...@gm...> wrote:
> Some time ago I posted a suggestion to that (subject: 'additional key
> events'), which may be got lost among the lots of mpl-mails.
> I just send the patch once more, because I think it would be helpful
> for such a prompt.
Thanks for the reminder -- this is indeed a useful patch. I just
committed it.
I'd like to do a few enhancements to the text box widget and then add
it to svn.
JDH
From: Matthias M. <Mat...@gm...> - 2007年06月06日 14:00:34
Attachments: key_event_add.patch
Hello everybody,
first of all I want to thank John for his work on the textbox - it really 
looks better than mine.
On Tuesday 05 June 2007 19:16, Mark Bakker wrote:
> I just saw in the code:
> if event.key is None: # simulate backspace
> So it works properly,
> Mark
In my opinion it would be a better soluton to generally add some more 
key-events (e.g. enter and backspace) than to simulate backspace with 
all 'None'-keys.
Some time ago I posted a suggestion to that (subject: 'additional key
events'), which may be got lost among the lots of mpl-mails. 
I just send the patch once more, because I think it would be helpful 
for such a prompt.
best regards,
Matthias
> On 6/5/07, Mark Bakker <ma...@gm...> wrote:
> > I notice the alignment problem.
> > But it looks like you are close.
> > On my machine (win32), the 'enter' key didn't work either. It works like
> > a backspace. That sounds like what Matthias reported.
> > Mark
> >
> > On 6/5/07, John Hunter <jd...@gm...> wrote:
> > > On 6/5/07, John Hunter <jd...@gm...> wrote:
> > > > I worked on this some time ago, I never got to the point where I
> > > > thought it was ready for production but it is close. There is a
> > > > problem if usetex is enabled, because partial tex strings will cause
> > > > errors. But you can use it with regular text or plain text.
> > >
> > > Typo: "plain text" was meant to be "math text"
> > >
> > > Now I remember what really bothered me about this widget, and it
> > > wasn't just the usetex problem. The problem is that mpl has three
> > > different vertical alignment methods for text: top, bottom and center.
> > > None of them are right for a text box: you want baseline. Try typing
> > > "thinking" into the text box and watch what happens when you add and
> > > remove the "g". We do need to support baseline alignment for text, so
> > > if someone has an interest in adding this it would be a very useful
> > > feature, not just for a text box for for text alignment (eg tick
> > > labels) in general.
> > >
> > > See the image of the "g" at
> > > http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html
> > > for a visual representation -- hwat I am calling the "baseline" they
> > > refer to as the "origin" in that graph. Our default alignment should
> > > be "origin" or "baseline" but we don't have support for that.
> > >
> > > JDH
Hi,
 Back with same problem when embedding in gtk.
 I would like to enable the key pressed event (key '1' '2' 'a' 'g' .. )
of NavigationToolbar2 in my pyGTK app.
 (These keys shortcut are described here: (or see PS of this email)
http://sourceforge.net/tracker/index.php?func=detail&aid=1432252&group_id=80706&atid=560722
 )
The shorcuts work perfectly using pylab. But when I include matplotlib
in my pyGTK app the shorcuts are broken. Example of the two version
(pylab: two_scales.py and pygtk: two_scales_embedded_in_gtk2 ) are
attached to this email.
 How could I manage to make them work ?
Thanks for your help.
David
PS
"""
NavigationToolbar2 now manages overlapping axes correctly
when the axes overlap like in two_scales.py,
NavigationToolbar2 only managed one axe.
For example, when zooming or panning, only the left y
scale will move.
With the patch, both axes will move.
It is also possible to select only one axe by
pressing a digit.
pressing '1' will enable navigation (set_navigate())
only on the first axe under the cursor.
pressing '2' will enable navigation only on the
second axe under the cursor.
Also, the LocationEvent.inaxes will behave
accordingly. For example, pressing 'g' will enable
the grid on the selected axe.
pressing 'a' will reenable all axes under the cursor.
"""
From: Iyer <mas...@ya...> - 2007年06月06日 03:38:51
Hi folks,
I have a marker on a plot that is 5 units long, if I
resize the figure, the markers don't get resized
appropriately. How do I address this?
code snippet to display markers:
self.axes.annotate("text", xy=(0.5, 0.5), 
 
markerprops=dict(marker=TICKRIGHT,
markerfacecolor='black', markersize=5, 
 markeredgecolor='black',
markeredgewidth = 2),)
-iyer
 
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 

Showing 11 results of 11

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