You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
(22) |
2
(17) |
3
(21) |
4
(7) |
5
(7) |
6
(17) |
7
(8) |
8
(8) |
9
(33) |
10
(11) |
11
|
12
(2) |
13
(11) |
14
(29) |
15
(13) |
16
(13) |
17
(3) |
18
(2) |
19
(3) |
20
(7) |
21
(17) |
22
(12) |
23
(19) |
24
(19) |
25
(14) |
26
(5) |
27
(25) |
28
(13) |
|
|
|
|
From: Rafael P. P. <rp...@fi...> - 2006-02-16 01:15:52
|
Rafael Perez Pascual wrote: >I have a Debian Ubuntu 5.10 Breeze system in an amd64 machine with >python2.4. I install numpy, scipy and matplotlib without troubles, but >when I treat to import pylab I get a segmentation fault and python >breaks. >I treat lots of thinks but nothing works, some one have an idea about >these? > >Thanks > >Rafael Perez > > >How did you install those packages? What versions? What code did you run that >segfaulted? Can you isolate a small, self-contained example that segfaults so we >can examine it? If it's a numpy or scipy problem (likely), we will be happy to >answer your questions on the appropriate list to avoid cluttering the matplotlib >list. > >-- >Robert Kern >rob...@gm... > >"In the fields of hell where the grass grows high > Are the graves of dreams allowed to die." > -- Richard Harter > > > > I got scipy-0.4.4.tar.gz from the scipy site. I got numpy-0.9.2.tar.gz from the numpy site. I got matplotlib-0.86.2.tar.gz from the matplotlib site. Python2.4 and all other libs from the ubuntu repository. I did the usualy 'python setup.py build' and 'python setup.py install' as root in the scipy-0.4.4 , numpy-0.9.2 and matplotlib-0.86.2 directories. When I try to import pylab I get: rpp@rafael:~$ python Python 2.4.2 (#2, Sep 30 2005, 22:19:27) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from numpy import * >>> from scipy import * Overwriting fft=<function fft at 0x2aaaad8879b0> from scipy.fftpack.basic (was <function fft at 0x2aaaad5f0758> from numpy.dft.fftpack) Overwriting ifft=<function ifft at 0x2aaaad887a28> from scipy.fftpack.basic (was <function inverse_fft at 0x2aaaad5f07d0> from numpy.dft.fftpack) >>> from matplotlib import * >>> import pylab Segmentation fault rpp@rafael:~$ Another try rpp@rafael:~$ python Python 2.4.2 (#2, Sep 30 2005, 22:19:27) [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> import pylab Overwriting fft=<function fft at 0x2aaaaf186320> from scipy.fftpack.basic (was <function fft at 0x2aaaad972ed8> from numpy.dft.fftpack) Overwriting ifft=<function ifft at 0x2aaaaf186398> from scipy.fftpack.basic (was <function inverse_fft at 0x2aaaad972f50> from numpy.dft.fftpack) Segmentation fault rpp@rafael:~$ Scipy whithout ploting works fine and very fast, but allways I try to import pylab I get the segmentation fault. Thak's a lot Robert Rafael perez |
From: Marc A. <ma...@ph...> - 2006-02-15 23:37:06
|
Hi list, Recently, a VISA library was released (http://pyvisa.sourceforge.net/), and I would like to get it and matplotlib working nicely together.=20 VISA is a generic interface for data logging from scientific instruments. Currently, I'm running these things from an ipython window by exec'ing a file object, which refers to some data taking script. Unfortuantely, there seem to be some circumstances under which the plot window will not update. Often (awlays?) it has stopped updating after som= e ui event has occured in the plot window. I've checked the pages on "interactive plotting", and tried wxagg and tkagg backends, but to no ava= il. Hopefully this is a stupid, easily answered question, as I'd rather get o= n with my experiments than trawl through code, but it would be great to get= this working. I feel that python+numpy+matplot+VISA may be a far superior alte= rnative to the frequently used Labview commerical software, and any hints that would save me from reinventing the wheel would be much appreci= ated. BTW: Developers, thank you indeed for matplotlib. It's one of the great libraries for a great language. Marc |
From: Robert K. <rob...@gm...> - 2006-02-15 23:22:26
|
Rafael Perez Pascual wrote: > I have a Debian Ubuntu 5.10 Breeze system in an amd64 machine with > python2.4. I install numpy, scipy and matplotlib without troubles, but > when I treat to import pylab I get a segmentation fault and python > breaks. > I treat lots of thinks but nothing works, some one have an idea about > these? How did you install those packages? What versions? What code did you run that segfaulted? Can you isolate a small, self-contained example that segfaults so we can examine it? If it's a numpy or scipy problem (likely), we will be happy to answer your questions on the appropriate list to avoid cluttering the matplotlib list. -- Robert Kern rob...@gm... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |
From: Rafael P. P. <rp...@fi...> - 2006-02-15 23:18:10
|
I have a Debian Ubuntu 5.10 Breeze system in an amd64 machine with python2.4. I install numpy, scipy and matplotlib without troubles, but when I treat to import pylab I get a segmentation fault and python breaks. I treat lots of thinks but nothing works, some one have an idea about these? Thanks Rafael Perez |
From: John H. <jdh...@ac...> - 2006-02-15 20:09:52
|
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes: Charlie> You could use html image maps to accomplish this. Charlie> Obviously this would be in the context of a web page. I Charlie> think frontpage or dreamweaver has some nice tools for Charlie> creating these. Just google "html image maps" for more Charlie> info. Andrew Dalke has a tutorial on creating html image maps with matplotlib http://www.dalkescientific.com/writings/diary/archive/2005/04/24/interactive_html.html JDH |
From: Charlie M. <cw...@gm...> - 2006-02-15 20:07:38
|
You could use html image maps to accomplish this. Obviously this would be in the context of a web page. I think frontpage or dreamweaver has some nice tools for creating these. Just google "html image maps" for more info. On 2/15/06, Julius Lucks <jul...@gm...> wrote: > Is it possible to embed clickable URLs, associated with data points or > plot features, into PNGs or JPEGs produced by matplotlib? > > Thank you for your help, > > Julius > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=103432&bid#0486&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Julius L. <jul...@gm...> - 2006-02-15 18:59:52
|
Is it possible to embed clickable URLs, associated with data points or plot features, into PNGs or JPEGs produced by matplotlib? Thank you for your help, Julius |
From: Paul R. <Pau...@nr...> - 2006-02-15 15:58:46
|
On Feb 15, 2006, at 10:42 AM, J.B...@if... wrote: > I 've to change line 736 in mplot3d.py too but then it works... > > Line 736: > > - if z: > + if z is None: --> correct or not? Your logic is backwards, I think. This is what I think is correct: def auto_scale_xyz(self, X,Y,Z=None,had_data=None): x,y,z = X,Y,Z try: x,y = X.flat,Y.flat if Z is not None: z = Z.flat except AttributeError: pass self.xy_dataLim.update_numerix(x, y, not had_data) if z is not None: self.zz_dataLim.update_numerix(z, z, not had_data) self.autoscale_view() The PNG I get from python surface.py is attached. Cheers, -- Paul -- Dr. Paul S. Ray E-mail: Pau...@nr... Naval Research Laboratory WWW : http://xweb.nrl.navy.mil/ personnel/paulr/ Code 7655 Phone : (202) 404-1619 Washington, DC 20375 AIM : NRLPSR |
From: <J.B...@if...> - 2006-02-15 15:42:51
|
Hi, >With that change, the demos both work for me. I 've to change line 736 in mplot3d.py too but then it works... Line 736: - if z: + if z is None: --> correct or not? >"python surface.py" makes a nice surface plot. No, for me it looks rather strange... Thanks Jens |
From: Paul R. <Pau...@nr...> - 2006-02-15 12:30:54
|
On Feb 15, 2006, at 7:12 AM, J.B...@if... wrote: > for a better understanding please could someone explain this for > the actual > problem? Arrays are no longer allowed as truth values in numpy, because the "truth" of an array (except one with exactly one element) is ambiguous. > It was about simple surface plots in matplotlib... I took the 3D > package > from http://matplotlib.sourceforge.net/mpl3d.zip and I changed the > following in 'mplot3d.py': > > line 729: > > - if Z: > + if Z is None: --> correct or not? Yes, that is corect. > Now I get this 'The truth value of an array with more than one > element is > ambiguous. Use a.any() or a.all()' ValueError in line 680 ... > > line 680: > > - M = M or self.M > + ??? I changed it to this: def tunit_cube(self,vals=None,M=None): if M is None: M = self.M xyzs = self.unit_cube(vals) With that change, the demos both work for me. "python surface.py" makes a nice surface plot. Now, my question is: Is "mplot3d" planned for inclusion in future matplotlib releases? It does exactly what I need for 3d surface plots without the huge baggage and complexity of the VTK-based solutions that allow interactive 3D and all that stuff I don't need. Cheers, -- Paul -- Dr. Paul S. Ray E-mail: Pau...@nr... Naval Research Laboratory WWW : http://xweb.nrl.navy.mil/ personnel/paulr/ Code 7655 Phone : (202) 404-1619 Washington, DC 20375 AIM : NRLPSR |
From: <J.B...@if...> - 2006-02-15 12:12:34
|
Hi, for a better understanding please could someone explain this for the actual problem? It was about simple surface plots in matplotlib... I took the 3D package from http://matplotlib.sourceforge.net/mpl3d.zip and I changed the following in 'mplot3d.py': line 729: - if Z: + if Z is None: --> correct or not? Now I get this 'The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()' ValueError in line 680 ... line 680: - M = M or self.M + ??? So, I do understand that the 'or' is the problem here but how would you replace it??? Cheers Jens PS.: Maybe someone just send me a 'mplot3d.py' running under numpy... |
From: Eric F. <ef...@ha...> - 2006-02-15 08:06:34
|
Curtis, I have added support for the extent kwarg in the case with origin=None--that is, the case in which contour is being used alone, not superimposed on an image. The intention is that extent = (x0,x1,y0,y1) with origin = None will make (x0,y0) the coordinates of Z[0,0] and (x1,y1) the coordinates of Z[-1,-1]. In other words, it provides an easy way to generate equally-spaced coordinates specified by the end points, and corresponding in a simple and unambiguous way to the Z array. Beyond that, the orientation of the axes is determined in the usual way. This seems logical to me. Curtis Cooper wrote: >>But it does. The X and Y arrays give the coordinates of the Z points. >>If you want to reverse the Y axis, say to have Y increase downward, then >> you do something like this: >> >>a = gca() >>a.set_ylim(a.get_ylim()[::-1]) >> >>There are many other ways to do it, but the point is that the axes are >>drawn with the first ylim value at the bottom and the second at the top, >> so to reverse the axis you simply reverse the order of the y limits. >>Similarly for the x-axis. >> > > > Fair enough, but notice that if I use imshow(Z, extent=[xmin, xmax, > ymax, min]), it displays the image with the ymax extent at the bottom and > ymin at the top of the y-axis, as I intended. For contour, the extent is > always displayed in increasing order in each axis. > With respect to the comparison to imshow: is there any circumstance under which the plotting the same data with the same origin and extent options on the same axes (as in contour_image.py) results in a mis-registration--any sort of mismatch between the image view and the contour view? I still can't find anything wrong; but if you send me a script that illustrates incorrect behavior, I will certainly look at it. Thanks. Eric |
From: John H. <jdh...@ac...> - 2006-02-15 04:08:37
|
>>>>> "Chris" == Chris Seberino <seb...@sp...> writes: Chris> I know this matplotlib code works. I'm having trouble Chris> running it in a CGI script. It appears some of modules Chris> matplotlib imports need certain X Window permissions or Chris> DISPLAY variable set?.... It looks like mpl is trying to load its default backend (eg GTKAgg) and in CGI mode you'll likely want to use an image backend (eg Agg). See the FAQ http://matplotlib.sourceforge.net/faq.html#APPSERVER and links therein. In particular, you'll likely want to set the backend with backend : Agg in your matplotlib rc file -- http://matplotlib.sf.net/matplotlibrc or else in your CGI script with the *use* directive , eg import matplotlib matplotlib.use('Agg') import pylab matplotlib.use must be called *before* importing pylab, and overrides any rc or command line backend settings. JDH |
From: Chris S. <seb...@sp...> - 2006-02-15 01:16:00
|
I know this matplotlib code works. I'm having trouble running it in a CGI script. It appears some of modules matplotlib imports need certain X Window permissions or=20 DISPLAY variable set?.... [seberino root /var/www] # tail /var/log/apache2/error.log [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] import gtk; gdk =3D gtk.gdk [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 37, in ? [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] from _gtk import * [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] RuntimeError [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] : [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] could not open display [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] [Tue Feb 14 17:07:30 2006] [error] [client 127.0.0.1] Premature end of script headers: create_ssg.py |
From: Travis E. O. <oli...@ie...> - 2006-02-14 21:50:45
|
Robert Kern wrote: > George Nurser wrote: > > >>It still seems to me a real 'gotcha' that if Z: doesn't work. Is there >>any possibility of it being allowed to work in numpy? > As Robert said, this was changed intentionally. The construct if Z: is usually used to determine if an argument was passed in. It is usually better to replace this construct with if Z is None: anyway. The major problem is that the 'and' and the 'or' operations do "truth" value testing not "element-by-element" testing. This is going to cause an algorithmic error (but not raise an exception) over and over again. It is better to tell the person they are being ambiguous and move on. I know it can be a bit of a pain to convert code that uses this construct, sorry about that. In the long run I think it will be better than having code that doesn't work because you forgot that 'and' and '&' do two entirely different things. -Travis |
From: Rick M. <rm...@sa...> - 2006-02-14 21:05:28
|
Darren, I did a little more googling after my initial post and found that if I set: font.latex.package : type1cm text.usetex : true text.tex.engine: latex in my .matplotlibrc file the problem goes away. So I guess this is a false alarm, although I don't remember having problems with fonts in Latex in the past. Still, I think I've found my workaround. Thanks for your quick response, and apologies for not having done more research before posting. Rick On Feb 14, 2006, at 2:00 PM, Darren Dale wrote: > Hi Rick, > >> Forgive me if this is a FAQ. I'm having trouble outputting fonts into >> EPS files from matplotlib. If I plot a figure and then include the >> figure in a LaTeX file, I get the figure minus the text in the xlabel >> and ylabel fields. If I use Preview (I'm on a Mac) to show the >> figure, the captions are there. >> >> Any idea what's wrong? Is there an easy workaround? > > I'm not sure. Maybe on of the Mac users can speak up, but in the > meantime, > please make a barebones test script that will reproduce the > problem, run > python test.py --verbose-debug, and post the output along with the > script > and the resulting eps file. Also, please note any changes you have > made to > your rc settings (for example, are you using the usetex option, > have you > enabled ps.useafm, etc), and what version of mpl you are using. > > Rick Muller rm...@sa... |
From: Darren D. <dd...@co...> - 2006-02-14 21:00:57
|
Hi Rick, > Forgive me if this is a FAQ. I'm having trouble outputting fonts into > EPS files from matplotlib. If I plot a figure and then include the > figure in a LaTeX file, I get the figure minus the text in the xlabel > and ylabel fields. If I use Preview (I'm on a Mac) to show the > figure, the captions are there. > > Any idea what's wrong? Is there an easy workaround? I'm not sure. Maybe on of the Mac users can speak up, but in the meantime, please make a barebones test script that will reproduce the problem, run python test.py --verbose-debug, and post the output along with the script and the resulting eps file. Also, please note any changes you have made to your rc settings (for example, are you using the usetex option, have you enabled ps.useafm, etc), and what version of mpl you are using. |
From: Rick M. <rm...@sa...> - 2006-02-14 20:30:51
|
Forgive me if this is a FAQ. I'm having trouble outputting fonts into EPS files from matplotlib. If I plot a figure and then include the figure in a LaTeX file, I get the figure minus the text in the xlabel and ylabel fields. If I use Preview (I'm on a Mac) to show the figure, the captions are there. Any idea what's wrong? Is there an easy workaround? Thanks in advance, Rick Rick Muller rm...@sa... |
From: Curtis C. <cu...@lp...> - 2006-02-14 20:12:16
|
> But it does. The X and Y arrays give the coordinates of the Z points. > If you want to reverse the Y axis, say to have Y increase downward, then > you do something like this: > > a = gca() > a.set_ylim(a.get_ylim()[::-1]) > > There are many other ways to do it, but the point is that the axes are > drawn with the first ylim value at the bottom and the second at the top, > so to reverse the axis you simply reverse the order of the y limits. > Similarly for the x-axis. > Fair enough, but notice that if I use imshow(Z, extent=[xmin, xmax, ymax, min]), it displays the image with the ymax extent at the bottom and ymin at the top of the y-axis, as I intended. For contour, the extent is always displayed in increasing order in each axis. |
From: Eric F. <ef...@ha...> - 2006-02-14 20:10:53
|
Hanno, See examples/image_masked.py. I think it does what you want. If your version of mpl is recent enough to include this demo, then you are all set. Eric Hanno Klemm wrote: > Hi there, > > is there a possibility to use imshow() with masked arrays? The > problem: I have a large matrix where no_data_values are denominated by > a certain number. It now would be very easy to mask these values and > let imshow for example display them in another color but not use them > in e.g. normalising the color scale. > > I think I saw some other mechansm to do that in the cookbook but I'm > not sure if it can do what I want and at the moment the cookbook (or > rather the scipy server) seems to be down. > > Best regards, > Hanno > > |
From: Eric F. <ef...@ha...> - 2006-02-14 20:05:33
|
Curtis, Curtis Cooper wrote: >>Now I see what you mean. The problem is that the extent kwarg works >>only if the origin kwarg is also set and is not None. I have changed >>the docstring accordingly. There was a reason I made that requirement, >>but possibly it could be relaxed. The alternative is to simply generate >>X and Y arrays that specify the coordinates of your Z points, and then >>call contour(X, Y, Z, ...). >> > > > I think extent should work even if origin is not set, but at least if the > documentation is clear about this, users can figure out the right thing to > do easily enough. OK, probably I will make the change (to allow use of extent without origin) soon, but I did not want to do it in too much of a hurry. > > The alternative you mention does not allow plotting of the y-axis in > reverse. For example, I often put pressure decreasing upward on the > y-axis of my plots. It would be nice if contour(X, Y, Z, ...) respected > my choice of ordering. But it does. The X and Y arrays give the coordinates of the Z points. If you want to reverse the Y axis, say to have Y increase downward, then you do something like this: a = gca() a.set_ylim(a.get_ylim()[::-1]) There are many other ways to do it, but the point is that the axes are drawn with the first ylim value at the bottom and the second at the top, so to reverse the axis you simply reverse the order of the y limits. Similarly for the x-axis. Eric |
From: Robert K. <rob...@gm...> - 2006-02-14 19:47:45
|
Ryan Krauss wrote: > This is a common problem I have with switching code over to numpy. If > you are in the habit of using if myMatrix: as a way to check for an > empty matrix, numpy now throws this error. It could be replaced with > myMatrix.any(), but then I think there are problems if you use the > same code under Numeric or numarray. sometrue() exists as a ufunc in both. -- Robert Kern rob...@gm... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |
From: Robert K. <rob...@gm...> - 2006-02-14 19:46:44
|
George Nurser wrote: > It still seems to me a real 'gotcha' that if Z: doesn't work. Is there > any possibility of it being allowed to work in numpy? We've had a long discussion about this. No. http://www.scipy.net/pipermail/scipy-dev/2005-November/thread.html#3799 In short, that "if Z:" worked in Numeric was a *huge* gotcha that got almost everyone who ever used that feature. -- Robert Kern rob...@gm... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |
From: George N. <ag...@no...> - 2006-02-14 19:29:32
|
On 14 Feb 2006, at 16:59, Ted Drain wrote: > FYI: I believe the best way to check for None is to use: > > if Z is None > > or > > if Z is not None > > This eliminates the possibility of Z implementing the __cmp__ > method which would get called if you use "if Z == None". I only > know this after wasting several hours trying to figure out why some > code that looked perfectly reasonable wouldn't work after I I've fallen into this trap too. Using if Z is None seems to be the *only* sensible way with numpy; it was explained in a mail of Robert Kern's last week. It still seems to me a real 'gotcha' that if Z: doesn't work. Is there any possibility of it being allowed to work in numpy? --George. |
From: Dan C. <jd...@uw...> - 2006-02-14 17:19:33
|
Dan Christensen <jd...@uw...> writes: > I'd like to plot a large number of points (say 10**6 or 10**7) with > different colours. The colours will not naturally be parametrized by > a single float, but rather the rgb components will all vary > independently, so I don't think I can use a colormap. I ended up not using matplotlib for this, but for the sake of anyone with a similar question, I'll briefly say what I did: I had my python program write out raw postscript. This turned out to be extremely efficient in both time and space, and allows very high-resolution printouts from a relatively small postscript file. For example, one plot with 13.5 million points is stored in an uncompressed postscript file which is only 24MB, less than 2 bytes per point (and the points vary in x, y coordinates, R,G,B colours and radii). I'm able to do this by taking into account (non-linear) symmetries of the plot (making the postscript code do some of the calculations) and by taking into account patterns in the colours and radii. I'd still love it if matplotlib's scatter command could handle small round dots more efficiently, since I use it for most of my other work, but for now the above is working for me. Dan |