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

Showing 13 results of 13

From: John H. <jdh...@ac...> - 2005年09月27日 23:56:41
>>>>> "Jeff" == Jeff Peery <jef...@se...> writes:
 Jeff> Is there something for plot() that rotates the axes. I know
 Jeff> I can simply switch the variables like so: plot(x,y) and
 Jeff> plot(y,x), but I have a 1D array and I don't want to add a
 Jeff> second array for the element number. Is there a keyword like
 Jeff> rotate=90 as there is for text? Thanks.
There is no built-in support for rotating axes. If you are averse to
defining your own x array, I suggest writing a helper function
def plot90(y, **kwargs):
 x = arange(len(y), typecode=Float)
 return plot(y, x, **kwargs)
JDH
From: Charlie M. <cw...@gm...> - 2005年09月27日 21:24:29
Is there a reason that anti-aliasing it disabled by default on quiver?
Line 893 of axes.py =3D=3D "antialiaseds =3D (0,),"
quiver looks SO much better when this is enabled. If there is no
opposition I would like to make this default in cvs.
Thanks,
 Charlie
From: Robert K. <rk...@uc...> - 2005年09月27日 20:11:09
Chris Fonnesbeck wrote:
> I have successfully built and installed wxPython, so that I can use the
> WXAgg backend for matplotlib. Now, trying to build matplotlib, I get the
> following error:
> 
> /usr/bin/g++ -bundle -undefined dynamic_lookup build/temp.darwin-
> 8.2.0-Power_Macintosh-2.4/src/_na_transforms.o
> build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/mplutils.o
> build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o
> build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o
> build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o
> build/temp.darwin-8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o
> -L/usr/local/lib -L/usr/lib -lstdc++ -lm -o
> build/lib.darwin-8.2.0-Power_Macintosh-2.4/matplotlib/_na_transforms.so
> ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o
> illegal reference for -dynamic code (section difference reference from
> section (__TEXT,__eh_frame) relocation entry (20) to symbol:
> __ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_ defined in
> dylib: /usr/local/lib/libstdc++.dylib)
> ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o
> illegal reference for -dynamic code (section difference reference from
> section (__TEXT,__eh_frame) relocation entry (24) to symbol:
> __ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_ defined in dylib:
> /usr/local/lib/libstdc++.dylib)
> error: command '/usr/bin/g++' failed with exit status 1
> 
> I am using gcc 3.3, and ActivePython 2.4.1.
> 
> Any ideas as to what is going wrong?
Try removing /usr/local/lib from your link path or get rid of
/usr/local/lib/libstdc++.* .
-- 
Robert Kern
rk...@uc...
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
 -- Richard Harter
From: Jeff P. <jef...@se...> - 2005年09月27日 17:46:28
Hello, I am trying to change the size and color of tick marks but I'm
having trouble.
 
Here's how I do it:
#tickmark attributes
 
setAttr(axes.xaxis.get_major_ticks(), size=2, color='g', visible=True)
 
 
I get an error indicating that size and color are not keywords. How can
I fix this? Thanks!
 
Jeff
 
 _____ 
Jeffrey Thomas Peery
SeaMetrics, Inc.
Mechanical Engineer 
Jef...@Se...
253.872.0285 (fax)
253.872.0284 (phone)
 _____ 
 
From: Chris B. <Chr...@no...> - 2005年09月27日 17:41:58
Chris Barker wrote:
> However, what doesn't seem to have any effect is changing the dpi of the 
> Figure. What's up John? shouldn't Figure.set_dpi effect the dpi of the 
> resulting PNG? I'm using MPL 0.83.1 on Linux. I'll go upgrade now, so if 
> this has been fixed, I guess you can ignore it.
FWIW, I just upgraded to 0.84, with exactly the same results.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Charlie M. <cw...@gm...> - 2005年09月27日 17:04:32
Nm, I misread you question. You can get the transform object and
possibly apply a rotation. (e.g. line2d.get_transform() from example).
 I don't know how to manipulate this from the top of my head though.
On 9/27/05, Charlie Moad <cw...@gm...> wrote:
> A pylab approach:
>
> line2d =3D plot(rand(10))[0]
>
> def swap(xdata, ydata):
> line2d.set_xdata(ydata)
> line2d.set_ydata(xdata)
> draw()
>
> swap(line2d.get_xdata(), line2d.get_ydata())
>
>
> On 9/27/05, Jeff Peery <jef...@se...> wrote:
> > Is there something for plot() that rotates the axes. I know I can
> > simply switch the variables like so: plot(x,y) and plot(y,x), but I
> > have a 1D array and I don't want to add a second array for the element
> > number. Is there a keyword like rotate=3D90 as there is for text? Thank=
s.
> >
> > Jeff
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Power Architecture Resource Center: Free content, downloads, discussion=
s,
> > and more. http://solutions.newsforge.com/ibmarch.tmpl
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> >
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
From: Chris B. <Chr...@no...> - 2005年09月27日 16:48:54
Attachments: MPL_size_test.py
John Hunter wrote:
>>>>>>"Yaroslav" == Yaroslav Bulatov <yar...@gm...> writes:
> Yaroslav> The only unresolved issue is how to make a large image
> Yaroslav> without also make all the lines thick. IE, if I do
> Yaroslav> savefig(dpi=400), I get a large image, but all the lines
> Yaroslav> are extremely thick.
> 
> Hmm, this should not make a difference. Eg, in the following example
> 
> >>> plot([1,2,3])
> >>> savefig('test100', dpi=100)
> >>> savefig('test600', dpi=600)
> 
> The relative linewidths look comparable.
I'm guessing the OP wanted to get an image with more pixels, but NOT 
have the lines be more pixels wide. I think this might help:
There are three parameters define an image size (this is not MPL specific):
Size in length units (inches, cm, pt, etc): i.e. 5"x7"
Size in pixels: i.e. 800x600 pixels
Dots per Inch (dpi) i.e. 100 dpi
Only two of these are independent, so if you define two of them, the 
third can be calculated from the others.
When displaying on a computer screen (or saved to a PNG), the size in 
length units is irrelevant, the pixels are simply displayed. When 
printed, or saved to PS, EPS or PDF (all designed to support printing), 
then the Size or dpi is used to determine how to scale the image.
Now I'm getting into how I think MPL works, but it turns out I'm wrong 
here. See the example below for a test. Note, this John, please correct 
this!
1) The size of a figure is defined in length units (inches), and can be 
set by:
Figure.set_figsize_inches( (w,h) )
2b) The layout of the figure is defined in "figure units" so it can be 
scaled by changing the figure size.
2) Size of text, width of lines, etc is defined in terms of length units 
(points?).
3) When displaying to the screen, or creating an image (PNG) the pixel 
size of text and line widths, etc is determined by the dpi setting, 
which is set by:
Figure.set_dpi( val )
The trick here is that when printing, it's natural to think in terms of 
inches, but when creating an image (for a web page, for instance), it 
is natural to think in terms of pixel size. However, AFAIK, MPL does not 
have a way to set the pixel size directly (remember that you can only 
set two of the three size parameters, the third must be calculated from 
the other two).
So, in the OPs case, I think what is wanted to create a large image in 
terms of pixel size, but not change hoe many pixels wide a line is. In 
theory, you could accomplish that by using:
Figure.set_figsize_inches( (w,h) )
Without changing the dpi. I've done a test case, and this works. 
However, what doesn't seem to have any effect is changing the dpi of the 
Figure. What's up John? shouldn't Figure.set_dpi effect the dpi of the 
resulting PNG? I'm using MPL 0.83.1 on Linux. I'll go upgrade now, so if 
this has been fixed, I guess you can ignore it.
-Chris
Enclosed is a sample script, and below are the results:
using MPL version: 0.83.1
DPI: 80.0
Size in Inches (7.9749999999999996, 5.6624999999999996)
Which should result in a 638 x 453 Image
DPI: 160.0
Size in Inches (7.9749999999999996, 5.6624999999999996)
Which should result in a 1276 x 906 Image
DPI: 160.0
Size in Inches (16.0, 12.0)
Which should result in a 2560 x 1920 Image
DPI: 80.0
Size in Inches (16.0, 12.0)
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Charlie M. <cw...@gm...> - 2005年09月27日 16:40:25
A pylab approach:
line2d =3D plot(rand(10))[0]
def swap(xdata, ydata):
line2d.set_xdata(ydata)
line2d.set_ydata(xdata)
draw()
swap(line2d.get_xdata(), line2d.get_ydata())
On 9/27/05, Jeff Peery <jef...@se...> wrote:
>
> Is there something for plot() that rotates the axes. I know I can
> simply switch the variables like so: plot(x,y) and plot(y,x), but I
> have a 1D array and I don't want to add a second array for the element
> number. Is there a keyword like rotate=3D90 as there is for text? Thanks.
>
> Jeff
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jeff P. <jef...@se...> - 2005年09月27日 16:37:00
Thanks. Will that work for the WXAgg backend?
 
-----Original Message-----
From: Charlie Moad [mailto:cw...@gm...] 
Sent: Tuesday, September 27, 2005 9:34 AM
To: Jeff Peery
Cc: mat...@li...
Subject: Re: [Matplotlib-users] rotating a plot using 'rotate' keyword?
 
A pylab approach:
line2d = plot(rand(10))[0]
def swap(xdata, ydata):
 line2d.set_xdata(ydata)
 line2d.set_ydata(xdata)
 draw()
swap(line2d.get_xdata(), line2d.get_ydata())
On 9/27/05, Jeff Peery <jef...@se...> wrote: 
Is there something for plot() that rotates the axes. I know I can
simply switch the variables like so: plot(x,y) and plot(y,x), but I 
have a 1D array and I don't want to add a second array for the element
number. Is there a keyword like rotate=90 as there is for text? Thanks.
Jeff
------------------------------------------------------- 
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl 
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
From: Chris F. <fon...@gm...> - 2005年09月27日 16:16:56
I have successfully built and installed wxPython, so that I can use the
WXAgg backend for matplotlib. Now, trying to build matplotlib, I get the
following error:
/usr/bin/g++ -bundle -undefined dynamic_lookup build/temp.darwin-
8.2.0-Power_Macintosh-2.4/src/_na_transforms.o build/temp.darwin-
8.2.0-Power_Macintosh-2.4/src/mplutils.o build/temp.darwin-
8.2.0-Power_Macintosh-2.4/CXX/cxx_extensions.o build/temp.darwin-
8.2.0-Power_Macintosh-2.4/CXX/cxxsupport.o build/temp.darwin-
8.2.0-Power_Macintosh-2.4/CXX/IndirectPythonInterface.o build/temp.darwin-
8.2.0-Power_Macintosh-2.4/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib
-lstdc++ -lm -o build/lib.darwin-
8.2.0-Power_Macintosh-2.4/matplotlib/_na_transforms.so
ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o illega=
l
reference for -dynamic code (section difference reference from section
(__TEXT,__eh_frame) relocation entry (20) to symbol:
__ZSt21_Rb_tree_rotate_rightPSt18_Rb_tree_node_baseRS0_ defined in dylib:
/usr/local/lib/libstdc++.dylib)
ld: build/temp.darwin-8.2.0-Power_Macintosh-2.4/src/_na_transforms.o illega=
l
reference for -dynamic code (section difference reference from section
(__TEXT,__eh_frame) relocation entry (24) to symbol:
__ZSt20_Rb_tree_rotate_leftPSt18_Rb_tree_node_baseRS0_ defined in dylib:
/usr/local/lib/libstdc++.dylib)
error: command '/usr/bin/g++' failed with exit status 1
I am using gcc 3.3, and ActivePython 2.4.1.
Any ideas as to what is going wrong?
From: Jeff P. <jef...@se...> - 2005年09月27日 15:32:32
Is there something for plot() that rotates the axes. I know I can
simply switch the variables like so: plot(x,y) and plot(y,x), but I
have a 1D array and I don't want to add a second array for the element
number. Is there a keyword like rotate=90 as there is for text? Thanks.
Jeff
From: Noel F. <noe...@me...> - 2005年09月27日 08:15:21
Attachments: noel.faux.vcf
Hi all,
I'm very new to python and matplotlib! I'm wanting to boxplot two 
distributions with diff number of observations. At the moment I can do 
two subplots, but this makes comparisons difficult. Dose anyone have 
any suggestions? I would also like to have a label for each plot on the 
y-axis, if it's plotted horizontally.
A colleague of mine suggested to concatenate the arrays along axis 1, 
but as the arrays are of different sizes, this dose not work.
I can do this in R, but I was told to give matplotlib a go :)
Cheers
Noel
From: John H. <jdh...@ac...> - 2005年09月27日 02:25:40
>>>>> "Yaroslav" == Yaroslav Bulatov <yar...@gm...> writes:
 Yaroslav> For future reference, below is one way I found to do
 Yaroslav> that. It looks like
 Yaroslav> http://web.engr.oregonstate.edu/~bulatov/normal_grid.png
 Yaroslav> I could make this self-contained for the examples.zip if
 Yaroslav> needed
Yes this would be very nice; perhaps you could make a wiki entry?
 Yaroslav> The only unresolved issue is how to make a large image
 Yaroslav> without also make all the lines thick. IE, if I do
 Yaroslav> savefig(dpi=400), I get a large image, but all the lines
 Yaroslav> are extremely thick.
Hmm, this should not make a difference. Eg, in the following example
 >>> plot([1,2,3])
 >>> savefig('test100', dpi=100)
 >>> savefig('test600', dpi=600)
The relative linewidths look comparable.
JDH

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