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




Showing 11 results of 11

From: Andrea G. <and...@ti...> - 2006年02月10日 21:06:35
Hello NG,
 I have a couple of questions regardin a simple app that I have created,
which uses wxPython + mpl. Basically the problem is as follows:
- The user can plot a certain property (let's say velocity) versus time; the
time variable can be a floating number, but it can also be displayed as a
date. As long as the time variable is a float and I don't have more than 2
subplots for every "row" of subplots, everything seems good. But, if I use
"date" as X-variable and I have 2 or more subplots in one row, there is no
more room for all the ticks in one subplot to be displayed correctly (they
overlap one over the other, is a mess).
- The option of using rotated ticks is nice as long as I have only 1
subplot. For more subplots, it looks messy.
- After the user has finished the plot formatting, I create a series of
figures (they are the same as for the layout, but they contain different
data) and I embed them in MS Word or Powerpoint using win32com.
Now, the questions:
1) Based on subplot size (and I don't know how to retrieve a single subplot
size in inches or pixels or whatever), is there a way to calculate the
"best" number of X-ticks that can fit into the X-axis without overlapping? I
am thinking about binding a wx.EVT_SIZE for the displayed figure, but
obviously this will not work for the saved figures (I use Agg to save
figures);
2) I have a time interval on the X-axis. If the time interval spans about
5-6 years, I would like to tick every year (say every January, 1) the X-axis
as long as there is enough room to tick them; if there is not enough space,
I would like to tick once every 2 years and put a minor tick between the
major ticks.
3) When I use 2 Y-axes (as in two_scales.py) the "auto" legend location does
not consider data on the second axis when it calculates the best legend
position. So I end up with a legend that "stays away" from lines that
belongs on first Y-axis but it overlaps the lines plotted on the second
Y-axis;
4) Does anyone know if there is an easy way to fix the two_scales problem
mentioned in a previous thread:
http://sourceforge.net/mailarchive/forum.php?thread_id=9639992&forum_id=33405
?
Thank you very much for every idea/suggestion.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77
From: John H. <jdh...@ac...> - 2006年02月10日 17:18:24
>>>>> "aurelien" == aurelien gourrier <aur...@fr...> writes:
 aurelien> Dear all, I posted a message two days ago mentionning
 aurelien> memory problems while saving a large number of images,
 aurelien> which I guess was not so clear... I've worked a bit on
 aurelien> it and I think the questions seem clearer to me now. I
 aurelien> have paid particular attention to the threads in the
 aurelien> user mailing list dealing with memory problems.
What happens if you explicitly name the figure (ef figure(1)) 
for i in range(indEnd):
 figure(1)
 subplot(221)
 plot(ind, xx)
 subplot(222)
 X = rand(50,50)
 
 imshow(X)
 subplot(223)
 scatter(rand(50), rand(50))
 subplot(224)
 pcolor(10*rand(50,50))
 savefig('tmp%d' % i, dpi = 75)
 close(1)
See also the FAQ http://matplotlib.sourceforge.net/faq.html#LEAKS
which shows the canonical way to make multiple plots to prevent leaks,
namely, pairing a close with each figure creation?
I'm not sure why you are seeing a problem right now, but my memory
leak test script memleak_hawaii3.py does not appear to be leaking
#!/usr/bin/env python
import os, sys, time
import matplotlib
#matplotlib.interactive(True)
#matplotlib.use('Cairo')
matplotlib.use('Agg')
from pylab import *
def report_memory(i):
 pid = os.getpid()
 a2 = os.popen('ps -p %d -o rss,sz' % pid).readlines()
 print i, ' ', a2[1],
 return int(a2[1].split()[1])
# take a memory snapshot on indStart and compare it with indEnd
indStart, indEnd = 30, 201
for i in range(indEnd):
 figure(1); clf()
 subplot(221)
 t1 = arange(0.0, 2.0, 0.01)
 y = sin(2*pi*t1)
 plot(t1,y,'-')
 plot(t1, rand(len(t1)), 's', hold=True)
 subplot(222)
 X = rand(50,50)
 imshow(X)
 subplot(223)
 scatter(rand(50), rand(50), s=100*rand(50), c=rand(50))
 subplot(224)
 pcolor(10*rand(50,50))
 savefig('tmp%d' % i, dpi = 75)
 close(1)
 val = report_memory(i)
 if i==indStart: start = val # wait a few cycles for memory usage to stabilize
end = val
print 'Average memory consumed per loop: %1.4fk bytes\n' % ((end-start)/float(indEnd-indStart))
From: Darren D. <dd...@co...> - 2006年02月10日 14:38:35
Hi Nils,
On Friday 10 February 2006 09:29, Nils Wagner wrote:
> Hi all,
>
> When importing matplotlib I get
>
> >>> import matplotlib
>
> /usr/lib64/python2.4/site-packages/matplotlib/__init__.py:924:
> UserWarning: Bad val "medium" on line #112
> "font.size : medium"
> in file "/home/nwagner/.matplotlib/matplotlibrc"
> Could not convert "medium" to float
> warnings.warn('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' %
> (
>
> I guess I should remove the line containing
>
> font.size : medium
>
> from my matplotlibrc. Is that correct ?
I posted to matplotlib-users warning about this change just last night: 
http://sourceforge.net/mailarchive/forum.php?thread_id=9687650&forum_id=33405, 
and I posted a note in the CHANGELOG. Just set font.size : 12.0.
Darren
From: Nils W. <nw...@me...> - 2006年02月10日 14:29:54
Hi all,
When importing matplotlib I get
>>> import matplotlib
/usr/lib64/python2.4/site-packages/matplotlib/__init__.py:924:
UserWarning: Bad val "medium" on line #112
 "font.size : medium"
 in file "/home/nwagner/.matplotlib/matplotlibrc"
 Could not convert "medium" to float
 warnings.warn('Bad val "%s" on line #%d\n\t"%s"\n\tin file "%s"\n\t%s' % (
I guess I should remove the line containing
font.size : medium
from my matplotlibrc. Is that correct ?
Nils
 
From: Charlie M. <cw...@gm...> - 2006年02月10日 14:22:21
Just a quick suggestion. Since you are using pylab and you don't
really show a need to recreate a figure everytime, just use "fig1 =3D
pylab.gcf()" and don't delete it at the end. Reusing current memory
is always going to help prevent leaks.
On 2/10/06, aur...@fr... <aur...@fr...> wrote:
> Dear all,
>
> I posted a message two days ago mentionning memory problems while saving =
a large
> number of images, which I guess was not so clear... I've worked a bit on =
it and
> I think the questions seem clearer to me now. I have paid particular atte=
ntion
> to the threads in the user mailing list dealing with memory problems.
>
> I use a function that generates arrays of typically 500x1380 elements.
> For each column, I transform the data and image them using imshow. I need=
n't
> display them, all I do is save them. I therefore wrote a function
> generateImshow which I show below.
>
> This function allows to produce about 300 out of 500 images and then cras=
hes. I
> therefore output the memory usage at each step. I run this from a pyWin s=
hell
> on windows XP using a 2.8GHz processor with 512 Kb memory. The result is =
shown
> below. The conclusions are the following :
>
> - each cycle leads to an increase of about 6Mb in memory usage, which exp=
lains
> why it crashes after some cycles
>
> - if I comment the line pylab.savefig(), then I only get an overall incre=
ase of
> about 0.6 Mb, which is a lot, but I can live with this
>
> - obviously, clf() does a good job in freeing memory, but calling the gar=
bage
> collector gc.collector does not help, nor does clearing the cached text a=
s
> suggested in one of the mails
>
> The problem clearly seems to originate from the savefig operation but I c=
an't
> figure out what's going on... anyone has a clue or an idea of how to over=
come
> the problem ?
>
> Cheers,
>
> Aur=E9lien
>
>
> ----
> def generateImshow(yarray,
> xscansize,yscansize,
> xscanstep,yscanstep,
> outputfilename,
> initimagesize =3D 10):
> '''Use this function to generate matplotlib images without displaying
> them'''
>
> #
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step1 ','%.2f' % val,' Mb\n'
>
> ##normalize file containing intensity correction factors
> #xlist, ylist =3D fileHandling(filename).readChi()
> ##fill in missing data if any
> #ylist.extend([0]*(scanx*scany-len(ylist)))
> #reshape according to scan
> yarray =3D na.reshape(yarray,(yscansize,-1))
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step2 ','%.2f' % val,' Mb'
>
> #build image via matplotlib
> ximagesize =3D xscansize*xscanstep
> yimagesize =3D yscansize*yscanstep
> xyimageratio =3D float(ximagesize)/yimagesize
> #print xyimageratio
> if xyimageratio > 1: ximagesize,yimagesize =3D
> initimagesize,initimagesize*xyimageratio
> else: ximagesize,yimagesize =3D initimagesize*xyimageratio,initimages=
ize
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step3 ','%.2f' % val,' Mb'
>
> fig1 =3D pylab.figure(figsize=3D(ximagesize,yimagesize),dpi=3D100)
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step4 ','%.2f' % val,' Mb'
>
> fig1.clear()
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step5 ','%.2f' % val,' Mb'
>
>
> #pylab.title('blahblah')
> im1 =3D pylab.imshow(yarray,
> origin=3D'lower',
> #interpolation=3D'nearest', #i.e. pixel
> interpolation=3D'bicubic', #i.e. smooth
> #vmin=3Dminvalue,
> #vmax=3Dmaxvalue,
> cmap =3D pylab.cm.bone,
> )
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step6 ','%.2f' % val,' Mb'
>
> colbar1 =3D pylab.colorbar()
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step7 ','%.2f' % val,' Mb'
>
> #pylab.bone()
> pylab.axis('off')
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step8 ','%.2f' % val,' Mb'
>
> #save figure
> #outputfilename =3D filename[:-4]+'.png'
> pylab.savefig(outputfilename)
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step9 ','%.2f' % val,' Mb'
>
> mpl.text.Text.cached =3D {}
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step10 ','%.2f' % val,' Mb'
>
> pylab.cla()
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step11 ','%.2f' % val,' Mb'
>
> del im1,colbar1 #doesn't bring anything
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step12 ','%.2f' % val,' Mb'
>
> pylab.close(fig1)
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step13 ','%.2f' % val,' Mb'
>
> #pylab.close('all')
> gc.collect()
>
> val =3D float(getMemoryUsage())/1000000
> print 'memory used for image - step14 ','%.2f' % val,' Mb'
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Result for three steps :
>
> memory used for image - step1 296.57 Mb
> memory used for image - step2 296.57 Mb
> memory used for image - step3 296.57 Mb
> memory used for image - step4 310.75 Mb
> memory used for image - step5 310.75 Mb
> memory used for image - step6 308.61 Mb
> memory used for image - step7 308.71 Mb
> memory used for image - step8 308.71 Mb
> memory used for image - step9 316.77 Mb
> memory used for image - step10 316.77 Mb
> memory used for image - step11 316.77 Mb
> memory used for image - step12 316.77 Mb
> memory used for image - step13 302.92 Mb
> memory used for image - step14 302.92 Mb
> total time =3D 1.64100003242
> done
> memory used 302.92 Mb
> building file ...
>
> memory used for image - step1 302.92 Mb
> memory used for image - step2 302.92 Mb
> memory used for image - step3 302.92 Mb
> memory used for image - step4 317.10 Mb
> memory used for image - step5 317.10 Mb
> memory used for image - step6 314.70 Mb
> memory used for image - step7 314.80 Mb
> memory used for image - step8 314.80 Mb
> memory used for image - step9 322.87 Mb
> memory used for image - step10 322.87 Mb
> memory used for image - step11 322.87 Mb
> memory used for image - step12 322.87 Mb
> memory used for image - step13 309.02 Mb
> memory used for image - step14 309.02 Mb
> total time =3D 1.65599989891
> done
> memory used 309.02 Mb
> building file ...
>
> memory used for image - step1 309.02 Mb
> memory used for image - step2 309.02 Mb
> memory used for image - step3 309.02 Mb
> memory used for image - step4 323.20 Mb
> memory used for image - step5 323.20 Mb
> memory used for image - step6 320.79 Mb
> memory used for image - step7 320.90 Mb
> memory used for image - step8 320.90 Mb
> memory used for image - step9 328.97 Mb
> memory used for image - step10 328.99 Mb
> memory used for image - step11 328.98 Mb
> memory used for image - step12 328.98 Mb
> memory used for image - step13 315.14 Mb
> memory used for image - step14 315.14 Mb
> total time =3D 1.875
> done
>
> --
> Just Aur=E9
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid=103432&bid#0486&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: <aur...@fr...> - 2006年02月10日 14:08:52
Dear all,
I posted a message two days ago mentionning memory problems while saving =
a large
number of images, which I guess was not so clear... I've worked a bit on =
it and
I think the questions seem clearer to me now. I have paid particular atte=
ntion
to the threads in the user mailing list dealing with memory problems.
I use a function that generates arrays of typically 500x1380 elements.
For each column, I transform the data and image them using imshow. I need=
n't
display them, all I do is save them. I therefore wrote a function
generateImshow which I show below.
This function allows to produce about 300 out of 500 images and then cras=
hes. I
therefore output the memory usage at each step. I run this from a pyWin s=
hell
on windows XP using a 2.8GHz processor with 512 Kb memory. The result is =
shown
below. The conclusions are the following :
- each cycle leads to an increase of about 6Mb in memory usage, which exp=
lains
why it crashes after some cycles
- if I comment the line pylab.savefig(), then I only get an overall incre=
ase of
about 0.6 Mb, which is a lot, but I can live with this
- obviously, clf() does a good job in freeing memory, but calling the gar=
bage
collector gc.collector does not help, nor does clearing the cached text a=
s
suggested in one of the mails
The problem clearly seems to originate from the savefig operation but I c=
an't
figure out what's going on... anyone has a clue or an idea of how to over=
come
the problem ?
Cheers,
Aur=E9lien
----
def generateImshow(yarray,
 xscansize,yscansize,
 xscanstep,yscanstep,
 outputfilename,
 initimagesize =3D 10):
 '''Use this function to generate matplotlib images without displaying
them'''
 #
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step1 ','%.2f' % val,' Mb\n'
 ##normalize file containing intensity correction factors
 #xlist, ylist =3D fileHandling(filename).readChi()
 ##fill in missing data if any
 #ylist.extend([0]*(scanx*scany-len(ylist)))
 #reshape according to scan
 yarray =3D na.reshape(yarray,(yscansize,-1))
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step2 ','%.2f' % val,' Mb'
 #build image via matplotlib
 ximagesize =3D xscansize*xscanstep
 yimagesize =3D yscansize*yscanstep
 xyimageratio =3D float(ximagesize)/yimagesize
 #print xyimageratio
 if xyimageratio > 1: ximagesize,yimagesize =3D
initimagesize,initimagesize*xyimageratio
 else: ximagesize,yimagesize =3D initimagesize*xyimageratio,initimages=
ize
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step3 ','%.2f' % val,' Mb'
 fig1 =3D pylab.figure(figsize=3D(ximagesize,yimagesize),dpi=3D100)
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step4 ','%.2f' % val,' Mb'
 fig1.clear()
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step5 ','%.2f' % val,' Mb'
 #pylab.title('blahblah')
 im1 =3D pylab.imshow(yarray,
 origin=3D'lower',
 #interpolation=3D'nearest', #i.e. pixel
 interpolation=3D'bicubic', #i.e. smooth
 #vmin=3Dminvalue,
 #vmax=3Dmaxvalue,
 cmap =3D pylab.cm.bone,
 )
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step6 ','%.2f' % val,' Mb'
 colbar1 =3D pylab.colorbar()
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step7 ','%.2f' % val,' Mb'
 #pylab.bone()
 pylab.axis('off')
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step8 ','%.2f' % val,' Mb'
 #save figure
 #outputfilename =3D filename[:-4]+'.png'
 pylab.savefig(outputfilename)
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step9 ','%.2f' % val,' Mb'
 mpl.text.Text.cached =3D {}
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step10 ','%.2f' % val,' Mb'
 pylab.cla()
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step11 ','%.2f' % val,' Mb'
 del im1,colbar1 #doesn't bring anything
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step12 ','%.2f' % val,' Mb'
 pylab.close(fig1)
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step13 ','%.2f' % val,' Mb'
 #pylab.close('all')
 gc.collect()
 val =3D float(getMemoryUsage())/1000000
 print 'memory used for image - step14 ','%.2f' % val,' Mb'
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Result for three steps :
memory used for image - step1 296.57 Mb
memory used for image - step2 296.57 Mb
memory used for image - step3 296.57 Mb
memory used for image - step4 310.75 Mb
memory used for image - step5 310.75 Mb
memory used for image - step6 308.61 Mb
memory used for image - step7 308.71 Mb
memory used for image - step8 308.71 Mb
memory used for image - step9 316.77 Mb
memory used for image - step10 316.77 Mb
memory used for image - step11 316.77 Mb
memory used for image - step12 316.77 Mb
memory used for image - step13 302.92 Mb
memory used for image - step14 302.92 Mb
total time =3D 1.64100003242
done
memory used 302.92 Mb
building file ...
memory used for image - step1 302.92 Mb
memory used for image - step2 302.92 Mb
memory used for image - step3 302.92 Mb
memory used for image - step4 317.10 Mb
memory used for image - step5 317.10 Mb
memory used for image - step6 314.70 Mb
memory used for image - step7 314.80 Mb
memory used for image - step8 314.80 Mb
memory used for image - step9 322.87 Mb
memory used for image - step10 322.87 Mb
memory used for image - step11 322.87 Mb
memory used for image - step12 322.87 Mb
memory used for image - step13 309.02 Mb
memory used for image - step14 309.02 Mb
total time =3D 1.65599989891
done
memory used 309.02 Mb
building file ...
memory used for image - step1 309.02 Mb
memory used for image - step2 309.02 Mb
memory used for image - step3 309.02 Mb
memory used for image - step4 323.20 Mb
memory used for image - step5 323.20 Mb
memory used for image - step6 320.79 Mb
memory used for image - step7 320.90 Mb
memory used for image - step8 320.90 Mb
memory used for image - step9 328.97 Mb
memory used for image - step10 328.99 Mb
memory used for image - step11 328.98 Mb
memory used for image - step12 328.98 Mb
memory used for image - step13 315.14 Mb
memory used for image - step14 315.14 Mb
total time =3D 1.875
done
--
Just Aur=E9
From: Charlie M. <cw...@gm...> - 2006年02月10日 12:10:39
 Wxpython comes preinstalled on 10.4 as does Tkinter. I am pretty
sure that the eggs that Chris has posted in addition to mine link
against those. You would probably need a custom build for
darwinports to play nice. I can't test any of this, so I may not be
much more help. Also, I have never tried gtkagg on osx since there is
no native gtk2 toolkit. I am sure it would work fine with
fink/darwinports gtk2 though under X11.app.
On 2/9/06, Graeme O'Keefe <gra...@pe...> wrote:
> Hi Charlie,
>
> I'm a bit new to the whole 'egg' thing.
>
> I retrieved the egg from Chris Fonnesbeck's homepage:
> http://homepage.mac.com/fonnesbeck/mac/
>
> Anyway, the matplotlib data files issue is resolved, I have a copy of
> mpl-data in my ~/.matplotlib directory now. It is picked up as default.
>
> I tried your egg, unfortunately, I've not been able to get wxWindows
> installed via darwinports.
> I tried TkAgg, problems as well (libJPEG conflict), so I look to have
> a stuffed setup from darwinports.
>
> Do you have a GTKAgg backend you could add the egg?
>
> regards,
>
> Graeme
>
> On 09/02/2006, at 11:14 PM, Charlie Moad wrote:
>
> > On 2/8/06, Graeme O'Keefe <gra...@pe...> wrote:
> >> I'm trying to migrate from numarray to numpy.
> >>
> >> By and large it is reasonably painless, substituting itemsize for
> >> itemsize()
> >> and numarray.mlab.squeeze/tri with numpy.squeeze/tri are all I have
> >> encountered so far.
> >>
> >> However, I have not been able to get the numpy distribution of
> >> matplotlib
> >> working on OS-X
> >>
> >> The matplotlib egg is installed to:
> >> /Library/Frameworks/Python.framework/Versions/Current/lib/
> >> python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-
> >> ppc.egg
> >> where I also have installed:
> >> numarray-1.5.1-py2.4-macosx-10.4-ppc.egg
> >> numpy-0.9.5.2053-py2.4-macosx-10.4-ppc.egg
> >> scipy-0.4.5.1597-py2.4-macosx-10.4-ppc.egg
> >>
> >>
> >> then
> >> % python
> >>>>> import pylab
> >> Traceback (most recent call last):
> >> File "<stdin>", line 1, in ?
> >> File
> >> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> >> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/
> >> pylab.py",
> >> line 1, in ?
> >> from matplotlib.pylab import *
> >> File
> >> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> >> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/
> >> matplotlib/__init__.py",
> >> line 744, in ?
> >> defaultParams =3D {
> >> File
> >> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> >> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/
> >> matplotlib/__init__.py",
> >> line 273, in wrapper
> >> ret =3D func(*args, **kwargs)
> >> File
> >> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
> >> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/
> >> matplotlib/__init__.py",
> >> line 434, in _get_data_path
> >> raise RuntimeError('Could not find the matplotlib data files')
> >> RuntimeError: Could not find the matplotlib data files
> >>
> >> BTW, are there eggs for freetype/py-gtk etc. I've been using
> >> darwinports
> >> till now.
> >
> > Did you build and install the egg yourself, or did you download it
> > from somewhere? Freetype won't have an egg since it is not a python
> > library. In my tests I was able to add libpng and libfreetype static
> > libraries to the matplotlib egg and it worked fine. If you want, you
> > can try eggs I have posted for 0.86:
> > http://euclid.uits.iupui.edu/~cmoad/mpleggs/ . The matplotlib one has
> > the static libs added, so I would be interested to know if it works
> > for you. I can update these as well if you would like.
> >
> > - Charlie
> >
>
>
From: Eric F. <ef...@ha...> - 2006年02月10日 07:52:26
Craig,
Craig Maloney wrote:
> Hi all.
> 
> I have 2 issues with the contour routine. I'm just giving it a 2D 
> array. The first issue which is not a show stopper, is that, it uses j 
> for the x position and i for the y-position (where my data is given by: 
> M[i][j]). This seems counter intuitive. Can I switch the convention 
> without transposing all the data?
No, you have to transpose the data. I could put in an option to 
determine this orientation, but I am not inclined to do so now. The 
present orientation follows Matlab, and is present in related functions 
such as imshow and pcolor. I presume the original rationale was to make 
everything follow the convention that just as a row of the array is 
printed from left to right, it should correspond to the x-axis of the 
plot. I agree that this conflicts with the alternative convention (i,j) 
-> (x,y) that one might equally well expect, however.
> 
> The other issue seems more difficult. It seems to be ignoring any 
> "extent=" options I give it. Is this because I just supplied a single 
> 2D array rather than also supplying spatial x,y values too?
No, I don't think so. Have you looked at the examples/contour_image.py? 
 It illustrates the use of extent, as well as the way in which imshow 
and contour are designed to be compatible.
Eric
From: Graeme O'K. <gra...@pe...> - 2006年02月10日 03:05:26
Hi Charlie,
I'm a bit new to the whole 'egg' thing.
I retrieved the egg from Chris Fonnesbeck's homepage:
	http://homepage.mac.com/fonnesbeck/mac/
Anyway, the matplotlib data files issue is resolved, I have a copy of 
mpl-data in my ~/.matplotlib directory now. It is picked up as default.
I tried your egg, unfortunately, I've not been able to get wxWindows 
installed via darwinports.
I tried TkAgg, problems as well (libJPEG conflict), so I look to have 
a stuffed setup from darwinports.
Do you have a GTKAgg backend you could add the egg?
regards,
Graeme
On 09/02/2006, at 11:14 PM, Charlie Moad wrote:
> On 2/8/06, Graeme O'Keefe <gra...@pe...> wrote:
>> I'm trying to migrate from numarray to numpy.
>>
>> By and large it is reasonably painless, substituting itemsize for 
>> itemsize()
>> and numarray.mlab.squeeze/tri with numpy.squeeze/tri are all I have
>> encountered so far.
>>
>> However, I have not been able to get the numpy distribution of 
>> matplotlib
>> working on OS-X
>>
>> The matplotlib egg is installed to:
>> /Library/Frameworks/Python.framework/Versions/Current/lib/ 
>> python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4- 
>> ppc.egg
>> where I also have installed:
>> numarray-1.5.1-py2.4-macosx-10.4-ppc.egg
>> numpy-0.9.5.2053-py2.4-macosx-10.4-ppc.egg
>> scipy-0.4.5.1597-py2.4-macosx-10.4-ppc.egg
>>
>>
>> then
>> % python
>>>>> import pylab
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
>> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/ 
>> pylab.py",
>> line 1, in ?
>> from matplotlib.pylab import *
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
>> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/ 
>> matplotlib/__init__.py",
>> line 744, in ?
>> defaultParams = {
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
>> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/ 
>> matplotlib/__init__.py",
>> line 273, in wrapper
>> ret = func(*args, **kwargs)
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
>> site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/ 
>> matplotlib/__init__.py",
>> line 434, in _get_data_path
>> raise RuntimeError('Could not find the matplotlib data files')
>> RuntimeError: Could not find the matplotlib data files
>>
>> BTW, are there eggs for freetype/py-gtk etc. I've been using 
>> darwinports
>> till now.
>
> Did you build and install the egg yourself, or did you download it
> from somewhere? Freetype won't have an egg since it is not a python
> library. In my tests I was able to add libpng and libfreetype static
> libraries to the matplotlib egg and it worked fine. If you want, you
> can try eggs I have posted for 0.86:
> http://euclid.uits.iupui.edu/~cmoad/mpleggs/ . The matplotlib one has
> the static libs added, so I would be interested to know if it works
> for you. I can update these as well if you would like.
>
> - Charlie
>
From: Darren D. <dd...@co...> - 2006年02月10日 00:40:54
I just committed a number of changes related to the usetex option. I modified 
the way we scale text to handle changes in font size, this is handled by 
latex now and closes a long standing bug related to the rendering of 
extremely long strings. I believe the recent problem related to an errant 
font command I introduced last week have also been resolved.
On Thursday 09 February 2006 13:20, Robert Hetland wrote:
> My only suggestion is to poll Mac users about dvipng versions and
> problems (or lack of problems). Perhaps a short term solution would
> be to create an rc option that users could toggle if they were having
> problems. This would at least allow us to investigate the problem
> further, without too much hacking on the part of the user.
Mac users can use a temporary rc parameter to get nice results with usetex. 
Just add text.dvipnghack : True to your matplotlibrc file.
Darren
From: Darren D. <dd...@co...> - 2006年02月10日 00:06:55
I just made a change to cvs that users should be aware of. The font.size 
setting in your matplotlibrc file previously defaulted to "medium", which 
meant 12pt. I changed it such that font.size now expects an actual number, in 
order to allow you, the user, to change this default size from 12.0 to 
whatever you like.
All other font sizes, like for tick labels and axes labels, can be given in 
relative sizes ("small", "large", etc.). If you find that on the whole, the 
text in your figure is too small, you can change font.size and it will scale 
all the relative font sizes accordingly.
I hope this is not an inconvenience to anyone.
Darren

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