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
(1) |
2
(4) |
3
(3) |
4
(2) |
5
(4) |
6
(15) |
7
(17) |
8
(4) |
9
(5) |
10
(14) |
11
(16) |
12
(37) |
13
(38) |
14
(16) |
15
(2) |
16
(6) |
17
(4) |
18
(14) |
19
(4) |
20
(1) |
21
(14) |
22
(2) |
23
(6) |
24
(16) |
25
(4) |
26
(1) |
27
(10) |
28
(30) |
29
(7) |
30
(4) |
31
(15) |
|
|
|
|
|
On 2006年7月13日, John Hunter apparently wrote: > from numpy import rand That has become: from numpy.random import rand Cheers, Alan Isaac
>>>>> "Eric" == Eric Firing <ef...@ha...> writes: Eric> To reply more directly to your proposal now that I have Eric> thought about it more: although I see the logic in it, I Eric> don't see much gain from your Nx2 idea; it not very hard to Eric> simply write P.plot(z[:,0], z[:,1]). Furthermore, And with the new .T attribute in numpy, you can do from numpy import rand X = rand(20,2) plot(*X.T) JDH
On Thursday 13 July 2006 4:34 am, Mark Bakker wrote: > To be honest, I think the native array storage order matters a lot. [...] > However, a 1D vector in Python is by default a row, while in Matlab it is a > column. > What are you going to do if a 1D row is given as first argument and a > matrix as second??? matplotlib's load command returns a row vector, regardless of whether the data is Mx1 or 1xM.
On Wed, Jul 12, 2006 at 01:19:41PM -1000, Eric Firing wrote: > To summarize, the options seem to be: >=20 > 1) Leave plot argument parsing alone. > 2) Accept an Nx2 array in place of a pair of arguments containing x and= y. >=20 > 3) Implement the Matlab model. > 4) Implement the Matlab model, but taking rows instead of columns in an= =20 > X or Y array that is 2-D. >=20 > I am open to arguments, but my preference is the Matlab model. I don't= =20 > think that the difference in native array storage order matters much.=20 > It is more important to have the API at the plot method and function=20 > level match the way people think. I wasn't aware of the matlab model when I made the suggestion -- havn't used it for such a long time! Option (3) looks good for consistency: for one argument, always plot agains row index, for two arguments, plot columns of x to columns of y, using broadcasting if necessary (i.e. if either x or y is a vector). Regards St=E9fan
On Thu, Jul 13, 2006 at 10:34:11AM +0200, Mark Bakker wrote: > To be honest, I think the native array storage order matters a lot. > When you have a large dataset, transposing the matrix is not a cheap > command. If you use numpy, transposing is cheap. You see it when you try import numpy as N z =3D N.random.random([1000,1000]) print "Transposing..." for x in range(10000): z.transpose() in the latest SVN of numpy, they also have the convencience-shorthand of z.T (which calls z.transpose()). Regards St=E9fan
On 2006年7月12日, Eric Firing apparently wrote: > 3) Implement the Matlab model. +1 Cheers, Alan Isaac PS This is fairly close to the (more constrained) GAUSS model.
On Wed, Jul 12, 2006 at 05:59:16PM -1000, Eric Firing wrote: > To reply more directly to your proposal now that I have thought about i= t=20 > more: although I see the logic in it, I don't see much gain from your=20 > Nx2 idea; it not very hard to simply write P.plot(z[:,0], z[:,1]).=20 > Furthermore, implementing your idea would not conflict with present=20 > behavior, but it would interfere with an alternative version of fancy=20 > argument handling that I think would be much more generally useful. Thanks, I found the description in the other thread. Regards St=E9fan
Hi Eric On Wed, Jul 12, 2006 at 05:59:16PM -1000, Eric Firing wrote: > To reply more directly to your proposal now that I have thought about i= t=20 > more: although I see the logic in it, I don't see much gain from your=20 > Nx2 idea; it not very hard to simply write P.plot(z[:,0], z[:,1]).=20 > Furthermore, implementing your idea would not conflict with present=20 > behavior, but it would interfere with an alternative version of fancy=20 > argument handling that I think would be much more generally useful. Could you expand on what you mean with alternative fancy argument handlin= g? Thanks St=E9fan
Eric - To be honest, I think the native array storage order matters a lot. When you have a large dataset, transposing the matrix is not a cheap command. But I also understand the logic of plotting column against column. However, a 1D vector in Python is by default a row, while in Matlab it is a column. What are you going to do if a 1D row is given as first argument and a matrix as second??? I don't like the Matlab model when one matrix is passed. It should really plot the first column along the x-axis and all the other columns along y. Like your 2nd option below, but with NxM array. It would then be very nice to have an optional argument to the function to plot all rows against the first row. That would be very easy to implement and keep everybody happy. As you said, there will be many more opinions, Mark To summarize, the options seem to be: > > 1) Leave plot argument parsing alone. > 2) Accept an Nx2 array in place of a pair of arguments containing x and y. > > 3) Implement the Matlab model. > 4) Implement the Matlab model, but taking rows instead of columns in an > X or Y array that is 2-D. > > I am open to arguments, but my preference is the Matlab model. I don't > think that the difference in native array storage order matters much. > It is more important to have the API at the plot method and function > level match the way people think. > > Eric > >
Matplotlib version: '0.87.2' I'm getting the following error: TypeError: unsupported operand type(s) for /: 'BinOp' and 'BinOp' On the following line in finance.py sy = (ax.bbox.ur().y() - ax.bbox.ll().y()) / (ax.viewLim.ur().y() - ax.viewLim.ll().y()) Is this a know issue? Am I doing something wrong? Vineet
Stefan van der Walt wrote: > On Tue, Jul 11, 2006 at 10:53:59PM -0400, Charlie Moad wrote: > >>2006年06月22日 Added support for numerix 2-D arrays as alternatives to >> a sequence of (x,y) tuples for specifying paths in >> collections, quiver, contour, pcolor, transforms. >> Fixed contour bug involving setting limits for >> color mapping. Added numpy-style all() to numerix. - EF > > > It would be useful to have plot accept a 2-D array as well. Would > patches for this be considered, or is there some reason why this can't > work? At the moment, doing > > P.plot(z) where z is Nx2, > > raises > > RuntimeError: xdata and ydata must be the same length > > So it doesn't look as though this functionality will override any > current feature. Stefan, To reply more directly to your proposal now that I have thought about it more: although I see the logic in it, I don't see much gain from your Nx2 idea; it not very hard to simply write P.plot(z[:,0], z[:,1]). Furthermore, implementing your idea would not conflict with present behavior, but it would interfere with an alternative version of fancy argument handling that I think would be much more generally useful. Eric
On Wednesday 12 July 2006 10:12 pm, Till Wagner wrote: > Hello, > > I'm having a problem with the legend in matplotlib. > Sometimes the upper border of the legend goes throug > the first line of text in the legend. Is there any > chance to control the space between the text and the > upper border to avoid this? You can set legend.pad in your rc settings, or you can change the legend's pad property either when you create it or after the fact l=legend(['ok'], pad=0.5) l.pad=1.5 draw() Would you post an example that exposes the problem? Darren
Hello, I'm having a problem with the legend in matplotlib. Sometimes the upper border of the legend goes throug the first line of text in the legend. Is there any chance to control the space between the text and the upper border to avoid this? -- Till Wagner ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Darren, > As of svn 2560, the label will render over the left or right y-axis > depending on the position of the ticks. Sweet ! Thanks a lot ! And following your advice, I came up with the following solution to my problem (forcing the mantissa to multiple of 3, with a given number of decimals). Should I post it on the wiki ? Cheers, and thx again Pierre #------------------------------------------------------------------------------ class EngrFormatter(ScalarFormatter): """A variation of the standard ScalarFormatter, using only multiples of three in the mantissa. A fixed number of decimals can be displayed with the optional parameter `ndec` . If `ndec` is None (default), the number of decimals is defined from the current ticks. """ def __init__(self, ndec=None, useOffset=True, useMathText=False): ScalarFormatter.__init__(self, useOffset, useMathText) if ndec is None or ndec < 0: self.format = None elif ndec == 0: self.format = "%d" else: self.format = "%%1.%if" % ndec def _set_orderOfMagnitude(self,range): ScalarFormatter._set_orderOfMagnitude(self,range) self.orderOfMagnitude = 3*(self.orderOfMagnitude//3) def _set_format(self): # set the format string to format all the ticklabels locs = (array(self.locs)-self.offset) / 10**self.orderOfMagnitude+1e-15 sigfigs = [len(str('%1.3f'% loc).split('.')[1].rstrip('0')) \ for loc in locs] sigfigs.sort() if self.format is None: self.format = '%1.' + str(sigfigs[-1]) + 'f' if self._usetex or self._useMathText: self.format = '$%s$'%self.format
On Wednesday 12 July 2006 7:19 pm, you wrote: > Darren Dale wrote: > > On Wednesday 12 July 2006 16:16, Mark Bakker wrote: > >>I am following up on the discussion of passing a single 2D array to plo= t. > >>Wouldn't it make more sense that, in Python array style, > >>if you give it a single N x K argument you plot rows against the first > >> row? > > > > That's not the behavior I would have expected. I would have expected ea= ch > > row to be plotted as a funtion of the column index, just like > > plot([1,2,3,4]) is done now, but with each row in a different color. I > > would like > > plot([1,2,3,4], array([[1,2,3,4],[2,3,4,5]])) to plot two lines as a > > function of the single x-list, and I would like=20 > > plot(array([[1,2,3,4],[2,3,4,5]]), array([[1,2,3,4],[2,3,4,5]])) to take > > the next obvious step. I *think* matlab does this, but its been so long > > since I used it... > > I was afraid someone would bring up these possibilities... Let me temper what I said. *If* a change was considered, what I described=20 seems to be the most intuitive behavior. > We are going to have some tradeoffs among matlab compatibility, internal > consistency, and adherence to the underlying data storage model. agreed > Here is what Matlab does (and in one respect it is not what I thought I > remembered): > > 1) Given a single NxK matrix, it plots each column against the row index. > > 2) Given a vector and an NxK, it plots each column against the vector. > > 3) Given an NxK and a vector, it plots the vector against each column. > > 4) Given an NxK and an NxK it plots each column from the second against > the corresponding column of the first. > > I think this is a good model: fairly simple, consistent, intuitive, and > covers a good range of real-life situations. =A0It differs from what I > thought I remembered, and from what I think Stefan requested, in that, > given an Nx2, it does not plot the second column against the first. > That behavior, however, does not generalize nicely to NxK for any K!=3D2, > so I now think we should choose either one or the other. =A0 A virtue of > Stefan's Nx2 proposal is that it is consistent with the changes I made > to elsewhere so that paths can be specified as Nx2 arrays; this, in > turn, was consistent with the original specification as sequences of > (x,y) tuples. =A0But plot has never used sequences of (x,y) tuples, so the > argument for the Nx2 form is weaker here. > > I don't know whether the reason Matlab chooses the columns as the data > vectors is because of the Fortran storage order Matlab uses, or whether > there is some other reason.=20 I believe this is the reason. > Personally I am very comfortable with it,=20 > perhaps simply because of my Matlab experience. =A0I think part of it is > that columns in a table seem more natural as data vectors than rows, > however; tables are usually oriented so that columns (fields) are > different variables, and the row index is the sample number, or time, or > a spatial coordinate. > > To summarize, the options seem to be: > > 1) Leave plot argument parsing alone. > 2) Accept an Nx2 array in place of a pair of arguments containing x and y. > > 3) Implement the Matlab model. > 4) Implement the Matlab model, but taking rows instead of columns in an > X or Y array that is 2-D. > > I am open to arguments, but my preference is the Matlab model. =A0I don't > think that the difference in native array storage order matters much. > It is more important to have the API at the plot method and function > level match the way people think. I would probably use 4, but not 3. I don't like the sound of 2. But that's= =20 just my opinion.=20 Darren
I found that using any of the non-GTK backends--like QTAgg or WXAgg--caused show() to block and at stopped the thread issues. I am not sure the implications of this, but it works for now. So I am content at least for the moment. Thanks, Lane John Pye wrote: > Hi Lane, > > I don't have any answers for you here, but I do wonder if you might > gains some insight on this by looking at the way IPython handles its > '-pylab' and '-gthread' etc flags? > > Cheers > JP > > Lane Brooks wrote: > >> So my question is: what is the correct way to setup python and/or >> matplotlib when running python embedded? Is there a way to make show() >> blocking when using embedded python (I am not sure this will solve any >> problems). >> >> Thanks, >> Lane Brooks >> >>
Hi Lane, I don't have any answers for you here, but I do wonder if you might gains some insight on this by looking at the way IPython handles its '-pylab' and '-gthread' etc flags? Cheers JP Lane Brooks wrote: >So my question is: what is the correct way to setup python and/or >matplotlib when running python embedded? Is there a way to make show() >blocking when using embedded python (I am not sure this will solve any >problems). > >Thanks, >Lane Brooks > >
Jeff Sadino wrote: > I am trying to map the surface of Saturn's largest moon, Titan for a summer research project. As a rough draft, I would like to plot the temperature (colored red) at the longitude(x) and latitude(y) coordinates. My data file is tab delimited in three columns (x,y,T). I am also missing some x,y locations, which I would like to leave blank. > > As a final report, I would like the data point to be able to take on different geometries (circle, hexagon, arbitrary shape, etc) and different sizes as well as be able to overlap with neighboring data points. Finally, I would like to be able to plot this not on a rectangular cartesion coordinate system, but on a planetographic (global projection) coordinate system. > > I've spent two days trying everything from gnuplot, matlab, matplotlib and others trying to do this, but to no avail. Any suggestions would be very welcomed. > > > Jeff: The Basemap toolkit can plot data on may different map projections. Here's an example that plots some random data on an orthographic projection: from matplotlib.toolkits.basemap import Basemap import pylab as p from matplotlib.numerix.random_array import uniform # set up orthographic map projection with # perspective of satellite looking down at 50N, 100W. # use resolution = None, since you don't want earth geography. map = Basemap(projection='ortho',lat_0=50,lon_0=-100,resolution=None) # draw the edge of the map projection region (the projection limb) map.drawmapboundary() # draw lat/lon grid lines every 30 degrees. map.drawmeridians(p.arange(0,360,30)) map.drawparallels(p.arange(-90,90,30)) # number of points to plot. npts = 750 # generate random points on a sphere, # so that every small area on the sphere is expected # to have the same number of points. # http://mathworld.wolfram.com/SpherePointPicking.html u = uniform(0.,1.,size=npts) # this is for numpy, for Numeric use shape=npts v = uniform(0.,1.,size=npts) lons = 360.*u lats = (180./p.pi)*p.arccos(2*v-1) - 90. # transform lons and lats to map coordinates. x,y = map(lons,lats) # random intensities between 0 and 1 z = uniform(0.,1.,size=npts) # plot filled circles at the locations of the points # with size=202 points, with intensities colored using jet colormap. # you can change the shape of the marker with the 'marker' keyword # faceted=False makes the edge colors the same as the fill colors # see http://matplotlib.sourceforge.net/matplotlib.pylab.html#-scatter map.scatter(x,y,20,z,cmap=p.cm.jet,marker='o',faceted=False) p.show() -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
Darren Dale wrote: > On Wednesday 12 July 2006 16:16, Mark Bakker wrote: > >>I am following up on the discussion of passing a single 2D array to plot. >>Wouldn't it make more sense that, in Python array style, >>if you give it a single N x K argument you plot rows against the first row? > > > That's not the behavior I would have expected. I would have expected each row > to be plotted as a funtion of the column index, just like plot([1,2,3,4]) is > done now, but with each row in a different color. I would like > plot([1,2,3,4], array([[1,2,3,4],[2,3,4,5]])) to plot two lines as a function > of the single x-list, and I would like plot(array([[1,2,3,4],[2,3,4,5]]), > array([[1,2,3,4],[2,3,4,5]])) to take the next obvious step. I *think* matlab > does this, but its been so long since I used it... I was afraid someone would bring up these possibilities... One of the problems with fancy argument handling is that there are many ways it can be done, so we have to decide on the behavior we want; and inevitably this will surprise (and probably irritate) some people just as it pleases others. (Other problems include complex code, complex documentation, and runtime overhead. For interactive use, however, fancy argument handling may be worth the trouble.) We are going to have some tradeoffs among matlab compatibility, internal consistency, and adherence to the underlying data storage model. Here is what Matlab does (and in one respect it is not what I thought I remembered): 1) Given a single NxK matrix, it plots each column against the row index. 2) Given a vector and an NxK, it plots each column against the vector. 3) Given an NxK and a vector, it plots the vector against each column. 4) Given an NxK and an NxK it plots each column from the second against the corresponding column of the first. I think this is a good model: fairly simple, consistent, intuitive, and covers a good range of real-life situations. It differs from what I thought I remembered, and from what I think Stefan requested, in that, given an Nx2, it does not plot the second column against the first. That behavior, however, does not generalize nicely to NxK for any K!=2, so I now think we should choose either one or the other. A virtue of Stefan's Nx2 proposal is that it is consistent with the changes I made to elsewhere so that paths can be specified as Nx2 arrays; this, in turn, was consistent with the original specification as sequences of (x,y) tuples. But plot has never used sequences of (x,y) tuples, so the argument for the Nx2 form is weaker here. I don't know whether the reason Matlab chooses the columns as the data vectors is because of the Fortran storage order Matlab uses, or whether there is some other reason. Personally I am very comfortable with it, perhaps simply because of my Matlab experience. I think part of it is that columns in a table seem more natural as data vectors than rows, however; tables are usually oriented so that columns (fields) are different variables, and the row index is the sample number, or time, or a spatial coordinate. To summarize, the options seem to be: 1) Leave plot argument parsing alone. 2) Accept an Nx2 array in place of a pair of arguments containing x and y. 3) Implement the Matlab model. 4) Implement the Matlab model, but taking rows instead of columns in an X or Y array that is 2-D. I am open to arguments, but my preference is the Matlab model. I don't think that the difference in native array storage order matters much. It is more important to have the API at the plot method and function level match the way people think. Eric
matplotlib+basemap may do it for you. I'm not sure how much of it's hard coded for the Earth though... http://www.scipy.org/Cookbook/Matplotlib/Maps At 08:49 AM 7/12/2006, Jeff Sadino wrote: >I am trying to map the surface of Saturn's largest moon, Titan for a >summer research project. As a rough draft, I would like to plot the >temperature (colored red) at the longitude(x) and latitude(y) >coordinates. My data file is tab delimited in three columns (x,y,T). I >am also missing some x,y locations, which I would like to leave blank. > >As a final report, I would like the data point to be able to take on >different geometries (circle, hexagon, arbitrary shape, etc) and different >sizes as well as be able to overlap with neighboring data >points. Finally, I would like to be able to plot this not on a >rectangular cartesion coordinate system, but on a planetographic (global >projection) coordinate system. > >I've spent two days trying everything from gnuplot, matlab, matplotlib and >others trying to do this, but to no avail. Any suggestions would be very >welcomed. > > > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Matplotlib-users mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users Ted Drain Jet Propulsion Laboratory ted...@jp...
Mark Bakker wrote: > > On the same token, it would be really nice if contour, pcolor and image > take as an x and y argument not only a matrix but just a 1D row. This > should be really easy and would be very useful. contour already does this, and I agree that pcolor and pcolormesh should. pcolor* is a little more complicated than contour because the X and Y dimensions are ideally larger by 1 than the corresponding Z dimensions, but don't have to be. image does not take x,y arguments at all, by design. > > In fact, if more people want it I can submit a patch for the latter one, OK. I suggest a function that can be used for both pcolor and pcolormesh. (Some day the two should be consolidated, but there is a pcolormesh bug with alpha != 1, so we can't do it yet.) Eric
Hi: I obtain the following error when saving a figure to postscript after running one of the test routines in mplot3d.py: >>> from numpy import *; import mpl3d.mplot3d as p3; import pylab as p >>> p3.test1() >>> p.savefig('test1') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.4/site-packages/matplotlib/pylab.py", line 811, in savefig return fig.savefig(*args, **kwargs) File "/usr/local/lib/python2.4/site-packages/matplotlib/figure.py", line 660, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/local/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py", line 1061, in print_figure self.figure.draw(renderer) File "/usr/local/lib/python2.4/site-packages/matplotlib/figure.py", line 531, in draw for a in self.axes: a.draw(renderer) File "/usr/local/lib/python2.4/site-packages/mpl3d/mplot3d.py", line 714, in draw self.w_xaxis.draw(renderer) File "/usr/local/lib/python2.4/site-packages/mpl3d/mplot3d.py", line 613, in draw tick.draw(renderer) File "/usr/local/lib/python2.4/site-packages/matplotlib/axis.py", line 161, in draw if self.label1On: self.label1.draw(renderer) File "/usr/local/lib/python2.4/site-packages/matplotlib/text.py", line 1166, in draw self.update_coords(renderer) File "/usr/local/lib/python2.4/site-packages/mpl3d/mplot3d.py", line 411, in update_coords return text_update_coords(self, renderer) File "/usr/local/lib/python2.4/site-packages/mpl3d/mplot3d.py", line 102, in text_update_coords we = self._mytext.get_window_extent(renderer=renderer) AttributeError: TextWithDash instance has no attribute '_mytext' I installed matplotlib-0.87.3 and mpl3d yesterday and today. After a bit of hunting, I noticed there are two similar definitions of TextWithDash in matplotlib's text.py: _TextWithDash and TextWithDash. Noting the underscored version defines _mytext but the underscore-free version does not, I switched the underscores. Now things are working (though perhaps I've broken something else in the process). I suspect the error is a product of on-going changes to matplotlib; nonetheless, I thought my email might be helpful to others. Andrew
On Wednesday 12 July 2006 16:16, Mark Bakker wrote: > I am following up on the discussion of passing a single 2D array to plot. > Wouldn't it make more sense that, in Python array style, > if you give it a single N x K argument you plot rows against the first row? That's not the behavior I would have expected. I would have expected each row to be plotted as a funtion of the column index, just like plot([1,2,3,4]) is done now, but with each row in a different color. I would like plot([1,2,3,4], array([[1,2,3,4],[2,3,4,5]])) to plot two lines as a function of the single x-list, and I would like plot(array([[1,2,3,4],[2,3,4,5]]), array([[1,2,3,4],[2,3,4,5]])) to take the next obvious step. I *think* matlab does this, but its been so long since I used it... Darren
On Wednesday 12 July 2006 09:49, Darren Dale wrote: > Hello, um..., P., > > On Wednesday 12 July 2006 03:43, PGM wrote: > > Folks, > > I need your wisdom about ticks labels on ordinates for large numbers > > (>1e4). The default behavior I have (0.87.4) is to display tick labels as > > "%.1f", and write a string "x1e+..." above the top left corner of the > > current axes. > > > > - When using "yaxis.tick_right()", the "x1e..." string stays above the > > top left corner. That becomes an issue when using two different scales. > > How could I force the 'mantissa' string to be on the same side as the > > axis it depends on ? > > I'll take care of this, but I will need a few days. As of svn 2560, the label will render over the left or right y-axis depending on the position of the ticks. Darren
I am a newbie to python, numpy, and matplotlib, and I like what I have seen so far. I have been wishing for a long time there was an open alternative to matlab, and when I heard about numpy and matplotlib, I tried them out immediately. Anyway, I am running python embedded in a C++ WX app. I just discovered matplotlib, so I tried it out. From the interactive python shell (vanilla FC5 linux install of python and matplotlib) everything works fine. The show() command blocks. In my application, I use the PyRun_SimpleFile command to execute user selected python files on a separate thread. That has seemed to work fine for several weeks on scripts using numpy and such. When I use matplotlib, however, the show() command does not block, and then strange things happen when I try to close the Figure window. On the first close it reopens the window right back up. On the second close attempt it closes (gdb splits out zombie thread messages), and then if I try to execute another script with a show() command in it it sometimes seg faults, sometimes works, but in general causes my program to behave strangely. So my question is: what is the correct way to setup python and/or matplotlib when running python embedded? Is there a way to make show() blocking when using embedded python (I am not sure this will solve any problems). Thanks, Lane Brooks