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






Showing 19 results of 19

From: Lisa T. <lt...@uc...> - 2008年08月18日 22:26:39
I've installed the Enthought Python Distribution for Mac OS on my 
MacOS 10.4 Intel machine.
when i try to install basemap-0.99.1 I get this error:
gcc: unrecognized option '-no-cpp-precomp'
cc1: error: unrecognized command line option "-mno-fused-madd"
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-arch"
cc1: error: unrecognized command line option "-Wno-long-double"
error: Command "gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/ 
MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp 
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Isrc -I/Library/ 
Frameworks/Python.framework/Versions/4.0.30001/lib/python2.5/site- 
packages/numpy-1.1.1.0001-py2.5-macosx-10.3-fat.egg/numpy/core/ 
include -I/Library/Frameworks/Python.framework/Versions/4.0.30001/ 
include/python2.5 -c src/PJ_gn_sinu.c -o build/temp.macosx-10.3- 
i386-2.5/src/PJ_gn_sinu.o" failed with exit status 1
Any ideas?
lisa tauxe
Hi,
The pdf backend seems to return incorrect window extent (i.e., return
value of get_window_extent()) when usetex==True.
I'm attaching a small script to test this.
> python test_text_window_extent.py -dPdf
Its results for the pdf backend with usetex==True is attached. For
comparison, results for the Agg backend with usetex==False (which
seems correct) is also attached.
I guess this bug is related with
http://article.gmane.org/gmane.comp.python.matplotlib.general/13997
-JJ
From: Warren W. <war...@gm...> - 2008年08月18日 20:42:23
I meant to send this to the list, not just to Brent...
---------- Forwarded message ----------
From: Warren Weckesser <war...@gm...>
Date: Mon, Aug 18, 2008 at 4:03 PM
Subject: Re: [Matplotlib-users] Set MPLCONFIGDIR to something different
To: Brent Pedersen <bpe...@gm...>
Hi,
On Mon, Aug 18, 2008 at 3:55 PM, Brent Pedersen <bpe...@gm...> wrote:
> On Mon, Aug 18, 2008 at 8:25 AM, stuartornum <st...@mu...> wrote:
> >
> > Hi Jeff,
> >
> > Sorry I should have explained more. I am running a web app also I
> currently
> > working for a very large organisation so the infrastructure is quite
> > different to your average home / signle server setup.
> >
> > Thank you.<https://lists.sourceforge.net/lists/listinfo/matplotlib-users>
> >
>
> i think before importing matplotlib, you can do:
> os.environ['HOME'] = "/some/path"
>
>
I do that on my server, e.g. my python CGI scripts do
 os.environ['HOME'] = '/var/www/tmp'
before importing anything from matplotlib. Seems to work fine.
This is explained in a FAQ or doc or tutorial somewhere.
Warren
From: Brent P. <bpe...@gm...> - 2008年08月18日 19:55:05
On Mon, Aug 18, 2008 at 8:25 AM, stuartornum <st...@mu...> wrote:
>
> Hi Jeff,
>
> Sorry I should have explained more. I am running a web app also I currently
> working for a very large organisation so the infrastructure is quite
> different to your average home / signle server setup.
>
> Thank you.
> --
> View this message in context: http://www.nabble.com/Set-MPLCONFIGDIR-to-something-different-tp19033822p19034026.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> 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
>
i think before importing matplotlib, you can do:
os.environ['HOME'] = "/some/path"
From: Darren D. <dsd...@gm...> - 2008年08月18日 16:37:40
On Monday 18 August 2008 10:45:39 am Darren Dale wrote:
> On Monday 18 August 2008 09:48:58 am you wrote:
> > Hi,
> >
> > On Mon, Aug 18, 2008 at 2:25 PM, Darren Dale <dsd...@gm...> wrote:
> > > Could you post a *simple* script that reproduces the problem? And in
> > > the meantime, to get a figure that looks better for your publication,
> > > can you save your figure as an svg, import it into inkscape, tweak the
> > > bad placement, and then save a pdf?
> >
> > Thanks for the inkscape suggestion - I usually just use eps and pdf
> > which I find harder to edit.
> >
> > Below is the function I use to create the plot. Actually I thought it
> > happened with all legends, but I think I have just been focussing on
> > these plots for too long, because when I check now it only seems to
> > happen when I plot with this function.
> > plot_stacked(arange(1,6),arange(1,6)) should reproduce the problem.
> > Perhaps it is something to do with setting the labels to '' to delete
> > the duplicate copies I don't want?
>
> No, because you can comment out that part of the code and still get a
> problem with the "Higher Order" label.
>
> The problem is that the text placement for the "Higher Order" text label is
> being calculated with reference to the descent of "g" rather than its
> baseline (see http://en.wikipedia.org/wiki/Typeface#Font_metrics). I'm
> looking into it, I think it can be improved.
It turns out that the information needed to do a better job of placing either 
the text or the Rectangle is calculated by the renderer, long after the text 
and Rectangle positions have been chosen based on an approximation of the 
text height (among other parameters). This is not my area of expertise, I'm 
just trying to fill in while the others are busy at the Scipy conference.
There must be good reasons for organizing Legend the way it is, but maybe it 
tries to do too much too early and then never makes any refinements. Here is 
a patch that I submit only for the sake of discussion, it is an ugly 
workaround to the problem of not using the text's baseline as the common 
point of reference.
You can perhaps temporarily modify your legend.py to make a better figure, 
although maybe this patch doesnt even do what you want it to. For now, I 
think it would be better to go with inkscape to make improvements, if you 
can.
Index: lib/matplotlib/legend.py
===================================================================
--- lib/matplotlib/legend.py (revision 6035)
+++ lib/matplotlib/legend.py (working copy)
@@ -203,16 +203,31 @@
 if not len(self.legendHandles) and not len(self.texts): return
- for h in self.legendHandles:
- if h is not None:
- h.draw(renderer)
- if hasattr(h, '_legmarker'):
- h._legmarker.draw(renderer)
- if 0: bbox_artist(h, renderer)
- for t in self.texts:
- if 0: bbox_artist(t, renderer)
- t.draw(renderer)
+ for l, t in safezip(self.legendHandles, self.texts):
+ if t is not None:
+ if 0: bbox_artist(t, renderer)
+ t.draw(renderer)
+ s = t.get_text()
+ f = t.get_font_properties()
+ ismath = t.is_math_text(s)
+ w, h, d = renderer.get_text_width_height_descent(s, f, 
ismath)
+ if l is not None:
+ if isinstance(l, Rectangle):
+ try:
+ old_h = l.get_height()
+ new_h = old_h * (h-d) / h
+ old_y = l.get_y()
+ new_y = old_y + (old_h - new_h)
+ l.set_height(new_h)
+ l.set_y(new_y)
+ except NameError:
+ pass
+ l.draw(renderer)
+ if hasattr(l, '_legmarker'):
+ l._legmarker.draw(renderer)
+ if 0: bbox_artist(l, renderer)
+
 renderer.close_group('legend')
 #draw_bbox(self.save, renderer, 'g')
 #draw_bbox(self.ibox, renderer, 'r', self.get_transform())
From: Jeff W. <js...@fa...> - 2008年08月18日 15:59:50
stuartornum wrote:
> Hi Jeff,
>
> Sorry I should have explained more. I am running a web app also I currently
> working for a very large organisation so the infrastructure is quite
> different to your average home / signle server setup.
>
> Thank you.
> 
Stuart: I don't think setting it in your script will have any effect. 
If MPLCONFIGDIR is unset, it should still work, since mpl will look in 
the web server's home directory. If you want to set MPLCONFIGDIR, it 
has to be done in the web server environment to have any effect.
However, I'm certainly no expert on running mpl in web apps. Have you 
tried searching the list archives for "MPLCONFIGDIR", or "web app"?
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: stuartornum <st...@mu...> - 2008年08月18日 15:25:53
Hi Jeff,
Sorry I should have explained more. I am running a web app also I currently
working for a very large organisation so the infrastructure is quite
different to your average home / signle server setup.
Thank you.
-- 
View this message in context: http://www.nabble.com/Set-MPLCONFIGDIR-to-something-different-tp19033822p19034026.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jeff W. <js...@fa...> - 2008年08月18日 15:21:10
stuartornum wrote:
> Hi,
>
> Im getting the error:
>
> <type 'exceptions.RuntimeError'>: Failed to create
> /$dirstring$/common/.matplotlib; consider setting MPLCONFIGDIR to a writable
> directory for matplotlib configuration data
>
> The problem is I do not have write access to the MatPlotLib module sourse,
> so I cannot change the MPLCONFIGDIR variable, where ever it is..!
>
> So my question is can I set MPLCONFIGDIR to say "/home/user/dirs/" in my
> script somewhere, so that I know the that directory has read/write access.
>
> Thank you for your time.
>
> Regards
> 
Stuart: Why are you setting the MPLCONFIGDIR environment variable? By 
default, the configuration file goes in $HOME/.matplotlib, which is 
usually just fine. Typically $MPLCONFIGDIR is used to override this in 
special situations, for example when running matplotlib in a web 
application.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: stuartornum <st...@mu...> - 2008年08月18日 15:14:59
Hi,
Im getting the error:
<type 'exceptions.RuntimeError'>: Failed to create
/$dirstring$/common/.matplotlib; consider setting MPLCONFIGDIR to a writable
directory for matplotlib configuration data
The problem is I do not have write access to the MatPlotLib module sourse,
so I cannot change the MPLCONFIGDIR variable, where ever it is..!
So my question is can I set MPLCONFIGDIR to say "/home/user/dirs/" in my
script somewhere, so that I know the that directory has read/write access.
Thank you for your time.
Regards
-- 
View this message in context: http://www.nabble.com/Set-MPLCONFIGDIR-to-something-different-tp19033822p19033822.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Darren D. <dsd...@gm...> - 2008年08月18日 14:45:42
On Monday 18 August 2008 09:48:58 am you wrote:
> Hi,
>
> On Mon, Aug 18, 2008 at 2:25 PM, Darren Dale <dsd...@gm...> wrote:
> > Could you post a *simple* script that reproduces the problem? And in the
> > meantime, to get a figure that looks better for your publication, can you
> > save your figure as an svg, import it into inkscape, tweak the bad
> > placement, and then save a pdf?
>
> Thanks for the inkscape suggestion - I usually just use eps and pdf
> which I find harder to edit.
>
> Below is the function I use to create the plot. Actually I thought it
> happened with all legends, but I think I have just been focussing on
> these plots for too long, because when I check now it only seems to
> happen when I plot with this function.
> plot_stacked(arange(1,6),arange(1,6)) should reproduce the problem.
> Perhaps it is something to do with setting the labels to '' to delete
> the duplicate copies I don't want?
No, because you can comment out that part of the code and still get a problem 
with the "Higher Order" label.
The problem is that the text placement for the "Higher Order" text label is 
being calculated with reference to the descent of "g" rather than its 
baseline (see http://en.wikipedia.org/wiki/Typeface#Font_metrics). I'm 
looking into it, I think it can be improved.
From: Ben A. <bax...@co...> - 2008年08月18日 14:42:56
Bump.
________________________________
From: mat...@li... [mailto:mat...@li...] On Behalf Of Ben Axelrod
Sent: Thursday, August 14, 2008 5:54 PM
To: Matplotlib
Subject: [Matplotlib-users] Arrow Questions
I am trying to implement a dynamic graph in mpl, where users can drag around the nodes, and the edges follow the nodes like rubber bands. I have this working with regular edges, but I want to give the option of putting arrows on the edges. I am running into some issues with the Arrow classes.
With my Text, Rectangle, and Line2D objects I can get and set their locations with methods such as get_position(), get_x(), and get_xdata() respectively. But there are no such methods for any of the Arrow classes. (By the way, it seems like these sorts of things would be in the base classes, and much more standard).
What is the difference between Arrow, YAArrow, and FancyArrow anyway? (Besides drastically different scales).
Some other features of the Arrow class that I would like very much are:
* double headed arrows (one line with an arrow head on each end)
 * the ability to turn the arrow head on and off easily (Boolean parameter function)
Does anyone have any ideas on how to work around these issues?
Thanks,
-Ben
From: Robin <ro...@gm...> - 2008年08月18日 13:49:00
Hi,
On Mon, Aug 18, 2008 at 2:25 PM, Darren Dale <dsd...@gm...> wrote:
> Could you post a *simple* script that reproduces the problem? And in the
> meantime, to get a figure that looks better for your publication, can you
> save your figure as an svg, import it into inkscape, tweak the bad placement,
> and then save a pdf?
Thanks for the inkscape suggestion - I usually just use eps and pdf
which I find harder to edit.
Below is the function I use to create the plot. Actually I thought it
happened with all legends, but I think I have just been focussing on
these plots for too long, because when I check now it only seems to
happen when I plot with this function.
plot_stacked(arange(1,6),arange(1,6)) should reproduce the problem.
Perhaps it is something to do with setting the labels to '' to delete
the duplicate copies I don't want?
Thanks,
Robin
def plot_stacked(*vals, **kwargs):
 fig = figure()
 sub = fig.add_subplot(111)
 ticks = kwargs.setdefault('ticks',[])
 labels = kwargs.setdefault('labels',False)
 numstacks = len(vals)
 vallength = set([len(val) for val in vals])
 if len(vallength) > 1:
 raise ValueError,'All input values should have the same length'
 vallength = vallength.pop()
 ind = 0.25 + arange(numstacks)
 width = 0.5
 bottom = zeros(numstacks)
 colorvals = arange(vallength) * (1.0/(vallength-1))
 orderlabels = ['First Order','Second Order','Third Order','Fourth Order']
 if not labels:
 labels = orderlabels[:vallength-1] + ['Higher Order']
 for i in range(vallength):
 ivals = [val[i] for val in vals]
 sub.bar(ind, ivals, width,
 bottom=bottom, color=str(colorvals[i]),label=labels[i])
 bottom += ivals
 sub.set_xlim(0,numstacks+1.5)
 sub.set_xticks(ind+width/2)
 sub.set_xticklabels(ticks)
 # remove duplicate labels
 tmplabels = []
 for rect in sub.patches:
 if rect.get_label() in tmplabels:
 rect.set_label('')
 else:
 tmplabels.append(rect.get_label())
 sub.legend()
 fig.show()
>
> Darren
>
>
> On Monday 18 August 2008 08:47:16 am Robin wrote:
>> Hi,
>>
>> I was wondering if anyone was able to help with this problem of
>> incorrect legend alignment.
>>
>> I am not sure if the original mail did not get through, perhaps
>> because of the attachent, so this time I have put the example here:
>> http://acrids.robince.net/robince/bad_legend.pdf
>>
>> Publication is now imminent and I have a horible feeling I am going to
>> have to do all the plots again in Matlab unless we can resolve this
>> problem - it currently looks very unprofessional.
>>
>> I would appreciate any pointers on where to look to try to resolve this.
>>
>> Thanks
>>
>> Robin
>>
>> On Thu, Jul 10, 2008 at 11:58 PM, Robin <ro...@gm...> wrote:
>> > Hi,
>> >
>> > I have a problem with legends where the vertical spacing is sometimes
>> > a bit funny (lines don't seem to be evenly spaced).
>> >
>> > I am now preparing some figures for publication and this is the last
>> > niggle I'd really like to resolve.
>> >
>> > Is there anything I could do to fix this?
>> >
>> > A small example is attached (I cropped it to just the legend to reduce
>> > file size).
>> >
>> > I am setting the label on the bars I am plotting and then just calling
>> > ax.legend()
>> >
>> > At the risk of putting two queries in one email the only other problem
>> > I have regularly is that small figures resize themselves when the
>> > mouse rolls over them. I am using TkAgg backend on OS X but I think it
>> > happens on other platforms as well. On mouse over the window jiggles
>> > and resizes slightly. When I am saving figures I have to be careful to
>> > call savefig from the command line without touching the window with
>> > the mouse to ensure they save as the correct size. Just wondered if it
>> > was a known issue...
>> >
>> > Apart from these minor things though matplotlib has been performing
>> > great!
>> >
>> > Thanks,
>> >
>> > Robin
>>
>> -------------------------------------------------------------------------
>> 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
>
>
>
> -------------------------------------------------------------------------
> 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: Darren D. <dsd...@gm...> - 2008年08月18日 13:25:35
Hi Robin,
Could you post a *simple* script that reproduces the problem? And in the 
meantime, to get a figure that looks better for your publication, can you 
save your figure as an svg, import it into inkscape, tweak the bad placement, 
and then save a pdf?
Darren
On Monday 18 August 2008 08:47:16 am Robin wrote:
> Hi,
>
> I was wondering if anyone was able to help with this problem of
> incorrect legend alignment.
>
> I am not sure if the original mail did not get through, perhaps
> because of the attachent, so this time I have put the example here:
> http://acrids.robince.net/robince/bad_legend.pdf
>
> Publication is now imminent and I have a horible feeling I am going to
> have to do all the plots again in Matlab unless we can resolve this
> problem - it currently looks very unprofessional.
>
> I would appreciate any pointers on where to look to try to resolve this.
>
> Thanks
>
> Robin
>
> On Thu, Jul 10, 2008 at 11:58 PM, Robin <ro...@gm...> wrote:
> > Hi,
> >
> > I have a problem with legends where the vertical spacing is sometimes
> > a bit funny (lines don't seem to be evenly spaced).
> >
> > I am now preparing some figures for publication and this is the last
> > niggle I'd really like to resolve.
> >
> > Is there anything I could do to fix this?
> >
> > A small example is attached (I cropped it to just the legend to reduce
> > file size).
> >
> > I am setting the label on the bars I am plotting and then just calling
> > ax.legend()
> >
> > At the risk of putting two queries in one email the only other problem
> > I have regularly is that small figures resize themselves when the
> > mouse rolls over them. I am using TkAgg backend on OS X but I think it
> > happens on other platforms as well. On mouse over the window jiggles
> > and resizes slightly. When I am saving figures I have to be careful to
> > call savefig from the command line without touching the window with
> > the mouse to ensure they save as the correct size. Just wondered if it
> > was a known issue...
> >
> > Apart from these minor things though matplotlib has been performing
> > great!
> >
> > Thanks,
> >
> > Robin
>
> -------------------------------------------------------------------------
> 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: Robin <ro...@gm...> - 2008年08月18日 12:47:19
Hi,
I was wondering if anyone was able to help with this problem of
incorrect legend alignment.
I am not sure if the original mail did not get through, perhaps
because of the attachent, so this time I have put the example here:
http://acrids.robince.net/robince/bad_legend.pdf
Publication is now imminent and I have a horible feeling I am going to
have to do all the plots again in Matlab unless we can resolve this
problem - it currently looks very unprofessional.
I would appreciate any pointers on where to look to try to resolve this.
Thanks
Robin
On Thu, Jul 10, 2008 at 11:58 PM, Robin <ro...@gm...> wrote:
> Hi,
>
> I have a problem with legends where the vertical spacing is sometimes
> a bit funny (lines don't seem to be evenly spaced).
>
> I am now preparing some figures for publication and this is the last
> niggle I'd really like to resolve.
>
> Is there anything I could do to fix this?
>
> A small example is attached (I cropped it to just the legend to reduce
> file size).
>
> I am setting the label on the bars I am plotting and then just calling
> ax.legend()
>
> At the risk of putting two queries in one email the only other problem
> I have regularly is that small figures resize themselves when the
> mouse rolls over them. I am using TkAgg backend on OS X but I think it
> happens on other platforms as well. On mouse over the window jiggles
> and resizes slightly. When I am saving figures I have to be careful to
> call savefig from the command line without touching the window with
> the mouse to ensure they save as the correct size. Just wondered if it
> was a known issue...
>
> Apart from these minor things though matplotlib has been performing great!
>
> Thanks,
>
> Robin
>
From: Alan G I. <ai...@am...> - 2008年08月18日 11:59:32
Chris Fonnesbeck wrote:
> I'm trying to track down a function/recipe for generating a multivariate 
> scatter plot. I'm thinking of something similar to what you get in R if 
> you call plot on a multivariate data frame:
> http://mt11.quickshareit.com/share/rplotb1a70.pdf 
Yes, that would be really useful. I started something
in PyX awhile back (below, MIT license). Not beautiful, but
functions. Please post if you develop something nice.
Alan
import numpy as np
from pyx import canvas, graph
data = np.random.random((3,10))
def scatter_plot_matrix(group,figwidth=18,hsep=1,vsep=1):
 g_len = len(group)
 subplot_size = (figwidth - (g_len-1)*hsep)/g_len
 c = canvas.canvas()
 g_id = range(g_len)
 xlinks = []
 for yi in g_id[::-1]:
 for xi in g_id:
 xseries = group[xi]
 yseries = group[yi]
 if xi == 0:
 ylinkaxis = None
 else:
 ylinkaxis = graph.axis.linkedaxis(ylink.axes["y"])
 if yi == g_len-1:
 xlinkaxis = None
 else:
 xlinkaxis = graph.axis.linkedaxis(xlinks[xi].axes["x"])
 newgraph = c.insert(graph.graphxy(width=subplot_size, 
height=subplot_size,
 xpos=(subplot_size+hsep)*xi,
 ypos=(subplot_size+vsep)*(g_len-1-yi),
 x = (xlinkaxis or graph.axis.linear()),
 y = (ylinkaxis or graph.axis.linear()),
 )
 )
 newgraph.plot(graph.data.list(zip(xseries,yseries), x=1, y=2))
 if xi == 0:
 ylink = newgraph
 if yi == g_len -1:
 xlinks.append( newgraph )
 return c
test1 = scatter_plot_matrix(data)
test1.writeEPSfile("c:/temp/temp.eps")
From: Lionel R. <lro...@li...> - 2008年08月18日 09:13:07
Attachments: windrose_oo.py
Hi,
sorry for the latency, holidays just finished :-(
Find with this message a modified version of windrose_oo, but I'm not 
very familiar with the new projections facilities, and then the code is 
buggy :
##############################
Traceback (most recent call last):
 File "windrose_oo.py", line 464, in <module>
 ax = WindroseAxes(fig, rect, axisbg='w')
 File "windrose_oo.py", line 33, in __init__
 PolarAxes.__init__(self, *args, **kwargs)
 File 
"/usr/lib/python2.5/site-packages/matplotlib/projections/polar.py", line 
171, in __init__
 Axes.__init__(self, *args, **kwargs)
 File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 529, 
in __init__
 self.cla()
 File "windrose_oo.py", line 47, in cla
 PolarAxes.cla(self)
 File 
"/usr/lib/python2.5/site-packages/matplotlib/projections/polar.py", line 
177, in cla
 Axes.cla(self)
 File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 771, 
in cla
 self.xaxis.cla()
AttributeError: 'NoneType' object has no attribute 'cla'
#############################
I don't understand why this problem occurs, if someone can the mistake, 
I'll appreciate :-)
Thanks
Christopher Barker a écrit :
> Lionel Roubeyrie wrote:
>> find with this message a modified version of windrose to be OO 
>> compliant. 
>
> Lionel,
>
> I've had this message of yours (from March), and finally had a chance 
> to use it.
>
> Unfortunately, it seems to use the old Transforms mechanism, so won't 
> work with the latest MPL.
>
> have you ported it over yet? Can anyone else help out with a port?
>
> Thanks,
>
> -Chris
>
>
>
>
>
-- 
Lionel Roubeyrie - lro...@li...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Chris F. <lis...@ma...> - 2008年08月18日 08:40:08
I'm trying to track down a function/recipe for generating a multivariate 
scatter plot. I'm thinking of something similar to what you get in R if
you call plot on a multivariate data frame:
http://mt11.quickshareit.com/share/rplotb1a70.pdf
Is there anything obvious here? It seems like something that would get a
lot of use, for exploring large datasets, etc.
Thanks,
cf
From: Chris F. <lis...@ma...> - 2008年08月18日 08:33:42
Nathaniel Virgo <nathanielvirgo@...> writes:
> 
> Hi allI'm having trouble installing on OS X. The short story is it looks 
like something file is trying to build something for a ppc architecture when 
I'm on an Intel mac.Here's the long story:First I downloaded the 
matplotlib-0.99.3-py2.5-macosx-10.3.egg file 
but it complained that I didn't have numpy 1.1 as the version that comes with 
OS X is 1.0.1. 
Hi Nathaniel,
I have an installer script that gives you recent builds of numpy, scipy and
 matplotlib, all installed from egg archives. It works well with MacPython, so 
you might want to try it:
http://macinscience.com
cf
From: izak m. <iza...@ya...> - 2008年08月18日 06:28:20
Hi,
Please do not underestimate the usefulness of this feature of Matlab. I am working on my PhD which is a long term project and requires many figures in the final dissertation. It very convenient in Matlab to be able to make small adjustment to plots you generated a year ago by simply opening the .fig file. Often, when working with my matplotlib plots, I'd have to go back and re-generate the plots, which may require a lenghty simulation or familiarising yourself with scripts you wrote a year ago.
The good pdf support in inkscape and the ability to save to svg from matplotlib somewhat alleviates this, but there are still many adjustments which require regenrating the original plot and many little errors that creep in because of incomplete support for the pdf format in inkscape.
Regards
Izak
----- Original Message ----
From: Eric Firing <ef...@ha...>
To: Elaine Angelino <ela...@gm...>
Cc: matplotlib-users <mat...@li...>
Sent: Sunday, August 17, 2008 1:22:09 AM
Subject: Re: [Matplotlib-users] saving a figure
Elaine Angelino wrote:
> hi there,
> 
> in matlab, it is possible to save a matlab .fig file that can be opened 
> directly by matlab (and which you can then interact with and edit, for 
> example change the title, etc.). is it possible to do something 
> analogous in matplotlib?
> 
> thanks very much
> 
> elaine
Elaine,
No, this is not possible in mpl. It has been requested before, and 
there has been some discussion, but I don't think it is high on anyone's 
priority list. Personally, I never used that functionality when I used 
Matlab, so I don't miss it.
Eric
-------------------------------------------------------------------------
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 19 results of 19

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