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

Showing 7 results of 7

From: Robin D. <ro...@al...> - 2005年04月09日 17:30:26
and...@ti... wrote:
> On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 months
> ago, nearly), while on Windows 2000 I have Matplotlib 0.74.
> Well, I am using the WXAgg backend. By looking at backend_wx.py in 0.73pre
> (XP), I see that lines 116-117 are commented. These lines are:
> 
> # wxapp = wxPySimpleApp()
> # wxapp.SetExitOnFrameDelete(True)
> 
> While on Matplotlib 0.74 (2000) they are NOT commented. Well, in my app
> I don't need to initialize the wx.App() when calling plot/figure/Matplotlib
> things, because my app has ALREADY initialized the wx.App().
> If I use Matplotlib (without wxPython) I will just add:
> 
> import wx
> MyApp = wx.PySimpleApp()
> 
> Before using any Matplotlib command.
> Is there a reason why these lines were commented on 0.73pre and now they
> are not? Robin/John, could it be that the reason for which my application
> does not return under Windows 2000?
Yes. Having two app objects can certainly cause problems, although I 
wouldn't have expected it to manifest this way. Probably what is 
happening is that when the spashscreen is closed it is being added to 
the pending delete list but then the new app is being created and the 
pending delete list is reinitialized and so the splash screen never gets 
destroyed for real so the app's MainLoop keeps running waiting for it to 
be destroyed.
To find out for sure you could try uncommenting those lines on your XP 
box and see if you then have the same problem.
-- 
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
From: Werner F. B. <wer...@fr...> - 2005年04月09日 14:20:03
I still have a bit of a problem.
This puts the legend "more or less" outside the plot. If I use "upper 
right" with only two lines it is o.k., however if I use e.g. "center 
right" then about half of the legend is still over the top of the plot.
Also if I have more then 2 lines I start overlapping even when using 
"upper right".
This is what I use (within the wxcursor_demo.py).
self.figure.legend((pLine, cLine), ('Purchase', 'Consumption'), 'upper 
right')
I would like the legend being totally outside the plot, I am o.k. with 
that the overall canvas would have to be a bit larger.
Is there a way I can do this? BTW, I tried using "axespad = 0.02" with 
different values, i.e. "-0.15" puts it to the right, but half the legend 
isn't visable anymore.
Thanks and best regards
Werner
Werner F. Bruhin wrote:
> Hi John and Chris,
> 
> John Hunter wrote:
> 
>>>>>>> "Chris" == Chris Barker 
>>>>>>> <Chr...@no...> writes:
>>
>>
>>
>> Chris> By the way, I'm on a quest to make the OO interface to
>> Chris> matplotlib fully functional and convenient. If you want to
>> Chris> work on it, John would probably except a patch to make a
>> Chris> figure.legend() method.
>>
>> pylab.figlegend is a thin wrapper to matplotlib.Figure.legend; see
>> http://matplotlib.sf.net/matplotlib.figure.html#Figure-legend
> 
> 
> Got it, also don't understand why I could not get this to work yesterday 
> - probably had crossed eyes.
> 
> Thanks and best regards
> Werner
> 
>>
>> <wink>
>>
>> JDH
>>
>>
>> -------------------------------------------------------
>> SF email is sponsored by - The IT Product Guide
>> Read honest & candid reviews on hundreds of IT Products from real users.
>> Discover which products truly live up to the hype. Start reading now.
>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> 
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
From: <and...@ti...> - 2005年04月09日 13:35:54
Hello NGs,
 I probably found where the problem resides. As it is a wxPython+Matplo=
tlib
issue, I will send the mail to both newsgroups.
The reason why my application does not terminates correctly on Windows 20=
00
while it terminates correctly on Windows XP does not depend on Windows ve=
rsion,
but on Matplotlib. I am not 100% sure, because here I only have (at the
moment) Windows XP, but I found a difference between 2 Matplotlib install=
ations
I have.
On XP, I have Matplotlib 0.73 prerelease (that WAS a prerelease 1 months
ago, nearly), while on Windows 2000 I have Matplotlib 0.74.
Well, I am using the WXAgg backend. By looking at backend_wx.py in 0.73pr=
e
(XP), I see that lines 116-117 are commented. These lines are:
# wxapp =3D wxPySimpleApp()
# wxapp.SetExitOnFrameDelete(True)
While on Matplotlib 0.74 (2000) they are NOT commented. Well, in my app
I don't need to initialize the wx.App() when calling plot/figure/Matplotl=
ib
things, because my app has ALREADY initialized the wx.App().
If I use Matplotlib (without wxPython) I will just add:
import wx
MyApp =3D wx.PySimpleApp()
Before using any Matplotlib command.
Is there a reason why these lines were commented on 0.73pre and now they
are not? Robin/John, could it be that the reason for which my application=
does not return under Windows 2000?
Thanks to you all.
Andrea.
>and...@ti... wrote:
>> Hello NG,
>> 
>> It's incredible... after having found that my application correctl=
y
>> terminates if I add the line:
>> 
>> self.MyTaskBarIcon.Destroy()
>> 
>> on Windows XP, I am UNABLE to terminate it on Windows 2000. The main
frame
>> is correctly destroyed, together with its children, but there is still=
>something
>> alive that prevents Python to correctly finish and returning to me the=
>control
>> of the DOS console.
>> The wxPython version is the same, the Python version is the same... th=
e
>> only differences between the 2 PC is the Windows version (XP=3Dwork, 2=
000=3Ddon't
>> work) and the PC performances (XP=3D1GB RAM, 2000=3D528MB RAM).
>> I used Spy++ and its friends and, after my app terminates, on 2000 the=
re
>> is still a window opened. This window has no class information, no par=
ticular
>> ID, only a size and position elements. There is no reason why the appl=
ication
>> behavior should be different.
>> I don't even know which question I would formulate to you NG, it is a
pain
>> this continuous error-checking for a window/frame/panel that I didn't
create
>> and that wxPython thinks is still alive (only on Windows 2000).
>
>If you can create a small sample that shows the problem I can run it 
>under the debugger to see if I can spot what's going on.
>
>-- 
>Robin Dunn
>Software Craftsman
>http://wxPython.org Java give you jitters? Relax with wxPython!
From: Werner F. B. <wer...@fr...> - 2005年04月09日 13:03:38
The part about the sub-title got over looked, so I'll post again - 
anyhow it was bad from me to stick two things into one message - sorry!
Is it possible to have sub-title lines, I saw that I can pass newline 
with title string but this uses the same font attributes, I would like a 
slightly smaller font and non bold etc for the second title line.
Thanks for any hints.
Werner
From: Werner F. B. <wer...@fr...> - 2005年04月09日 12:54:56
Hi John and Chris,
John Hunter wrote:
>>>>>>"Chris" == Chris Barker <Chr...@no...> writes:
> 
> 
> Chris> By the way, I'm on a quest to make the OO interface to
> Chris> matplotlib fully functional and convenient. If you want to
> Chris> work on it, John would probably except a patch to make a
> Chris> figure.legend() method.
> 
> pylab.figlegend is a thin wrapper to matplotlib.Figure.legend; see
> http://matplotlib.sf.net/matplotlib.figure.html#Figure-legend
Got it, also don't understand why I could not get this to work yesterday 
- probably had crossed eyes.
Thanks and best regards
Werner
> 
> <wink>
> 
> JDH
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
From: John H. <jdh...@ac...> - 2005年04月09日 11:59:31
>>>>> "Brian" == Brian B <b-m...@bb...> writes:
 Brian> Hello, I have generated an image with savefig(...,
 Brian> dpi=100). I do not use a main title for the graph (not the
 Brian> same as the X- and Y- axis labels). When I display the
 Brian> image on an HTML page, there is a space of approximately 60
 Brian> pixels above the image that contain no graph drawing, I
 Brian> assume this space was reserved for a title that I have no
 Brian> need for. The white space of 60 pixels on top creates too
 Brian> much gap between the image and another HTML page element
 Brian> above.
Hi Brian,
The Axes is the white space that contains the lines, rectangles, text
etc. The Figure is the whole canvas that contains the Axes. The
default Axes is created by Subplot(111) which leaves empty space at
the left, bottom, top, right and bottom. You can create your own Axes
dimensions. with the "axes" command
 http://matplotlib.sf.net/matplotlib.pylab.html#-axes
Eg, to leave no room at right or top, use
 ax = axes([0.1, 0.1, 0.9, 0.9])
The arguments to the axes function are left, bottom, width and height,
expressed as fractions of the figure width and height. 0,0 is bottom,
left and 1,1 is top, right. So the lower left corner of this axes is
0.1, 0.1 and the upper right is 0.1+0.9, 0.1+0.9 or 1,1 which is the
upper right of the figure (no white space). 
You may also want to customize the background color of the Axes and
Figure to be the same -- see help for axes, figure and savefig (hint,
although the figure has a background color, savefig overrides it
because sometimes you want a different figure background when working
interactively and saving).
See also examples/axes_demo.py.
JDH
From: Brian B. <b-m...@bb...> - 2005年04月09日 06:06:34
Hello,
I have generated an image with savefig(..., dpi=100). I do not use a main title
for the graph (not the same as the X- and Y- axis labels). When I display the
image on an HTML page, there is a space of approximately 60 pixels above the
image that contain no graph drawing, I assume this space was reserved for a
title that I have no need for. The white space of 60 pixels on top creates too
much gap between the image and another HTML page element above.
I'm generating the figure dynamically so I can't manually crop out the
white space above the top graph border.
Is there any way to reduce whitespace above the graph to be reasonably
trimmed down when not using a graph title?
Thanks!
Brian

Showing 7 results of 7

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