You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(5) |
|
2
|
3
(3) |
4
(16) |
5
(8) |
6
(22) |
7
(10) |
8
(18) |
|
9
(11) |
10
(7) |
11
(16) |
12
(1) |
13
(10) |
14
(14) |
15
(2) |
|
16
(3) |
17
(19) |
18
(24) |
19
(35) |
20
(38) |
21
(27) |
22
(1) |
|
23
(9) |
24
(6) |
25
(24) |
26
(9) |
27
(7) |
28
(5) |
29
(9) |
|
30
(4) |
|
|
|
|
|
|
|
From: Benjamin J. R. <bjr...@gl...> - 2008-11-14 19:13:13
|
I use pause in matlab to cycle through an interactive do-loop and view a bunch of plots in interactively... Don't bother reproducing it here, but I am just wondering if this is possible in ipython/matplotlib Many thanks, Ben Racine |
|
From: D2Hitman <j.m...@wa...> - 2008-11-14 17:48:11
|
openSUSE 11.0 (x86_64) KDE 3.5.9 "release 49.1" with GTKAgg backend Michael Droettboom-3 wrote: > > Can you provide more information about the platform and backend that you > are using? > > D2Hitman wrote: >> I am getting a memory leak when i am using the pylab.close() function. I >> am >> running matplotlib-0.98.3. It happens in a very simple script such as: >> >> #!/usr/bin/python >> import time >> import pylab >> >> while True: >> time.sleep(1) >> print 'calling pylab' >> pylab.box() >> pylab.close() >> >> Every close seems to store megabytes in physical memory. Any idea why >> this >> happens? >> >> Cheers. >> >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > > ------------------------------------------------------------------------- > 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 > > -- View this message in context: http://www.nabble.com/pylab.close%28%29-tp20486589p20505291.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Michael D. <md...@st...> - 2008-11-14 17:47:01
|
Ok. Thanks, I'll look into it. Just wanted to rule out that this wasn't the known Gtk memory leak with old versions of Gtk before devoting time to it. Cheers, Mike Eric Firing wrote: > Michael Droettboom wrote: >> Can you provide more information about the platform and backend that >> you are using? > > Mike, > > I was able to reproduce this with my ubuntu 8.10, gtkagg backend. I > ran the code via cut and paste with the stock python interpreter, not > ipython. I did not measure the memory use carefully, but used the > system monitor to observe memory for that process climbing, maybe 500k > per cycle. > > Our usual memleak tester shows no problem, however. > > Eric > >> >> D2Hitman wrote: >>> I am getting a memory leak when i am using the pylab.close() >>> function. I am >>> running matplotlib-0.98.3. It happens in a very simple script such as: >>> >>> #!/usr/bin/python >>> import time >>> import pylab >>> >>> while True: >>> time.sleep(1) >>> print 'calling pylab' >>> pylab.box() >>> pylab.close() >>> >>> Every close seems to store megabytes in physical memory. Any idea >>> why this >>> happens? >>> >>> Cheers. >>> >>> >>> >> > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Eric F. <ef...@ha...> - 2008-11-14 17:40:25
|
Michael Droettboom wrote: > Can you provide more information about the platform and backend that you > are using? Mike, I was able to reproduce this with my ubuntu 8.10, gtkagg backend. I ran the code via cut and paste with the stock python interpreter, not ipython. I did not measure the memory use carefully, but used the system monitor to observe memory for that process climbing, maybe 500k per cycle. Our usual memleak tester shows no problem, however. Eric > > D2Hitman wrote: >> I am getting a memory leak when i am using the pylab.close() function. I am >> running matplotlib-0.98.3. It happens in a very simple script such as: >> >> #!/usr/bin/python >> import time >> import pylab >> >> while True: >> time.sleep(1) >> print 'calling pylab' >> pylab.box() >> pylab.close() >> >> Every close seems to store megabytes in physical memory. Any idea why this >> happens? >> >> Cheers. >> >> >> > |
|
From: DAVID H. <dav...@un...> - 2008-11-14 15:58:30
|
>> Hi all,
>>
>> I'm having problems with axis labels for large integers (1471674
>> is represented as 1000 +1.479e6) .... I really need to see the
>> number as a conventional integer. I have the feeling that it
>> should be possible with ticker. FormatStrFormatter but I have not
>> been able to work out how. Any advice would be greatly appreciated.
>>
> Assuming 'ax' is your current set of axes (obtained from gca() or a
> call to subplot(), for example)...
> from matplotlib import ticker
> ...
>
> ax.xaxis.set_major_formatter(ticker.FormatStrFormatter("%d"))
> ax.yaxis.set_major_formatter(ticker.FormatStrFormatter("%d"))
>> While I'm asking stupid questions, I'd also like to know how to
>> let the absolute dimensions of a subplot (with a barh()
>> horizontal bar chart) adjust themselves according to the number
>> of bars added (keeping the height of the bars strictly constant
>> rather than the bar height adjusting according to the number of
>> data points).
>>
Fantastic .... I knew this should be easy
>>
> There's no direct way to do this, but by setting the figure size
> based on the number of bars, you should be able to fake it. You
> can set the overall figure size either when you create the figure:
>
> figure(figsize=(4,3))
>
> or after the fact (which doesn't really work with interactive GUIs
> -- that is, it won't resize the window) --
>
> gcf().set_size_inches((4, 3))
>
> The unit is in inches -- the dpi of the figure can also be set in a
> similar way.
>
Hmm, the thing is that I'm using a barh() subplot underneath a series
of bar() subplots. The bar() subplots always have the same y axes,
but the number of items in the barh() subplot varies (I use the barh
() to illustrate features along a stretch of genomic DNA which also
has quantitative values attached to it in the bar() plots above). I
need to make a series of figures in this way wherein the bar()
subplots always have the same dimension, but only the "height" of the
barh() subplot varies (with the number of instances to plot) while
the Y axes ALL need to remain the same.
Can I size the whole figure with the above and fix the dimensions of
each of the subplots independently? If so I should be able to bodge it!
I'm pretty new to matplotlib and not really an expert programmer in
any case. While I'm very pleased with the quality of the figures, I'm
really struggling with ironing out a few maddening glitches.
Thanks again.
D
> Hope that at least helps,
> Mike
>> Many thanks
>>
>> David
>>
>>
>>
>> ---------------------------------------------------------------------
>> ----
>> 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
>>
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
|
|
From: Michael D. <md...@st...> - 2008-11-14 15:43:55
|
Michael Droettboom wrote: > or after the fact (which doesn't really work with interactive GUIs -- > that is, it won't resize the window) -- > > I'll correct myself on this point. According to the docs, the window will resize if forward=True for Gtk and Wx backends. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2008-11-14 15:10:47
|
DAVID HORNER wrote:
> Hi all,
>
> I'm having problems with axis labels for large integers (1471674 is
> represented as 1000 +1.479e6) .... I really need to see the number as
> a conventional integer. I have the feeling that it should be possible
> with ticker. FormatStrFormatter but I have not been able to work out
> how. Any advice would be greatly appreciated.
>
Assuming 'ax' is your current set of axes (obtained from gca() or a call
to subplot(), for example)...
from matplotlib import ticker
...
ax.xaxis.set_major_formatter(ticker.FormatStrFormatter("%d"))
ax.yaxis.set_major_formatter(ticker.FormatStrFormatter("%d"))
> While I'm asking stupid questions, I'd also like to know how to let
> the absolute dimensions of a subplot (with a barh() horizontal bar
> chart) adjust themselves according to the number of bars added
> (keeping the height of the bars strictly constant rather than the bar
> height adjusting according to the number of data points).
>
There's no direct way to do this, but by setting the figure size based
on the number of bars, you should be able to fake it. You can set the
overall figure size either when you create the figure:
figure(figsize=(4,3))
or after the fact (which doesn't really work with interactive GUIs --
that is, it won't resize the window) --
gcf().set_size_inches((4, 3))
The unit is in inches -- the dpi of the figure can also be set in a
similar way.
Hope that at least helps,
Mike
> Many thanks
>
> David
>
>
>
> -------------------------------------------------------------------------
> 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
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Michael D. <md...@st...> - 2008-11-14 15:01:11
|
Can you provide more information about the platform and backend that you are using? D2Hitman wrote: > I am getting a memory leak when i am using the pylab.close() function. I am > running matplotlib-0.98.3. It happens in a very simple script such as: > > #!/usr/bin/python > import time > import pylab > > while True: > time.sleep(1) > print 'calling pylab' > pylab.box() > pylab.close() > > Every close seems to store megabytes in physical memory. Any idea why this > happens? > > Cheers. > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: DAVID H. <dav...@un...> - 2008-11-14 08:15:40
|
Hi all, I'm having problems with axis labels for large integers (1471674 is represented as 1000 +1.479e6) .... I really need to see the number as a conventional integer. I have the feeling that it should be possible with ticker. FormatStrFormatter but I have not been able to work out how. Any advice would be greatly appreciated. While I'm asking stupid questions, I'd also like to know how to let the absolute dimensions of a subplot (with a barh() horizontal bar chart) adjust themselves according to the number of bars added (keeping the height of the bars strictly constant rather than the bar height adjusting according to the number of data points). Many thanks David |
|
From: John [H2O] <was...@gm...> - 2008-11-14 04:38:55
|
Hello, using matplotlib 0.98 with mpl_toolkit Basemap: I'm trying to create a plot with a series of ellipses over a map. I've followed the tutorial, and can create the same figure as shown here: http://matplotlib.sourceforge.net/users/screenshots.html#ellipses I can also create a series of ellipses over a map. Now I am trying to label each circle using the following snippet: for item in ells: #ells is now a tuple in the form: (Ellipse, (x,y)) and (x,y) is the same as for the Ellipse e = item[0] xy = item[1] ax.add_artist(e) e.set_clip_box(ax.bbox) e.set_alpha(.7) pyplot.text(xy[0],xy[1],e.get_label()) however, for some reason it fails. Can someone provide some ideas on what I am doing wrong? Also, is there more direct way to set the plots so that the labels are drawn? What is strange, is that it seems to work (at least debugging print statements after the loop are printed)... and I can move the text function out of the loop to label the 'last' ellipse... As it is it fails when savefig() or show() are called. The error is: TypeError: CXX : Error creating object of type N2Py3IntE THoughts? Thanks, john -- View this message in context: http://www.nabble.com/plotting-labels-for-each-%27artist%27-in-a-basemap-tp20494609p20494609.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Stan W. <sta...@nr...> - 2008-11-13 22:57:45
|
> Another approach is to use the subplotpars kwarg to adjust
> the positioning parameters when initializing the figure.
Here's how I like to implement that approach when I want strict dimensions:
figW = 6.5 # in inches
figH = 7
fig = figure(figsize=(figW, figH),
subplotpars=mpl.figure.SubplotParams(
left= (48 / 72.0) / figW, # 48-point left margin
bottom= (36 / 72.0) / figH, # etc.
right= 1 - (18 / 72.0) / figW,
top= 1 - (12 / 72.0) / figH))
|
|
From: Eric F. <ef...@ha...> - 2008-11-13 22:02:28
|
Erik Tollerud wrote: > I've been grappling with an annoying bug for a while now - attached > are two examples of an empty set of log-log axes with an xlabel. one > has figsize(10,5) and the other is figsize(10,6) . As is apparent > from the images, the (10,5) figure has the xlabel cut off because the > log axes are too big. If I don't use a log axis, everything is fine, > but the added size of the superscript in the axis pushes the label off > the edge of the figure. I've been working around this by changing the > size of the figure (as shown in the (10,6) figure , but sometimes I > have strict limits on the size I need for my figures. Is there an > obvious work-around to fix this, or does some of the labelling code > need to be changed? Note that this problem is much exacerbated if I > use larger font sizes or smaller figures... Erik, Instead of changing the figure size, you can use the pyplot subplots_adjust() function or the Figure.subplots_adjust() method to change the axes size and positioning within the figure. Another approach is to use the subplotpars kwarg to adjust the positioning parameters when initializing the figure. Eric |
|
From: Erik T. <eri...@gm...> - 2008-11-13 21:21:29
|
I've been grappling with an annoying bug for a while now - attached are two examples of an empty set of log-log axes with an xlabel. one has figsize(10,5) and the other is figsize(10,6) . As is apparent from the images, the (10,5) figure has the xlabel cut off because the log axes are too big. If I don't use a log axis, everything is fine, but the added size of the superscript in the axis pushes the label off the edge of the figure. I've been working around this by changing the size of the figure (as shown in the (10,6) figure , but sometimes I have strict limits on the size I need for my figures. Is there an obvious work-around to fix this, or does some of the labelling code need to be changed? Note that this problem is much exacerbated if I use larger font sizes or smaller figures... -- Erik Tollerud Graduate Student Center For Cosmology Department of Physics and Astronomy 2142 Frederick Reines Hall University of California, Irvine Office Phone: (949)824-2587 Cell: (651)307-9409 eto...@uc... |
|
From: D2Hitman <j.m...@wa...> - 2008-11-13 18:24:25
|
I am getting a memory leak when i am using the pylab.close() function. I am
running matplotlib-0.98.3. It happens in a very simple script such as:
#!/usr/bin/python
import time
import pylab
while True:
time.sleep(1)
print 'calling pylab'
pylab.box()
pylab.close()
Every close seems to store megabytes in physical memory. Any idea why this
happens?
Cheers.
--
View this message in context: http://www.nabble.com/pylab.close%28%29-tp20486589p20486589.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Eric F. <ef...@ha...> - 2008-11-13 17:42:51
|
Zane Selvans wrote: > > On Nov 12, 2008, at 8:12 PM, Eric Firing wrote: >> The example code runs with mpl from svn, so I suspect you are running >> into an example that was written to show capabilities added since the >> last release. In fact, it looks like that 6212 #todo is the clue: it >> is not found in the svn version. > > Hmm. It seems like it might be better to have the default online > documentation generated from the current release, instead of the > bleeding edge. The title of the page does after all say: "Matplotlib > v0.98.3 documentation". Of course there could be an svn version > accessible somewhere too, but having this kind of disconnect between > what people have installed, and what the default doc refers to, will > probably create other headaches too. I agree. I don't know anything about how the web site is generated, though, so I don't know how easy or hard this is. We just switched to a new documentation generation system. Maybe the scheme you suggest, with docs matching versions (at least the latest release and svn; possibly even keeping access to older versions as new versions are released, the way Python.org does it) can be implemented with the next release. I wonder if any users or developers might be interested in becoming developers specializing in the website and documentation, to take some of the load off of John and Mike... Eric > > Just my $0.02, > Zane > > -- > Zane Selvans > Amateur Earthling > za...@id... <mailto:za...@id...> > 303/815-6866 > http://zaneselvans.org > PGP Key: 55E0815F > > > > > > > > |
|
From: Benjamin J. R. <bjr...@gl...> - 2008-11-13 17:28:43
|
I am sending this forward on behalf of Matt Foster... Be sure to look into pysmell (for completion) as well. >>>>>>>>>>>>>>>>>>>>>> Hi All, A similar mail has already been on the (ipython) users mailing list, so my apologies if you've seen most of this before. I've started working on a TextMate bundle for IPython, based on the info on the Wiki [1], the aim is to produce a BSD licensed bundle which helps to integrate TextMate with IPython. I have set up a project on Github [2] which currently contains: * Some help, which doubles as the README * commands for running the current file / line / section in IPython (via applescript, and Terminal.app) * a basic language grammar for ipythonrc config files. The GitHub page contains the README file which has instructions on how to get GetBundles, which will allow you to install the bundle (but not track changes). Alternatively, if you have git, you can get the bundle using the following commands: cd "~/Library/Application Support/TextMate/Bundles" git clone git://github.com/mattfoster/ipython-tmbundle.git IPython.tmbundle osascript -e 'tell app "TextMate" to reload bundles' GitHub users can fork the project and make their own changes. I'd really love to hear any ideas, suggestions or feature requests people have, and I've been told by Fernando that it's ok to use this list for discussions, provided we prefix mail subjects with [TextMate]. Thanks, Matt [1]: http://ipython.scipy.org/moin/Cookbook/UsingIPythonWithTextMate [2]: http://github.com/mattfoster/ipython-tmbundle/ -- Matt Foster | http://my-mili.eu/matt _______________________________________________ IPython-dev mailing list IPy...@sc... http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev |
|
From: Zane S. <za...@id...> - 2008-11-13 17:18:56
|
On Nov 12, 2008, at 8:12 PM, Eric Firing wrote: > The example code runs with mpl from svn, so I suspect you are > running into an example that was written to show capabilities added > since the last release. In fact, it looks like that 6212 #todo is > the clue: it is not found in the svn version. Hmm. It seems like it might be better to have the default online documentation generated from the current release, instead of the bleeding edge. The title of the page does after all say: "Matplotlib v0.98.3 documentation". Of course there could be an svn version accessible somewhere too, but having this kind of disconnect between what people have installed, and what the default doc refers to, will probably create other headaches too. Just my $0.02, Zane -- Zane Selvans Amateur Earthling za...@id... 303/815-6866 http://zaneselvans.org PGP Key: 55E0815F |
|
From: Eric F. <ef...@ha...> - 2008-11-13 04:13:04
|
Zane Selvans wrote: > I'm trying to make a bar-style histogram, along the lines of the last > example figure from the extended histogram demo: > > http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.html > > in which the several arrays to be histogrammed do not have the same > length. However, I'm getting an error about "setting an array element > with a sequence", even when I just cut-and-paste in the example code. > The previous multi-histogram examples in which the array being plotted > is generated using: x = mu + sigma*randn(1000,3) work fine though. > > Am I doing something stupid? No. The example code runs with mpl from svn, so I suspect you are running into an example that was written to show capabilities added since the last release. In fact, it looks like that 6212 #todo is the clue: it is not found in the svn version. Eric > > Here's the trace: > > In [25]: n, bins, patches = hist( [x0,x1,x2], 10, histtype='bar') > --------------------------------------------------------------------------- > ValueError Traceback (most recent call last) > > /Users/zane/svn/googlecode/<ipython console> in <module>() > > /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/pyplot.pyc > in hist(*args, **kwargs) > 1866 hold(h) > 1867 try: > -> 1868 ret = gca().hist(*args, **kwargs) > 1869 draw_if_interactive() > 1870 except: > > /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3-i386.egg/matplotlib/axes.pyc > in hist(self, x, bins, range, normed, cumulative, bottom, histtype, > align, orientation, rwidth, log, **kwargs) > 6211 > 6212 # todo: make hist() work with list of arrays with > different lengths > -> 6213 x = np.asarray(x).copy() > 6214 if len(x.shape)==2 and min(x.shape)==1: > 6215 x.shape = max(x.shape), > > /Library/Python/2.5/site-packages/numpy-1.2.0.dev5677-py2.5-macosx-10.3-i386.egg/numpy/core/numeric.pyc > in asarray(a, dtype, order) > 228 > 229 """ > --> 230 return array(a, dtype, copy=False, order=order) > 231 > 232 def asanyarray(a, dtype=None, order=None): > > ValueError: setting an array element with a sequence. > > > -- > Zane Selvans > Amateur Earthling > za...@id... <mailto:za...@id...> > 303/815-6866 > http://zaneselvans.org > PGP Key: 55E0815F > > > > > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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: Zane S. <za...@id...> - 2008-11-13 03:48:06
|
I'm trying to make a bar-style histogram, along the lines of the last example figure from the extended histogram demo: http://matplotlib.sourceforge.net/examples/pylab_examples/histogram_demo_extended.html in which the several arrays to be histogrammed do not have the same length. However, I'm getting an error about "setting an array element with a sequence", even when I just cut-and-paste in the example code. The previous multi-histogram examples in which the array being plotted is generated using: x = mu + sigma*randn(1000,3) work fine though. Am I doing something stupid? Here's the trace: In [25]: n, bins, patches = hist( [x0,x1,x2], 10, histtype='bar') --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /Users/zane/svn/googlecode/<ipython console> in <module>() /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3- i386.egg/matplotlib/pyplot.pyc in hist(*args, **kwargs) 1866 hold(h) 1867 try: -> 1868 ret = gca().hist(*args, **kwargs) 1869 draw_if_interactive() 1870 except: /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3- i386.egg/matplotlib/axes.pyc in hist(self, x, bins, range, normed, cumulative, bottom, histtype, align, orientation, rwidth, log, **kwargs) 6211 6212 # todo: make hist() work with list of arrays with different lengths -> 6213 x = np.asarray(x).copy() 6214 if len(x.shape)==2 and min(x.shape)==1: 6215 x.shape = max(x.shape), /Library/Python/2.5/site-packages/numpy-1.2.0.dev5677-py2.5- macosx-10.3-i386.egg/numpy/core/numeric.pyc in asarray(a, dtype, order) 228 229 """ --> 230 return array(a, dtype, copy=False, order=order) 231 232 def asanyarray(a, dtype=None, order=None): ValueError: setting an array element with a sequence. -- Zane Selvans Amateur Earthling za...@id... 303/815-6866 http://zaneselvans.org PGP Key: 55E0815F |
|
From: Gideon S. <si...@ma...> - 2008-11-13 01:38:45
|
Both of these issues seem to be resolved by the latest fink packages. -gideon On Nov 7, 2008, at 10:13 AM, Gideon Simpson wrote: > 1. I find that the eps's generated, for whatever reason, do not > automatically conform to something that Preview.app can open. it > generates the error: > > PostScript Conversion Error > The PostScript file "test.eps" could not be converted to a PDF file. > > However, the eps's are fundamentally there. I can open them in GIMP > and use ps2pdf on them. > > 2. My fink installed QT4 backend gives an error while trying to save > a figure as PDF using the GUI. I get: > > [Errno 4] Interrupted system call > > Other file formats do not generate this error. > > > -gideon > > > ------------------------------------------------------------------------- > 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: Michael H. <jm...@ph...> - 2008-11-12 18:34:11
|
On Tue, Nov 11, 2008 at 08:52:15AM -1000, Eric Firing wrote: . . . > >Hi, Eric. I'm using the packages provided by Fedora: > > > > numpy.x86_64 1.2.0-1.fc9 > > python-matplotlib.x86_64 0.91.4-1.fc9 > > > >It appears that numpy is reasonably up-to-date, but Matplotlib appears > >to be relatively old (although I don't know what d(version)/dt is). > > Yes, your numpy is fine, but your matplotlib is an older branch, and > although it is still being maintained it looks like it is not in sync > with changes to numpy going from 1.1 to 1.2. I hope Fedora 10 has > switched to the current branch, 0.98.x. In any case, however, > matplotlib changes fast enough that it may be worthwhile building your > own. It is very easy to do on a linux machine once the necessary > headers are in place. Typically this involves installing several *dev > or *devel packages--I don't know the specifics of Fedora packaging. Thanks again, Eric. I built Matplotlib 0.98 from source on my Fedora box, and that did fix the problem. I haven't checked Fedora 10 yet (arriving in 13 days). - Mike -- Michael Hannon mailto:ha...@ph... Dept. of Physics 530.752.4966 University of California 530.752.4717 FAX Davis, CA 95616-8677 |
|
From: Alan G I. <ai...@am...> - 2008-11-11 18:57:20
|
Why does set_xlim have to come before set_xticks? I expect the same ticks but within the limits, but mpl recomputes the ticks. Thanks, Alan Isaac |
|
From: Eric F. <ef...@ha...> - 2008-11-11 18:52:24
|
Michael Hannon wrote: > On Tue, Nov 11, 2008 at 07:13:46AM -1000, Eric Firing wrote: >> Michael Hannon wrote: >>> Greetings. I need to make some histograms from within a Python program, >>> and I noticed that Matplotlib, which I've never used before, appears to >>> have that capability. >>> >>> At: >>> http://matplotlib.sourceforge.net/ >>> >>> I see the following simple example: >>> >>> >>> from pylab import randn, hist >>> >>> x = randn(10000) >>> >>> hist(x, 100) >>> >>> And there is a more-extended example at: >>> >>> http://matplotlib.sourceforge.net/_static/plot_directive/mpl_examples/pylab_examples/histogram_demo.py >>> >>> Unfortunately, when I run either example I get nothing but complaints >>> and errors, as in the appended. >>> >>> This is on a system running 64-bit Fedora 9 and Python 2.5.1. >>> >>> I'm evidently doing something wrong. Will somebody please point me in >>> the right direction? >> >> It sounds like your matplotlib version is too old for your numpy >> version. What version of matplotlib are you using? Can you install a >> newer one, or, better yet, build from svn? (The warning from numpy is >> easy to deal with; the TypeError from matplotlib is what indicates that >> the version is incompatible.) >> >> Eric > > Hi, Eric. I'm using the packages provided by Fedora: > > numpy.x86_64 1.2.0-1.fc9 > python-matplotlib.x86_64 0.91.4-1.fc9 > > It appears that numpy is reasonably up-to-date, but Matplotlib appears > to be relatively old (although I don't know what d(version)/dt is). Yes, your numpy is fine, but your matplotlib is an older branch, and although it is still being maintained it looks like it is not in sync with changes to numpy going from 1.1 to 1.2. I hope Fedora 10 has switched to the current branch, 0.98.x. In any case, however, matplotlib changes fast enough that it may be worthwhile building your own. It is very easy to do on a linux machine once the necessary headers are in place. Typically this involves installing several *dev or *devel packages--I don't know the specifics of Fedora packaging. Eric > > I'll look into installing from the source kits (and/or look into Fedora > 10, which will be shipping in a couple of weeks, IIRC). > > Thanks. > > - Mike |
|
From: Eric F. <ef...@ha...> - 2008-11-11 18:40:45
|
Fabrice Silva wrote: > Le lundi 10 novembre 2008, wbrevis a écrit : >> I'm trying to plot one of my experimental data using scipy. Until now, >> all the work I did was using Matlab. For one of my normal data- >> visualization, I read ASCII or Binary files containing 4 columns: The >> first contains the x coordinate, the second the y one, and the third >> and fourth columns the velocity in the x and y directions (u and v), >> i.e. file= x y u v (ordered in columns). After reading the data in >> Matlab, I normally do: pcolor(x,y,sqrt(u.^2+v.^2)), in order to >> visualize in colors the velocity magnitude and then quiver(x,y,u,v) in >> order to see the associated vectors. I was reading the manual of >> scipy, including the plotting tools, but I am a bit lost (too much >> information to start). Can somebody help me with suggestions on how to >> read data using scipy and the best way to plot (pcolor+quiver)?. What >> about the function quiver3d of mlab, can be used for 2d representation >> of a flow field, together with surf (also mlab). >> >> Thank you in advance for your help and suggestions > > (Let's discuss the second point in the matplotlib list only.) > Can you try the following code : > > import matplotlib.pyplot as plt > import numpy as np > x, y= np.arange(0,2*np.pi,.2), np.arange(0,2*np.pi,.2) > X,Y = np.meshgrid(x,y) > U,V = np.cos(X), np.sin(Y) > plt.pcolor(X,Y,U**2+V**2) > plt.quiver(X,Y,U,V) > plt.show() > > If it is what you do want, then you then only need to import your own > data... If you have a reasonably recent version of numpy, then you can use numpy.loadtxt; if the data file is as simple as it sounds, you can also use numpy.fromfile, even with an older numpy version. Or you can use matplotlib.mlab.load, from which numpy.loadtxt was derived, I believe. The docstrings for numpy.loadtxt and mlab.load are very thorough. Eric > |
|
From: Michael H. <jm...@ph...> - 2008-11-11 18:29:19
|
On Tue, Nov 11, 2008 at 07:13:46AM -1000, Eric Firing wrote: > Michael Hannon wrote: > >Greetings. I need to make some histograms from within a Python program, > >and I noticed that Matplotlib, which I've never used before, appears to > >have that capability. > > > >At: > > http://matplotlib.sourceforge.net/ > > > >I see the following simple example: > > > > >>> from pylab import randn, hist > > >>> x = randn(10000) > > >>> hist(x, 100) > > > >And there is a more-extended example at: > > > >http://matplotlib.sourceforge.net/_static/plot_directive/mpl_examples/pylab_examples/histogram_demo.py > > > >Unfortunately, when I run either example I get nothing but complaints > >and errors, as in the appended. > > > >This is on a system running 64-bit Fedora 9 and Python 2.5.1. > > > >I'm evidently doing something wrong. Will somebody please point me in > >the right direction? > > > It sounds like your matplotlib version is too old for your numpy > version. What version of matplotlib are you using? Can you install a > newer one, or, better yet, build from svn? (The warning from numpy is > easy to deal with; the TypeError from matplotlib is what indicates that > the version is incompatible.) > > Eric Hi, Eric. I'm using the packages provided by Fedora: numpy.x86_64 1.2.0-1.fc9 python-matplotlib.x86_64 0.91.4-1.fc9 It appears that numpy is reasonably up-to-date, but Matplotlib appears to be relatively old (although I don't know what d(version)/dt is). I'll look into installing from the source kits (and/or look into Fedora 10, which will be shipping in a couple of weeks, IIRC). Thanks. - Mike -- Michael Hannon mailto:ha...@ph... Dept. of Physics 530.752.4966 University of California 530.752.4717 FAX Davis, CA 95616-8677 |