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

Showing 12 results of 12

From: Jeremy C. <jlc...@gm...> - 2010年07月30日 21:07:29
I recently installed MPL on two Macs, one running 10.6 and another
running 10.5. When I try to plot, I get the following error:
TclError: couldn't open
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/images/home.ppm":
permission denied
After checking, it's true that only the owner has read permissions.
This is easy enough on my end, but I wonder if there is a problem with
the distributed installer that should have the correct permissions for
these images.
Has anyone else seen this problem or is it just me?
Jeremy
From: william r. <wil...@gm...> - 2010年07月30日 19:49:04
Thanks!
On Fri, Jul 30, 2010 at 2:49 PM, Jeff Whitaker <js...@fa...> wrote:
> On 7/30/10 12:38 PM, william ratcliff wrote:
>
>> building 'mpl_toolkits.natgrid._natgrid' extension
>> c:\Program Files\pythonxy\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall
>> -Isrc -Ic
>> :\python25\include -Ic:\python25\PC -c src\natgridd.c -o
>> build\temp.win32-2.5\Re
>> lease\src\natgridd.o
>> src\natgridd.c:17:26: ncarg/ngmath.h: No such file or directory
>> src\natgridd.c: In function `c_natgridd':
>> src\natgridd.c:25: warning: 'x_sav' might be used uninitialized in this
>> function
>>
>> src\natgridd.c:25: warning: 'y_sav' might be used uninitialized in this
>> function
>>
>> src\natgridd.c:25: warning: 'z_sav' might be used uninitialized in this
>> function
>>
>> src\natgridd.c:26: warning: 'n_sav' might be used uninitialized in this
>> function
>>
>> error: command 'gcc' failed with exit status 1
>>
>> OK, there was a header missing from MANIFEST.in. Just uploaded a 0.2.1
> tar file to sourceforege.
>
>
> -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: Ryan M. <rm...@gm...> - 2010年07月30日 19:46:32
On Jul 30, 2010, at 14:34, Nikolaus Rath <Nik...@ra...> wrote:
> Hi,
> 
> Consider this:
> 
> X = np.linspace(0.70, 1.1, 100)
> Y = np.linspace(-1.19, 1.19, 70)
> (Xs, Ys) = np.meshgrid(X, Y)
> Z = np.sqrt((Xs-0.9)**2 + Ys**2) - 0.10
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.contour(X, Y, Z)
> fig.show()
> 
> This works, but gives the y axis a different scale than the x axis so
> the ellipses look like circles.
> 
> How can I get the same scale for the x- and y-axis?
> 
> I tried to set ax.set_autoscale_on(False), but that resulted in a
> totally different part of the coordinate system being 
Try:
ax.set_aspect('equal')
Ryan
From: Nikolaus R. <Nik...@ra...> - 2010年07月30日 19:34:47
Hi,
Consider this:
X = np.linspace(0.70, 1.1, 100)
Y = np.linspace(-1.19, 1.19, 70)
(Xs, Ys) = np.meshgrid(X, Y)
Z = np.sqrt((Xs-0.9)**2 + Ys**2) - 0.10
fig = plt.figure()
ax = fig.add_subplot(111)
ax.contour(X, Y, Z)
fig.show()
This works, but gives the y axis a different scale than the x axis so
the ellipses look like circles.
How can I get the same scale for the x- and y-axis?
I tried to set ax.set_autoscale_on(False), but that resulted in a
totally different part of the coordinate system being shown.
Thanks,
 -Nikolaus
-- 
 »Time flies like an arrow, fruit flies like a Banana.«
 PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
From: Jeff W. <js...@fa...> - 2010年07月30日 19:28:03
 On 7/30/10 12:21 PM, william ratcliff wrote:
> Is it just me, or are some of the headers missing in the mpl-toolkit 
> on source-forge required to build natgrid 0.2? 
Works for me. Can you be more specific (what's the compilation error?)
-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: Jeff W. <js...@fa...> - 2010年07月30日 18:49:46
 On 7/30/10 12:38 PM, william ratcliff wrote:
> building 'mpl_toolkits.natgrid._natgrid' extension
> c:\Program Files\pythonxy\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall 
> -Isrc -Ic
> :\python25\include -Ic:\python25\PC -c src\natgridd.c -o 
> build\temp.win32-2.5\Re
> lease\src\natgridd.o
> src\natgridd.c:17:26: ncarg/ngmath.h: No such file or directory
> src\natgridd.c: In function `c_natgridd':
> src\natgridd.c:25: warning: 'x_sav' might be used uninitialized in 
> this function
>
> src\natgridd.c:25: warning: 'y_sav' might be used uninitialized in 
> this function
>
> src\natgridd.c:25: warning: 'z_sav' might be used uninitialized in 
> this function
>
> src\natgridd.c:26: warning: 'n_sav' might be used uninitialized in 
> this function
>
> error: command 'gcc' failed with exit status 1
>
OK, there was a header missing from MANIFEST.in. Just uploaded a 0.2.1 
tar file to sourceforege.
-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: william r. <wil...@gm...> - 2010年07月30日 18:38:22
building 'mpl_toolkits.natgrid._natgrid' extension
c:\Program Files\pythonxy\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc
-Ic
:\python25\include -Ic:\python25\PC -c src\natgridd.c -o
build\temp.win32-2.5\Re
lease\src\natgridd.o
src\natgridd.c:17:26: ncarg/ngmath.h: No such file or directory
src\natgridd.c: In function `c_natgridd':
src\natgridd.c:25: warning: 'x_sav' might be used uninitialized in this
function
src\natgridd.c:25: warning: 'y_sav' might be used uninitialized in this
function
src\natgridd.c:25: warning: 'z_sav' might be used uninitialized in this
function
src\natgridd.c:26: warning: 'n_sav' might be used uninitialized in this
function
error: command 'gcc' failed with exit status 1
On Fri, Jul 30, 2010 at 2:27 PM, Jeff Whitaker <js...@fa...> wrote:
> On 7/30/10 12:21 PM, william ratcliff wrote:
>
>> Is it just me, or are some of the headers missing in the mpl-toolkit on
>> source-forge required to build natgrid 0.2?
>>
> Works for me. Can you be more specific (what's the compilation error?)
>
> -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: william r. <wil...@gm...> - 2010年07月30日 18:21:44
Is it just me, or are some of the headers missing in the mpl-toolkit on
source-forge required to build natgrid 0.2?
From: Eric F. <ef...@ha...> - 2010年07月30日 17:09:42
On 07/29/2010 05:52 AM, bobnojio wrote:
>
> I am trying to figure out how to set 'buffers' or something of the sort on my
> matplotlib plots, so that my first and last data points are not centered
> exactly on the left and right border of the axis.
> my Y axis does this just fine (integer data), but my X axis has no
> buffer/margin what soever.
If you are using, or can upgrade to, mpl 1.0, then you can use the 
margins() Axes method or pyplot function.
Otherwise, you can use the Axes get_xlim and set_xlim methods, or the 
pyplot xlim function, to manually add to the x-axis boundaries. For 
example,
plot([1.1, 5.2], 'ro')
x0, x1 = xlim()
dx = 0.02 * (x1 - x0)
xlim(x0-dx, x1+dx)
Eric
>
>
> my graphing routine is as such (most fields are variables) any help is
> appreciated!:
> PlotVar.set_xlabel(xlabel)
> PlotVar.set_ylabel(ylabel)
> PlotVar.set_title(title)
> PlotVar.plot(data[xtarget][np.isfinite(data[ytarget1])],
> data[ytarget1][np.isfinite(data[ytarget1])], '-o', ms=6, lw=2, alpha=0.5,
> mfc='orange', label=label1)
> PlotVar.plot(data[xtarget][np.isfinite(data[ytarget2])],
> data[ytarget2][np.isfinite(data[ytarget2])], '-o', ms=6, lw=2, alpha=0.5,
> mfc='red', label=label2)
> PlotVar.xaxis.set_major_locator(xdays)
> PlotVar.xaxis.set_major_formatter(DateFormatter('%m-%d'))
> PlotVar.xaxis.set_minor_locator(xhours)
> PlotVar.fmt_xdata = DateFormatter('%m-%d')
> figVar.autofmt_xdate(rotation=-90, ha='left')
> highY1 =
> max(data[ytarget1][np.isfinite(data[ytarget1])])
> lowY1 =
> min(data[ytarget1][np.isfinite(data[ytarget1])])
> highY2 =
> max(data[ytarget2][np.isfinite(data[ytarget2])])
> lowY2 =
> min(data[ytarget2][np.isfinite(data[ytarget2])])
> maxvalue = max(highY1, highY2)
> minvalue = min(lowY1, lowY2)
>
> PlotVar.yaxis.set_major_locator(mticker.MultipleLocator(base=round(((maxvalue
> - minvalue)/10),3)))
>
> PlotVar.yaxis.set_minor_locator(mticker.MultipleLocator(base=round(((maxvalue
> - minvalue)/40),5)))
> plt.legend(loc='best',
> prop=matplotlib.font_manager.FontProperties(size=10))
> PlotVar.grid()
> figVar.savefig(saveto)
From: Waléria A. D. <wal...@gm...> - 2010年07月30日 12:31:44
Hi Paul,
Thank you very much..
You tip helped me a lot, problem solved.
Thank you
On Thu, Jul 29, 2010 at 9:47 PM, <PH...@ge...> wrote:
> Whoops. That didn’t stick like I thought it would. Try here:
> http://pastebin.com/rJtUuWne
>
> -paul
>
>
>
> *From:* Paul Hobson
> *Sent:* Thursday, July 29, 2010 5:46 PM
> *To:* Waléria Antunes David; mat...@li...
> *Subject:* RE: [Matplotlib-users] Matplotlib-users Digest, Vol 50, Issue
> 80
>
>
>
> I submitted a correction to the code in your pastebin link below. Revisit
> the link (http://pastebin.com/vSbkXDzE) and run that code.
>
> -paul
>
>
>
> -------------------------
>
> *From:* Waléria Antunes David [mailto:wal...@gm...]
> *Sent:* Thursday, July 29, 2010 12:08 PM
> *To:* mat...@li...
> *Subject:* Re: [Matplotlib-users] Matplotlib-users Digest, Vol 50, Issue
> 80
>
>
>
> Hi ,
>
> I made the changes as bellow and it displays the x-axis values formatted as
> expected, see my current image and my code. But, now i need to change the
> scale and the numbers of decimal places in order to appear on the graph like
> this: 3.0 3.1 3.2 ...... 3.4
>
> My code: http://pastebin.com/vSbkXDzE
>
> Can you help me?
>
>
>
>
>
From: <PH...@Ge...> - 2010年07月30日 00:58:54
Whoops. That didn't stick like I thought it would. Try here: http://pastebin.com/rJtUuWne
-paul
From: Paul Hobson
Sent: Thursday, July 29, 2010 5:46 PM
To: Waléria Antunes David; mat...@li...
Subject: RE: [Matplotlib-users] Matplotlib-users Digest, Vol 50, Issue 80
I submitted a correction to the code in your pastebin link below. Revisit the link (http://pastebin.com/vSbkXDzE) and run that code.
-paul
-------------------------
From: Waléria Antunes David [mailto:wal...@gm...]
Sent: Thursday, July 29, 2010 12:08 PM
To: mat...@li...
Subject: Re: [Matplotlib-users] Matplotlib-users Digest, Vol 50, Issue 80
Hi ,
I made the changes as bellow and it displays the x-axis values formatted as expected, see my current image and my code. But, now i need to change the scale and the numbers of decimal places in order to appear on the graph like this: 3.0 3.1 3.2 ...... 3.4
My code: http://pastebin.com/vSbkXDzE
Can you help me?
From: <PH...@Ge...> - 2010年07月30日 00:58:53
I submitted a correction to the code in your pastebin link below. Revisit the link (http://pastebin.com/vSbkXDzE) and run that code.
-paul
-------------------------
From: Waléria Antunes David [mailto:wal...@gm...]
Sent: Thursday, July 29, 2010 12:08 PM
To: mat...@li...
Subject: Re: [Matplotlib-users] Matplotlib-users Digest, Vol 50, Issue 80
Hi ,
I made the changes as bellow and it displays the x-axis values formatted as expected, see my current image and my code. But, now i need to change the scale and the numbers of decimal places in order to appear on the graph like this: 3.0 3.1 3.2 ...... 3.4
My code: http://pastebin.com/vSbkXDzE
Can you help me?

Showing 12 results of 12

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