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
|
From: <seb...@sp...> - 2004-12-30 02:18:29
|
I'm getting great pcolor plots like attached one and learning lots about it. So far so good. One minor question if you don't mind... I'm getting an empty white strip across the top of attached plot as you can see which led me deeper into workings of pcolor function. It seems if your grid has 20 rows ( different y values) of points that you won't get 20 colored horizontal strips but rather *19*. This is because we must lose one row to specify the top and/or bottom EDGE of the plot.... so XX rows means (XX-1) rows of colored squares. Please tell me if this is right but more importantly, how to most wisely remove the white horizontal strip from this pcolor plot. Thanks! chris |
From: John H. <jdh...@ac...> - 2004-12-29 18:25:29
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes: Eric> Am I doing something wrong there? No, this is a bug in the tick labeling / extent setting for aspect preserved images - thanks for reminding me. I had managed to suppress it from my active memory! JDH |
From: Eric E. <ems...@ob...> - 2004-12-29 18:22:19
|
Hi, I am trying to display an image with imshow. What I am doing now is to write a small function which plot the image preserving the aspect ratio of the pixels in X and Y, but scaling the size of the image of the window but at the same time scaling the axes either to just surround the image (default) or to be larger. This should be easy as I can use 'preserve' for the 'aspect' of imshow: that takes care of the pixel scale on the figure. However then it does have axis which show incorrect coordinates, namely: - along the direction where the image is filling the figure window better it shows the right coordinates - along the other direction, the image is not filling the entire length (as expected if the image does not follow the window aspect ratio) but the axis are STILL showing the limits of the image. To be clear: for a square figure window. If my image is 100 x 50, then with aspect='preserve' I have the right coordinates along X (showing 0==> 100) but the wrong coordinates for Y (showing 0=>50, and NOT 0=>100 as it should since it fills only half the figure...). I hope this is clear. Am I doing something wrong there? Thanks, Eric E. -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |
From: John H. <jdh...@ac...> - 2004-12-29 14:42:19
|
>>>>> "seberino" == seberino <seb...@sp...> writes: seberino> I installed Numeric and I can import it into Python but seberino> newest stable Matplotlib is barfing on it. I installed seberino> Matplotlib after I installed Numeric so I'm not sure seberino> reinstalling it will fix this problem. How fix? Just to be sure * rm -rf your "build" subdir in the matplotlib directory * make sure you have Numeric installed for the same python you are building with. Eg, specify the full path to python when testing and building > /usr/bin/python2.3 >>> import Numeric >>> CTRL-D > sudo /usr/bin/python2.3 setup.py install >& build.out * make sure you choose numerix : Numeric in .matplotlibrc If you encounter more problems, post build.out - the incantation for capturing standard output and standard error may differ depending on your shell Most of the times problems like this occur from distutils not properly rebuilding when it should and can be solved by erasing its memory, ie the "build" directory. Let me know... JDH |
From: <seb...@sp...> - 2004-12-29 07:11:12
|
I installed Numeric and I can import it into Python but newest stable Matplotlib is barfing on it. I installed Matplotlib after I installed Numeric so I'm not sure reinstalling it will fix this problem. How fix? Chris ...Here is error output....: The import of the numeric version of the _contour module, _nc_contour, failed. This is is either because numeric was unavailable when matplotlib was compiled, because a dependency of _nc_contour could not be satisfied, or because the build flag for this module was turned off in setup.py. If it appears that _nc_contour was not built, make sure you have a working copy of numeric and then re-install matplotlib. Otherwise, the following traceback gives more details: Traceback (most recent call last): File "test_campbell_diagram.py", line 10, in ? import campbell_diagram File "/home/seberino/MAIN/BusinessStuff/ThomasStuff/PlottingProject/CampbellDi agram/campbell_diagram.py", line 14, in ? import matplotlib.pylab File "/usr/lib/python2.3/site-packages/matplotlib/pylab.py", line 184, in ? from axes import Axes, PolarAxes File "/usr/lib/python2.3/site-packages/matplotlib/axes.py", line 11, in ? import _contour File "/usr/lib/python2.3/site-packages/matplotlib/_contour.py", line 11, in ? from matplotlib._nc_contour import * ImportError: No module named _nc_contour |
From: John H. <jdh...@ac...> - 2004-12-29 03:54:18
|
>>>>> "Eric" == Eric Emsellem <ems...@ob...> writes: Eric> Hi, working more and more with matplotlib and adapt my local Eric> tools I find that (for me) 2 plotting functionalities are Eric> still missing (but are in the list of the ''goals''): Eric> - plotting a surface either using a mesh/grid like plotwith Eric> colours or a smooth rendering - I am not familiar with "plotwith colours". Is that a gnuplot command? I assume you are referring to a 3D surf or mesh plot here, no? The official answer here has always been we're deferring any serious work on 3D until we have a feature complete 2D lib in part because there are already a number of excellent 3D tools for python. There has been some proof-of-concept work integrating VTK ( a premier 3D lib) with matplotlib/agg -- you can find links on the goals page. Although there are good tools already out there, I am receptive to the argument that it's nice to have a core set of functionality under one roof, and so would like to include support for basic 3D plots down the road. If some enterprising person wanted to take this on sooner, I wouldn't be opposed. But I can't give you an estimate on the time frame right now. Like much in the open source world, it's chronically 6 months away :-) Eric> have the connect function update the ''key'' field when Eric> using the keyboard OK, to make up for the non-committal answer above, I implemented this in CVS and it will be available in the next release. Here's the keypress_demo from CVS from pylab import * def press(event): if event.key=='g': grid() draw() connect('key_press_event', press) title('press g to toggle grid') plot(rand(12), rand(12), 'go') show() In the process of getting this to work, I refactored the event handling across backends in such a way that it is now robust and seems to work well on all the backends, supporting multiple connects and disconnects. JDH |
From: John H. <jdh...@ac...> - 2004-12-29 03:44:23
|
>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes: Jeff> I'm currently working on a map plotting module. I've added Jeff> the ability to plot filled continents on various map Jeff> projections, using the GSHHS coastline polygon dataset Jeff> (http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html). This Jeff> dataset provides polygon segments that define continental Jeff> outlines. However, before I post it here I'd like to also Jeff> provide the capability to fill the 'wet' areas as well. In Jeff> order to do this I need to figure out how to fill the area Jeff> between the polygons. Looks like this module Jeff> (http://www.dezentral.de/soft/Polygon/index.html) would do Jeff> the trick, but it requires the generaly polygon clipping C Jeff> library. Do you have any suggestions? agg actually includes a wrapper for gpc, as well as the gpc code itself, but gpc is GPLd and I haven't included it in matplotlib for that reason. Agg separately implements a "scanline boolean algebra" which I haven't studied in detail but which I understand basically does the same thing: allow clipping to arbitrary polygons, and supports boolean operations on polygons -- http://www.antigrain.com/demo/index.html#PAGE_DEMO_scanline_boolean We have to expose the functionality such that it is available for use by other backends, much as we use agg for image across backends. If this is an area that you want to dive into, by all means. Otherwise, it's on the list of things to do (I just added it to the goals page in my tree, so it will appear on the site docs in the not-too-distant-future. JDH |
From: Jeff W. <js...@fa...> - 2004-12-28 23:11:28
|
John Hunter wrote: >>>>>>"Jeff" == Jeff Whitaker <js...@fa...> writes: >>>>>> >>>>>> > > Jeff> How do I suppress drawing a line around the polygon when > Jeff> using fill? I've tried fill(x,y,'gray',linewidth=0), but I > Jeff> still get a little tiny line (which is especially noticeable > Jeff> when using the postscript backend). > >Just make the facecolor and edgecolor the same > > > John: Thanks - I figured that one out myself about 5 minutes after I sent the message. I'm currently working on a map plotting module. I've added the ability to plot filled continents on various map projections, using the GSHHS coastline polygon dataset (http://www.soest.hawaii.edu/wessel/gshhs/gshhs.html). This dataset provides polygon segments that define continental outlines. However, before I post it here I'd like to also provide the capability to fill the 'wet' areas as well. In order to do this I need to figure out how to fill the area between the polygons. Looks like this module (http://www.dezentral.de/soft/Polygon/index.html) would do the trick, but it requires the generaly polygon clipping C library. Do you have any suggestions? Thanks for you help, -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/CDC R/CDC1 Email : Jef...@no... 325 Broadway Web : www.cdc.noaa.gov/~jsw Boulder, CO, USA 80303-3328 Office : Skaggs Research Cntr 1D-124 |
From: Alan G I. <ai...@am...> - 2004-12-28 22:33:07
|
>>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes: > Jeff> How do I suppress drawing a line around the polygon when > Jeff> using fill? I've tried fill(x,y,'gray',linewidth=0), but I > Jeff> still get a little tiny line (which is especially noticeable > Jeff> when using the postscript backend). On Tue, 28 Dec 2004, John Hunter apparently wrote: > Just make the facecolor and edgecolor the same I'll chime in here because I know someone is creating arrows using polygons. I have found that *any* width along the edge is a problem for arrows: they must be *only* filled and not stroked or they look like they point to the wrong point. (Perhaps 0.3 point unscaled would not be a serious problem for many uses, but remember there is a join at the tip!) So: is it possible to fill a polygon without stroking the edge (or to set the edge with to approximate 0)? By way of comment: this was a real problem in gnuplot up to version 3.8. (I've been meaning to check whether it was fixed in 4.0.) The arrows were stroked as well as filled, and they often looked very wrong. fwiw, Alan Isaac |
From: Eric E. <ems...@ob...> - 2004-12-28 13:55:56
|
Hi, working more and more with matplotlib and adapt my local tools I find that (for me) 2 plotting functionalities are still missing (but are in the list of the ''goals''): - plotting a surface either using a mesh/grid like plotwith colours or a smooth rendering - have the connect function update the ''key'' field when using the keyboard What is the present status/effort on these issues? thanks! Eric Emsellem -- =============================================================== Observatoire de Lyon ems...@ob... 9 av. Charles-Andre tel: +33 4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33 4 78 86 83 86 France http://www-obs.univ-lyon1.fr/eric.emsellem =============================================================== |
From: John H. <jdh...@ac...> - 2004-12-28 13:25:30
|
>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes: Jeff> How do I suppress drawing a line around the polygon when Jeff> using fill? I've tried fill(x,y,'gray',linewidth=0), but I Jeff> still get a little tiny line (which is especially noticeable Jeff> when using the postscript backend). Just make the facecolor and edgecolor the same >>> fill(x,y, edgecolor='gray', facecolor='gray) or whatever color you want them to be. You can also use aliases >>> fill(x,y, ec='gray', fc='gray) FYI, the new set/get introspection is designed to help you find these things, by printing property names and the values they accept In [3]: p, = fill(x,y) In [4]: p Out[4]: <matplotlib.patches.Polygon instance at 0x3b5ec60> In [5]: set(p) alpha: float antialiased or aa: [True | False] clip_box: a matplotlib.transform.Bbox instance clip_on: [True | False] edgecolor or ec: any matplotlib color - see help(colors) facecolor or fc: any matplotlib color - see help(colors) figure: a matplotlib.figure.Figure instance fill: [True | False] label: any string linewidth or lw: float lod: [True | False] transform: a matplotlib.transform transformation instance visible: [True | False] zorder: any number Hope this helps, JDH |
From: Jeff W. <js...@fa...> - 2004-12-28 12:23:59
|
How do I suppress drawing a line around the polygon when using fill? I've tried fill(x,y,'gray',linewidth=0), but I still get a little tiny line (which is especially noticeable when using the postscript backend). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |
From: Stephen W. <ste...@cs...> - 2004-12-27 19:21:16
|
On Fri, 2004-12-24 at 09:21 -0500, Paul Barrett wrote: > I therefore propose that we start developing a Python version of DS9. > The benefits of a Python version based on matplotlib are TrueType fonts > (with arbitrary text rotation), alpha blending, and direct support for > numarray. Sounds like an interesting project. The first item I'd have on a list of desired features is, surprise, the ability to load multiple aligned images and blink between them. |
From: John H. <jdh...@ac...> - 2004-12-27 19:07:00
|
>>>>> "Haibao" == Haibao Tang <ba...@ug...> writes: Haibao> Hi, in some analysis, I really think it useful if you can Haibao> add a crosshair feature so I can visually align the Haibao> position of peaks and falls (like the stock market), and Haibao> may be not hard to include, too. Basically, if the Haibao> "crosshair" checkbox checked, a horizontal and a vertical Haibao> line will appear with the movement of the mouse. It would be nice to have this feature efficiently across backends. There is an example which shows you how to do this for an arbitrary backend http://matplotlib.sf.net/examples/cursor_demo.py but it can be slow because it redraws the entire figure every time you move the cursor. This is a general problem with animations in matplotlib that we are thinking about - see for example http://sourceforge.net/mailarchive/message.php?msg_id=10330431 . There is also an example showing how to do this for WX/WXAgg (if memory serves, you are using wx because it supports chinese characters). This uses WX to do the cursoring, which is much more efficient because you don't have to redraw the figure http://matplotlib.sf.net/examples/wxcursor_demo.py When time permits, it would be nice to add cursoring on each backend with native drawing of the cursor for efficiency... JDH |
From: John H. <jdh...@ac...> - 2004-12-27 18:57:52
|
>>>>> "Istvan" == Istvan Szapudi <sz...@If...> writes: Istvan> Hi All, I am fairly new to matplotlib, and I am impressed Istvan> with its capabilities. Istvan> I have trouble plotting loglog plots with errorbars. I Istvan> have the following, program, a slightly modified version Istvan> of one given earlier by JDH on 9-28-2004 in this mailing Istvan> list: This is definitely a gotcha that matplotlib needs to be smarted about handling. The log zero error is occurring when the transformation is made on the axes limits and not on the data. The autoscaler picks the best min/max for the data coordinates, and will round down or up to facilitate nice integer ticking. When you plot with linear coords, the autoscaler makes it's pick according to linear scaling, and then when you change scales the old scaling is in effect and the log transform fails when converting the viewport. Solution: rescale the axes after changing coords, either manually ax.set_yscale("log") ax.set_xscale("log") axis([0.5*min(x), 2*max(x), 0.5*min(y-err), 2*max(y+err)]) or use the autoscaler ax.set_yscale("log") ax.set_xscale("log") ax.autoscale_view() or set your log coords *before* calling plot ax = gca() ax.set_yscale("log") ax.set_xscale("log") errorbar(x,y,err,fmt='o') show() and then the errorbar command will pick a "locator" to handle ticking and viewport scaling appropriately from the outset. This is the approach taken in http://matplotlib.sf.net/examples/log_bar.py . Until I get this fixed to work automagically, I'll make it a FAQ. JDH |
From: John H. <jdh...@ac...> - 2004-12-27 18:42:41
|
>>>>> "Edward" == Edward Abraham <Edw...@da...> writes: Edward> Interactive use is great, but I need to draw Matlplotlib Edward> plots to a window from within a wx application. The Edward> example linked to from the screenshots page Edward> (embedding_in_wx.py) is broken. I have attached a simple Edward> modified version (no toolbar, just a plot). Matplotlib Edward> window redraws are quite slow, and the default behaviour Edward> is ugly during resizing. The example shows how to modify Edward> the FigureCanvas class to redraw only during idle Edward> time. This means that there is only one redraw during Edward> resizing. The wxagg backend is chosen, as for the simple Edward> plot shown here it is quicker than the current Edward> implementation of the wx backend. OK, thanks for letting me know. I updated the website - the link should have, and now does, point to examples/embedding_wx2.py. Note the matplotlib examples dir, with the src distribution and at http://matplotlib.sf.net/examples, does contain a few examples showing how to embed matplotlib into WX/WXAgg. Eg, examples/embedding_wx2.py shows how embed use the toolbar as well. Would you mind if I add your example to the examples subdir? Thanks! JDH |
From: Haibao T. <ba...@ug...> - 2004-12-26 04:36:40
|
Hi, in some analysis, I really think it useful if you can add a crosshair feature so I can visually align the position of peaks and falls (like the stock market), and may be not hard to include, too. Basically, if the "crosshair" checkbox checked, a horizontal and a vertical line will appear with the movement of the mouse. Bao |
From: <seb...@sp...> - 2004-12-24 20:05:10
|
Thanks. Exactly what I was looking for. Merry Xmas! CS On Thu, Dec 23, 2004 at 11:00:41PM -0800, Andrew Straw wrote: > seb...@sp... wrote: > > >Attached is a pcolor plot made with Matplotlib. > > > >I was wondering if there is any way I can remove > >thin black lines (borders) in this plot for cases > >like this where I don't have zillions of rectangles > >to make black lines too small to notice. > > > > > > > Does the docstring for pcolor help? > > * shading = 'flat' : or 'faceted'. If 'faceted', a black grid is > drawn around each rectangle; if 'flat', edge colors are same as > face colors > > Try > > pcolor( your_other_args, shading='flat') > > Cheers! > Andrew > -- _______________________________________ Christian Seberino, Ph.D. SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A. Phone: (619) 553-9973 Fax : (619) 553-6521 Email: seb...@sp... _______________________________________ |
From: Paul B. <ba...@st...> - 2004-12-24 14:21:17
|
Stephen Walton wrote: >On Wed, 2004-12-22 at 17:30 -0600, John Hunter wrote: > > > >> - 4x image speedups for large images >> >> > >This is a biggie!! Ladies and gentlemen, my impression is that imshow >is now at least as fast as, and perhaps faster than, DS9 for >astronomical image display. (I'm looking at 1024 square full disk solar >images.) Nice job, John. > > I therefore propose that we start developing a Python version of DS9. The benefits of a Python version based on matplotlib are TrueType fonts (with arbitrary text rotation), alpha blending, and direct support for numarray. -- Paul -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Branch FAX: 410-338-4767 Baltimore, MD 21218 |
From: Andrew S. <str...@as...> - 2004-12-24 07:00:19
|
seb...@sp... wrote: >Attached is a pcolor plot made with Matplotlib. > >I was wondering if there is any way I can remove >thin black lines (borders) in this plot for cases >like this where I don't have zillions of rectangles >to make black lines too small to notice. > > > Does the docstring for pcolor help? * shading = 'flat' : or 'faceted'. If 'faceted', a black grid is drawn around each rectangle; if 'flat', edge colors are same as face colors Try pcolor( your_other_args, shading='flat') Cheers! Andrew |
From: <seb...@sp...> - 2004-12-24 05:16:09
|
Attached is a pcolor plot made with Matplotlib. I have lots of rectangles of different colors which Matplotlib created wonderfully which was exactly what I was trying to do. (I have 400 rectangles across the plot in horizontal direction.) It appears there are small black borders (padding?) to all little colored rectangles that make the plot appear more choppy and less 'blended' in color than I would prefer. It may be that I *must* have more rectangles to make these black borders be invisible. I was wondering if there is any way I can remove thin black lines (borders) in this plot for cases like this where I don't have zillions of rectangles to make black lines too small to notice. Chris -- _______________________________________ Christian Seberino, Ph.D. SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A. Phone: (619) 553-9973 Fax : (619) 553-6521 Email: seb...@sp... _______________________________________ |
From: Istvan S. <sz...@If...> - 2004-12-24 03:49:31
|
Hi All, I am fairly new to matplotlib, and I am impressed with its capabilities. I have trouble plotting loglog plots with errorbars. I have the following, program, a slightly modified version of one given earlier by JDH on 9-28-2004 in this mailing list: ------------------------------------------------------ from matplotlib.matlab import * import random random.seed(13) ## with 10 elements it works ## but with 11 elements it crashes x = arange(1.0,12) y = array(map(lambda s:1e6*random.random()+1e5+1,x)) err = array(map(lambda s:1e5*random.random(),x)) print x,y,err print y-err ax = gca() errorbar(x,y,err,fmt='o') ##plot(x,y) ax.set_yscale("log") ax.set_xscale("log") show() ------------------------------------------------------- The weird thing is that it runs with 10 points, but not with 11 or more. I guess the random generator happens to generate a configuration which breaks the routine. I did check that everything is positive (BTW, it would be great to have a version which simply ignores negative/0 values), the last point does not seem special, I can't figure out what's going on. I run matplotlib 0.64 (sorry I did not convert to pylab yet), on python 2.3.4/gcc 3.3.1 under a fairly new cygwin installation in WinXP SP2. any clue anybody? thanks, I. ps. Merry Xmas/Happy Holidays to everybody! ----------------------------------------------------------- Istvan Szapudi Institute for Astronomy University of Hawaii 2680 Woodlawn Drive Honolulu, HI 96822 USA Tel. : (808) 956-6196 (also x9844 in Febr/March) Fax : (808) 956-9590 Email: sz...@if... WWW : http://www.ifa.hawaii.edu/~szapudi/istvan.html ----------------------------------------------------------- |
From: Stephen W. <ste...@cs...> - 2004-12-23 22:26:34
|
On Wed, 2004-12-22 at 17:30 -0600, John Hunter wrote: > - 4x image speedups for large images This is a biggie!! Ladies and gentlemen, my impression is that imshow is now at least as fast as, and perhaps faster than, DS9 for astronomical image display. (I'm looking at 1024 square full disk solar images.) Nice job, John. Happy happy to all, Steve |
From: Dominique O. <Dom...@po...> - 2004-12-23 16:44:18
|
John, Many thanks for the lengthy and thorough explanations on transformations in matplotlib. I am working my way through them and the source files. I am still trying to get my line+triangle example to work; i think it might be flexible in the end, if we want to, e.g., position the head anywhere along the stem, or use different polygons for the head. Your polygon example is certainly flexible for shaping the arrow, but for instance, if i want to draw an 'oriented path' in 2d space, it will become more complicated. I can now position the stem correctly and the head 'almost' correctly using offsets. Here is what i have in my Arrow class: orig, dest = zip( xdata, ydata ) self._x = tuple( xdata ) self._y = tuple( ydata ) self._center = dest # Temporary radius = 4 # Stem self._stem = Line2D( self._x, self._y, **kwargs ) self._stem.set_transform( ax.transData ) # Head self._head = RegularPolygon( tuple(self._center), 3, radius = radius, orientation = angle, **kwargs ) trans = identity_affine() trans.set_offset( tuple( dest ), ax.transData ) self._head.set_transform( trans ) and the draw() method just says: def draw( self, renderer ): # Draw stem and head self._stem.draw( renderer ) self._head.draw( renderer ) You instantiate it, for example, with: ax = axes( [0.1, 0.1, 0.8, 0.8], polar = polar ) ax.set_xlim( [0,10] ) ax.set_ylim( [0,10] ) arr = ax.arrow( [1, 4], [1, 5] ) to draw an arrow from (1,1) to (4,5). There are two things: 1) I know the center of the arrow head isn't right; i'll shift it later 2) The arrow is drawn correctly (even on polar axes) but there is a slight gap between the tip of the stem and the bottom of the head; although the center should coincide with the tip (called 'dest' in the code excerpt). Why isn't the triangle centered where the tip of the stem is? Dominique |
From: John G. <jn...@eu...> - 2004-12-23 16:20:14
|
> > > John> Thanks very much indeed -- that has me sorted. I'll give > John> imshow a go as well when I get a chance. > > John> I've attached an image of the results to give you an idea > John> what I'm up to. > >Very nice.. what do the colors represent, pray tell? > Nothing too exciting I'm afraid. I've got this object I call an atlas which is a collection of maps. Each map specifies the list of shapes (=countries/states/counties etc) that make up the particular map. Anyway, to produce this picture I just numbered each country according to the order it appears in the list in my 'World' map. This is just a toy I've been using for testing. > Also, in case >you missed the announcement for 0.65, matplotlib now a number of new >colormaps, in addition to the trusty jet. > > autumn bone cool copper flag gray hot hsv jet pink prism spring > summer winter > I did see that -- I'll have to see about making the colour map choice available to everyone (or maybe just check today's date and use spring, summer, autumn, winter as appropriate). John |