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
(9) |
2
(11) |
3
(2) |
|
4
|
5
(6) |
6
(1) |
7
(6) |
8
(7) |
9
(16) |
10
(6) |
|
11
(2) |
12
(13) |
13
(3) |
14
(6) |
15
(6) |
16
(19) |
17
(2) |
|
18
(1) |
19
(1) |
20
(11) |
21
(5) |
22
(4) |
23
(7) |
24
(14) |
|
25
(15) |
26
(27) |
27
(26) |
28
(7) |
29
(2) |
30
(7) |
|
|
From: Jeff W. <js...@fa...> - 2007-11-23 17:36:17
|
Basemap 0.9.7 is available for download. http://www.python.org/pypi/basemap/0.9.7 http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792&release_id=555980 <http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792&release_id=555980> Windows installers for python 2.4 and python 2.5 are available. There are many under-the-hood changes in the this release, but the API and functionality are nearly identical to 0.9.6. There is an extra dependency on the GEOS (Geometry Engine) library (http://geos.refractions.net). The source code is included with basemap, but requires a separate ./configure; make ;make install step before running setup.py. Using the GEOS library speeds up the creation of Basemap class instances dramatically, especially for small map regions using high resolution boundaries. The high-resolution boundaries from Generic Mapping Tools are now included, and the full-resolution boundaries are available as a separate 67mb download. Full Changelog: version 0.9.7 (svn revision 4422) * fixed bug in drawlsmask for 'moll','robin' and 'sinu' projections. * added lake_color keyword to fillcontinents. * fixed a bug in the 'tmerc' projection. * added pure python NetCDFFile reader from Roberto De Almeida to basemap namespace (from matplotlib.toolkits.basemap import NetCDFFile). * added support for full-resolution boundaries (will be a separate download). Full-res files (totaling around 100 mb) available in SVN. * high-resolution boundaries now included. * postpone processing of countries, states and river boundaries until a draw is requested. Only the coastlines are processed in __init__. * use a Pyrex/Cython interface to the GEOS library (http://geos.refractions.net - LGPL license) to find geometries that are within map projection region. This speeds up instance creation for small map regions and high resolution coastlines. Boundary datasets now in binary format (I/O is faster). Requires GEOS version 2.2.3, source code included. * remove all numerix imports. * fix rotate_vector so it works in S. Hem and for non-orthogonal grids. Support for masked velocity vectors also added. (EF) * numpification. (EF) -- 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-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Rich S. <rsh...@ap...> - 2007-11-23 15:55:53
|
On Fri, 23 Nov 2007, Jeff Whitaker wrote: > Rich: The tails of a Gaussian never reach zero - they just asymptote to zero > for large x. Jeff, For all practical purposes, that's fine. Usually any y value > 0.20 (the default) is considered functionally equivalent to zero. If the display looks close enough to the x axis, that fulfills that purpose. Because these curves are used to determine degree of set membership the tails are of no practical value. Thanks, Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Jeff W. <js...@fa...> - 2007-11-23 13:53:17
|
Rich Shepard wrote: > On Fri, 23 Nov 2007, Angus McMorland wrote: > > >> For parsimony, I think you're probably best off just using the >> Gaussian equation: >> >> def fwhm2k(fwhm): >> '''converts fwhm value to k (see above)''' >> return fwhm/(2 * n.sqrt( n.log( 2 ) ) ) >> >> def gauss1d(r, fwhm, c): >> '''returns the 1d gaussian given by fwhm (full-width at half-max), >> and c (centre) at positions given by r >> ''' >> return exp( -(r-c)**2 / fwhm2k( fwhm )**2 ) >> > > Thank you, Angus. I'll look at the Gaussian explanation to understand the > input values. > > >> The midpoint here is c. >> > > OK. > > >> It's not clear what you mean by endpoints - if you mean you want to be >> able to specify the y value at a given x delta-x away from c, then it >> should be relatively simple to solve the equation to find the required >> full-width at half-max to achieve these end-points. After a very quick >> look (i.e. definitely needs verification), I think >> > > What I mean is the x value where the tails of the curve have y == 0.0. > These curves are defined by the range of x over which they are valid, and > assume the midpoint is where y == 1.0 (the maximum value). The inflection > points are at y = 0.5; in rare situations that may change. > Rich: The tails of a Gaussian never reach zero - they just asymptote to zero for large x. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |
|
From: Rich S. <rsh...@ap...> - 2007-11-23 04:16:54
|
On Fri, 23 Nov 2007, Angus McMorland wrote: > For parsimony, I think you're probably best off just using the > Gaussian equation: > > def fwhm2k(fwhm): > '''converts fwhm value to k (see above)''' > return fwhm/(2 * n.sqrt( n.log( 2 ) ) ) > > def gauss1d(r, fwhm, c): > '''returns the 1d gaussian given by fwhm (full-width at half-max), > and c (centre) at positions given by r > ''' > return exp( -(r-c)**2 / fwhm2k( fwhm )**2 ) Thank you, Angus. I'll look at the Gaussian explanation to understand the input values. > The midpoint here is c. OK. > It's not clear what you mean by endpoints - if you mean you want to be > able to specify the y value at a given x delta-x away from c, then it > should be relatively simple to solve the equation to find the required > full-width at half-max to achieve these end-points. After a very quick > look (i.e. definitely needs verification), I think What I mean is the x value where the tails of the curve have y == 0.0. These curves are defined by the range of x over which they are valid, and assume the midpoint is where y == 1.0 (the maximum value). The inflection points are at y = 0.5; in rare situations that may change. > I hope that's what you're after. I'll look at it in detail tomorrow (my time) and the weekend. I, too, hope that it's what I need. Much appreciated, Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Angus M. <am...@gm...> - 2007-11-23 00:08:21
|
On 23/11/2007, Rich Shepard <rsh...@ap...> wrote:
> Now I need to plot normal curves (a.k.a. Gaussian or bell curves,
> depending on the background of the speaker/writer). I see that SciPy has a
> class for the normal curve in its stats package, and that the curve shape is
> defined by the mean and standard deviation.
For parsimony, I think you're probably best off just using the
Gaussian equation:
def fwhm2k(fwhm):
'''converts fwhm value to k (see above)'''
return fwhm/(2 * n.sqrt( n.log( 2 ) ) )
def gauss1d(r, fwhm, c):
'''returns the 1d gaussian given by fwhm (full-width at half-max),
and c (centre) at positions given by r
'''
return exp( -(r-c)**2 / fwhm2k( fwhm )**2 )
(released to public domain)
> My need is to draw these curves based on the midpoint (== mean) and tail
> endpoints (which are not the same as the s.d.).
The midpoint here is c.
It's not clear what you mean by endpoints - if you mean you want to be
able to specify the y value at a given x delta-x away from c, then it
should be relatively simple to solve the equation to find the required
full-width at half-max to achieve these end-points. After a very quick
look (i.e. definitely needs verification), I think
k = sqrt( -(R-c)**2/log(Y) )
where Y is the desired value at distance R-c from the centre.
>Your thoughts are appreciated.
I hope that's what you're after.
Angus,
--
AJC McMorland, PhD Student
Physiology, University of Auckland
|
|
From: Rich S. <rsh...@ap...> - 2007-11-22 23:16:31
|
I see that I've been immortalized on the SciPy MatPlotLib Cookbook web page for my enquiry on plotting S- and Z-curves. The Boltzman function serves very well for that purpose, and I've tweaked the example code to allow me to pass in the two endpoints and the midpoint for each of these curves. Now I need to plot normal curves (a.k.a. Gaussian or bell curves, depending on the background of the speaker/writer). I see that SciPy has a class for the normal curve in its stats package, and that the curve shape is defined by the mean and standard deviation. My need is to draw these curves based on the midpoint (== mean) and tail endpoints (which are not the same as the s.d.). I can copy -- or call -- the SciPy class from my application code, but I don't know if this is the most parsimonious approach. Your thoughts are appreciated. These plots will be used in two different media, and it two forms. Within the wxPython application I want to display each curve on one panel, and the set of curves related to one linguistic variable on a second panel. Then I need to have the set incorporated into a ReportLab report in .pdf. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Arnar F. <arn...@gm...> - 2007-11-22 11:48:08
|
Hi list
It looks like I cant change any properties of a matplotlib figure/axis
after I saved the figure
using the GUI. At least I cant use gca(), and gcf(). It works fine if
the save (e.g., figure.savefig('foo'))
was performed in the oo interface
Does anybody else have a problem with this (code below)?
import pylab as p
p.scatter([1,2,3], [1,2,3])
*save figure using the toolbar-button*
# then ... oops, I forgot something, and I need to change some properties
# trying to get my axes
ax = p.gca()
# and this pops up a new figure with new axes
---
# the oo seems to work just fine (if I only knew that ... )
p.scatter([1,2,3], [1,2,3])
fig = p.gcf()
fig.savefig('/tmp/tull')
ax = p.gca()
I am on Ubuntu feisty with numpy 1.01, matplotlib 0.87.7, using Ipython 0.7.3
R&R
|
|
From: Rich S. <rsh...@ap...> - 2007-11-22 00:16:36
|
On Wed, 21 Nov 2007, Darren Dale wrote: > They are all defaults. We prefer to ship default rc files that are > commented out so it is easier to track down bugs, it makes it easier to > keep track of any nonstandard settings. Darren, Thank you. I assumed that to be the case, but it's nice to have that confirmed. On the original issue, changing from the default GTKAgg to WXAgg removed all the GTK (cairo, libpangocairo) errors I was seeing. Since I want WXAgg as the default anyway, this works out nicely. Now to learn matplotlib for our application. I know I'll be back with questions. :-) Happy Thanksgiving, Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Darren D. <dar...@co...> - 2007-11-22 00:00:22
|
On Wednesday 21 November 2007 6:45:55 pm Rich Shepard wrote: > On Wed, 21 Nov 2007, Rich Shepard wrote: > > I'm missing some understanding here, and cannot build matplotlib-0.90.1 > > nor the apparently missing libraries. This workstation is currently > > running Slackware-11.0 with the following installed (or missing, in the > > case of PyGObject): > > Got this resolved: turns out to be a highly unusual dependency on kernel > headers earlier than those of the running kernel. > > However, why are all of the ~/.matplotlib/matplotlibrc options for > LINES, PATCHES, FONT, etc. all commented out? They are all defaults. We prefer to ship default rc files that are commented out so it is easier to track down bugs, it makes it easier to keep track of any nonstandard settings. |
|
From: Rich S. <rsh...@ap...> - 2007-11-21 23:46:37
|
On Wed, 21 Nov 2007, Rich Shepard wrote: > I'm missing some understanding here, and cannot build matplotlib-0.90.1 > nor the apparently missing libraries. This workstation is currently > running Slackware-11.0 with the following installed (or missing, in the > case of PyGObject): Got this resolved: turns out to be a highly unusual dependency on kernel headers earlier than those of the running kernel. However, why are all of the ~/.matplotlib/matplotlibrc options for LINES, PATCHES, FONT, etc. all commented out? Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Rich S. <rsh...@ap...> - 2007-11-21 18:32:54
|
I'm missing some understanding here, and cannot build matplotlib-0.90.1
nor the apparently missing libraries. This workstation is currently running
Slackware-11.0 with the following installed (or missing, in the case of
PyGObject):
wxPython-2.8.0.1
wxGTK-2.8.0
pygobject: /usr/lib/pkgconfig/pygobject-2.0.pc; no PyGObject
pygtk-2.10.3
Since I don't have a mental (or documented) map of how all the pieces fit
together, I'm not sure how to fix the problems encountered. The matplotlib
build fails because the compiler cannot find libraries that are present:
In file included from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from /usr/include/python2.4/Python.h:38,
from src/_isnan.c:1:
/usr/include/linux/errno.h:4:23: asm/errno.h: No such file or directory
In file included from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from /usr/include/python2.4/Python.h:38,
from src/_isnan.c:1:
/usr/include/linux/errno.h:4:23: asm/errno.h: No such file or directory
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -O3 -march=i486
-mtune=i686 -fPIC -I/usr/local/include -I/usr/include -I.
-I/usr/include/python2.4 -c src/_isnan.c -o
build/temp.linux-i686-2.4/src/_isnan.o" failed with exit status 1
That is, /usr/include/linux/asm/error.h exists, and _isnan.c is present at
/tmp/SBo/matplotlib-0.90.1/src/_isnan.c
/usr/local/numpy/numpy/core/src/_isnan.c
/usr/local/matplotlib-0.87.7/src/_isnan.c
When I try to run matplotlib examples from within ipython, invoking the
shell with the -pylab switch produces this error:
File "/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py", line 42,
in ?
raise ImportError(
ImportError: PyGTK requires PyGObject 2.11.1 or higher, but () was found
As noted above, I have the .pc file but that's all.
I'd like guidance on how to fix this mess so I can build, learn, and use
matplotlib-0.90.1. Once I understand the relationships involved, I'll be
able to get the latest version built and running on my notebook which now
runs Slackware-12.0 with Python-2.5.1.
Rich
--
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
|
|
From: Rich S. <rsh...@ap...> - 2007-11-21 17:02:19
|
While I've had 0.82 installed on my workstation and notebook, I've not been ready to use it until now. I've just downloaded 0.90.1 and diff'd the two matplotlibrc files. Is WXAgg no longer supported as a backend if the plotting displays will be integral with the wxPython widget set? Also, why is everything in the rc file commented out? Are these all default values (lines, fill, etc.) and need to be specified only when different? Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
|
From: Martinho MA <mm...@ua...> - 2007-11-21 16:34:58
|
Hello, I have a contour with a clim smaller than the limits of my data... and because of this there is an error when I try to add a colorbar. Can someone help? Thanks MMA eg: x=arange(20) y=arange(30) x,y=meshgrid(x,y) v=sqrt(x+y) # max=6.928, min=0.0 # next is ok figure() contour(x,y,v) clim(0,7) colorbar() # next gives the error: "ValueError: levels are outside colorbar range" figure() contour(x,y,v) clim(2,6) colorbar() |
|
From: Bryan F. <bry...@gm...> - 2007-11-21 00:25:26
|
I would like to have a secondary y-axis that has the same scale, but a
different label. Also, I would like to draw a dashed line down the
center of the plot.
I have used,
ax1 =3D pcolor(a, shading=3D'flat', cmap=3Dcm.gray_r)
title('Intensity Pattern')
xlabel('Distance')
ylabel('Leaf B')
ax2=3Dtwinx()
ylabel('Leaf A')
ax2.yaxis.tick_right()
colorbar()
and the scale is different for the second y-axis as well as prints on
top of the colorbar.
-Bryan
"The game of science can accurately be described as a never-ending
insult to human intelligence."=09- Jo=E3o Magueijo
|
|
From: Eric F. <ef...@ha...> - 2007-11-20 21:15:35
|
Jeff Whitaker wrote:
> If I draw two images with imshow, then set_zorder for one of them to be
> higher than the other, should that one be the one that displays?
Jeff,
It is a wart. Images are handled separately from other artists, and
always drawn first, either as a composite or in the order in which they
were added to the list. Here is the relevant code in the Axes.draw()
method:
if len(self.images)<=1 or renderer.option_image_nocomposite():
for im in self.images:
im.draw(renderer)
else:
# make a composite image blending alpha
# list of (mimage.Image, ox, oy)
mag = renderer.get_image_magnification()
ims = [(im.make_image(mag),0,0)
for im in self.images if im.get_visible()]
im = mimage.from_images(self.bbox.height()*mag,
self.bbox.width()*mag,
ims)
im.is_grayscale = False
l, b, w, h = self.bbox.get_bounds()
# composite images need special args so they will not
# respect z-order for now
renderer.draw_image(l, b, im, self.bbox)
Maybe the set_zorder method for images should raise a warning, since it
can't do what one might reasonably expect.
Mike may be able to comment on the prospects for removing this wart at
some point in the transforms branch; he is looking at related questions
right now.
Eric
>
> for example, with
>
> from pylab import *
> delta = 0.025
> x = y = arange(-3.0, 3.0, delta)
> X, Y = meshgrid(x, y)
> Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
> Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
> Z = Z2-Z1 # difference of Gaussians
> im2 = imshow(Z2, interpolation='bilinear', cmap=cm.gray,
> origin='lower', extent=[-3,3,-3,3])
> im2.set_zorder(2)
> im1 = imshow(Z1, interpolation='bilinear', cmap=cm.gray,
> origin='lower', extent=[-3,3,-3,3])
> im1.set_zorder(1)
> show()
>
> I expected Z2 to be plotted, but I actually see Z1. In fact, I always
> see the last one that was plotted, regardless of what I set the zorder to.
>
> I'm using the latest SVN, with GTKAgg.
>
> -Jeff
>
|
|
From: Jeff W. <js...@fa...> - 2007-11-20 20:58:27
|
If I draw two images with imshow, then set_zorder for one of them to be
higher than the other, should that one be the one that displays?
for example, with
from pylab import *
delta = 0.025
x = y = arange(-3.0, 3.0, delta)
X, Y = meshgrid(x, y)
Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
Z = Z2-Z1 # difference of Gaussians
im2 = imshow(Z2, interpolation='bilinear', cmap=cm.gray,
origin='lower', extent=[-3,3,-3,3])
im2.set_zorder(2)
im1 = imshow(Z1, interpolation='bilinear', cmap=cm.gray,
origin='lower', extent=[-3,3,-3,3])
im1.set_zorder(1)
show()
I expected Z2 to be plotted, but I actually see Z1. In fact, I always
see the last one that was plotted, regardless of what I set the zorder to.
I'm using the latest SVN, with GTKAgg.
-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-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
|
|
From: Eric F. <ef...@ha...> - 2007-11-20 17:15:52
|
John Hunter wrote: > On Nov 19, 2007 10:08 PM, Jeff Whitaker <js...@fa...> wrote: >> Bryan Fodness wrote: >>> I would like to use pcolor with the colors going from white (zero >>> values) to black (largest value). > >> pcolor(a, shading = 'flat', cmap=cm.binary) > > It may not be a binary map you want (that has just two colors) but a > reversed grayscale map which is continuous from white to black, in > which case you would use cmap=cm.gray_r Agreed, logically it should be cm.gray_r. But, surprisingly, cm.binary looks identical. Maybe cm.binary is not doing what you intended it to do? (I have always found LinearSegmentedColormap hard to understand, in spite of what seems to be abundant explanation in the docstrings.) Eric |
|
From: John H. <jd...@gm...> - 2007-11-20 16:52:26
|
On Nov 20, 2007 10:43 AM, Jordan Atlas <jc...@co...> wrote:
> Can someone recomend a way to save the data in such a way that the
> columns (or rows) are labeled? In otherwords, it would be nice to be
> able to open the saved data and know what each row is without having to
> refer to the script that created it. (referring to the creating script
> feels error prone when you have many rows of data being saved). I'm
> currently using the 'pylab.save' function to save the data.
I suggest using numpy record arrays for this -- the columns have names
and the data can be of different types. You can save and load them
using pickle (numpy.load and numpy.save will use pickle under the
hood).
If you want to stick with ASCII flat file representation (eg for use
with other programs), in matplotlib svn there are two nice functions
to help here: rec2csv and csv2rec. They support saving numpy record
arrays to CSV files with column names, and loading these back up later
doign type introspection to figure out the types (datetime, str,
float, int).
In [1]: import numpy as n
In [2]: import matplotlib.mlab as mlab
In [3]: x = n.random.rand(20,4)
In [4]: r = n.rec.fromrecords(x, names='age,weight,height,cash')
In [5]: r.dtype
Out[5]: dtype([('age', '<f8'), ('weight', '<f8'), ('height', '<f8'),
('cash', '<f8')])
In [7]: mlab.rec2csv(r, 'mydata.csv')
In [8]: !head mydata.csv
age,weight,height,cash
0.0449935,0.252057,0.316116,0.0635711
0.777189,0.155186,0.0537382,0.233598
0.731376,0.654577,0.977792,0.0171022
0.685975,0.373741,0.714592,0.620079
0.634548,0.956708,0.360962,0.885379
0.431011,0.359094,0.21484,0.961865
0.115155,0.78767,0.352753,0.769402
0.984747,0.720163,0.887608,0.316844
0.0478857,0.813668,0.882535,0.8837
In [9]: newr = mlab.csv2rec('mydata.csv')
In [10]: newr.dtype
Out[10]: dtype([('age', '<f8'), ('weight', '<f8'), ('height', '<f8'),
('cash', '<f8')])
In [11]: newr
Out[11]:
recarray([ (0.044993499999999999, 0.25205699999999998,
0.31611600000000001, 0.063571100000000005),
(0.77718900000000002, 0.15518599999999999, 0.0537382, 0.233598),
(0.73137600000000003, 0.65457699999999996, 0.97779199999999999,
0.017102200000000001),
(0.685975, 0.37374099999999999, 0.714592, 0.62007900000000005),
(0.634548, 0.956708, 0.36096200000000001, 0.88537900000000003),
(0.43101099999999998, 0.35909400000000002, 0.21484, 0.96186499999999997),
(0.11515499999999999, 0.78766999999999998, 0.35275299999999998,
0.76940200000000003),
(0.98474700000000004, 0.720163, 0.88760799999999995,
0.31684400000000001),
(0.047885700000000003, 0.81366799999999995,
0.88253499999999996, 0.88370000000000004),
(0.044475599999999997, 0.89918900000000002,
0.076484499999999997, 0.114994),
(0.75139299999999998, 0.70954300000000003, 0.458505,
0.33839900000000001),
(0.14619299999999999, 0.907717, 0.24915200000000001,
0.67030400000000001),
(0.89663199999999998, 0.61957300000000004,
0.0060039200000000003, 0.048883500000000003),
(0.20794000000000001, 0.56046499999999999,
0.078303899999999996, 0.216032),
(0.28726000000000002, 0.14282500000000001, 0.51740200000000003,
0.553037),
(0.96326999999999996, 0.21327299999999999, 0.72040999999999999,
0.181446),
(0.31984000000000001, 0.39338299999999998, 0.45787899999999998,
0.33919199999999999),
(0.42086200000000001, 0.98801499999999998, 0.53429000000000004,
0.074105699999999997),
(0.104211, 0.15845100000000001, 0.13339200000000001,
0.99228300000000003),
(0.73563299999999998, 0.948407, 0.44708900000000001,
0.79521399999999998)],
dtype=[('age', '<f8'), ('weight', '<f8'), ('height', '<f8'),
('cash', '<f8')])
You can also work with non floating point data
In [14]: url = 'http://ichart.finance.yahoo.com/table.csv?s=GE&d=10&e=20&f=2007&g=d&a=0&b=2&c=1962&ignore=.csv'
In [15]: import urllib
In [16]: urllib.urlretrieve(url, 'ge.csv')
Out[16]: ('ge.csv', <httplib.HTTPMessage instance at 0x8fa7b2c>)
In [17]: r = mlab.csv2rec('ge.csv')
In [18]: !head ge.csv
Date,Open,High,Low,Close,Volume,Adj Close
2007-11-19,38.48,38.51,38.00,38.16,35415000,38.16
2007-11-16,38.50,38.67,37.87,38.65,50181100,38.65
2007-11-15,38.93,38.93,38.13,38.31,41590000,38.31
2007-11-14,39.90,39.95,38.82,39.01,39650800,39.01
2007-11-13,38.50,39.25,38.25,39.21,42053400,39.21
2007-11-12,38.24,39.04,38.17,38.25,36968000,38.25
2007-11-09,38.52,38.75,38.11,38.38,42662200,38.38
2007-11-08,39.20,39.32,37.50,39.02,52970300,39.02
2007-11-07,39.90,39.93,38.99,39.08,46720100,39.08
In [20]: r[:10]
Out[20]:
recarray([ (datetime.datetime(2007, 11, 19, 0, 0), 38.479999999999997,
38.509999999999998, 38.0, 38.159999999999997, 35415000,
38.159999999999997),
(datetime.datetime(2007, 11, 16, 0, 0), 38.5,
38.670000000000002, 37.869999999999997, 38.649999999999999, 50181100,
38.649999999999999),
(datetime.datetime(2007, 11, 15, 0, 0), 38.93, 38.93,
38.130000000000003, 38.310000000000002, 41590000, 38.310000000000002),
(datetime.datetime(2007, 11, 14, 0, 0), 39.899999999999999,
39.950000000000003, 38.82, 39.009999999999998, 39650800,
39.009999999999998),
(datetime.datetime(2007, 11, 13, 0, 0), 38.5, 39.25, 38.25,
39.210000000000001, 42053400, 39.210000000000001),
(datetime.datetime(2007, 11, 12, 0, 0), 38.240000000000002,
39.039999999999999, 38.170000000000002, 38.25, 36968000, 38.25),
(datetime.datetime(2007, 11, 9, 0, 0), 38.520000000000003,
38.75, 38.109999999999999, 38.380000000000003, 42662200,
38.380000000000003),
(datetime.datetime(2007, 11, 8, 0, 0), 39.200000000000003,
39.32, 37.5, 39.020000000000003, 52970300, 39.020000000000003),
(datetime.datetime(2007, 11, 7, 0, 0), 39.899999999999999,
39.93, 38.990000000000002, 39.079999999999998, 46720100,
39.079999999999998),
(datetime.datetime(2007, 11, 6, 0, 0), 40.200000000000003,
40.490000000000002, 39.969999999999999, 40.18, 42131000, 40.18)],
dtype=[('date', '|O4'), ('open', '<f8'), ('high', '<f8'),
('low', '<f8'), ('close', '<f8'), ('volume', '<i4'), ('adj_close',
'<f8')])
|
|
From: Jordan A. <jc...@co...> - 2007-11-20 16:43:23
|
Can someone recomend a way to save the data in such a way that the columns (or rows) are labeled? In otherwords, it would be nice to be able to open the saved data and know what each row is without having to refer to the script that created it. (referring to the creating script feels error prone when you have many rows of data being saved). I'm currently using the 'pylab.save' function to save the data. Thanks, --Jordan Eric Firing wrote: > Jordan Atlas wrote: > >> Is it possible to 'save' a matplotlib figure object using >> something like the python pickle module? Basically, I'd like to save >> the 'figure' as a file so that I can open it and manipulate it if >> something is wrong. Alternative suggestions are welcome. >> > No, this has been requested before but it is not an easy modification > of mpl to make. The alternative suggestion is to always encapsulate > the making of a figure in a script, and then save the script and the > data. If you want to save the combination in a single file, then > arrange for the script and data to reside in a single subdirectory, > and zip or tar that subdirectory. |
|
From: John H. <jd...@gm...> - 2007-11-20 14:21:12
|
On Nov 19, 2007 10:08 PM, Jeff Whitaker <js...@fa...> wrote: > Bryan Fodness wrote: > > I would like to use pcolor with the colors going from white (zero > > values) to black (largest value). > pcolor(a, shading = 'flat', cmap=cm.binary) It may not be a binary map you want (that has just two colors) but a reversed grayscale map which is continuous from white to black, in which case you would use cmap=cm.gray_r JDH |
|
From: Michael D. <md...@st...> - 2007-11-20 13:08:10
|
Which version(s) of matplotlib are you using (on both platforms)...
Cheers,
Mike
Jun She wrote:
> <mailto:mat...@li...>Dear matplotlib users,
>
> The operating system of my PC is Ubuntu dapper.
> I installed matplotlib with Python 2.4.
>
> When I use /imshow/ with /axis('equal') /, the axis of the output figure
> is not equal.
> However, when I run same script in my laptop with Windows XP, the figure
> seems OK.
>
> Why?
> Many thanks!
>
> BR/Jun
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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: Jun S. <sh...@gm...> - 2007-11-20 07:53:18
|
<mat...@li...>Dear matplotlib users,
The operating system of my PC is Ubuntu dapper.
I installed matplotlib with Python 2.4.
When I use *imshow* with *axis('equal')*, the axis of the output figure is
not equal.
However, when I run same script in my laptop with Windows XP, the figure
seems OK.
Why?
Many thanks!
BR/Jun
|
|
From: Jeff W. <js...@fa...> - 2007-11-20 04:08:13
|
Bryan Fodness wrote: > I would like to use pcolor with the colors going from white (zero > values) to black (largest value). > > I am using, > > pcolor(a, shading = 'flat') > colorbar() > > I do not see how to do this. > > > pcolor(a, shading = 'flat', cmap=cm.binary) -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |
|
From: Bryan F. <bry...@gm...> - 2007-11-20 03:37:22
|
I would like to use pcolor with the colors going from white (zero values) to black (largest value). I am using, pcolor(a, shading =3D 'flat') colorbar() I do not see how to do this. --=20 "The game of science can accurately be described as a never-ending insult to human intelligence."=09- Jo=E3o Magueijo |
|
From: Chris D. <di...@al...> - 2007-11-20 02:26:02
|
Hello All, When I launch ipython (by typing "ipython -pylab") and issue the first matplotlib command, such as simply "figure()", I get the following error messages: TkMacOSXDoHLEvent failed : cppe 1 ,kHighLevelEvent 44464458 0000 XDFD,-1708 TkMacOSXDoHLEvent failed : cppe 1 ,kHighLevelEvent 44464458 0000 XDFD,-1708 Any subsequent calls yield no problems. While this is not a show stopper, it is certainly annoying. Any thoughts on what might be causing the problem? Thanks in advance for your assistance! Chris |