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
(20) |
2
(8) |
3
(2) |
4
(7) |
5
(17) |
6
(20) |
7
(17) |
8
(18) |
9
(7) |
10
(4) |
11
(9) |
12
(20) |
13
(20) |
14
(17) |
15
(8) |
16
(2) |
17
(4) |
18
(4) |
19
(13) |
20
(4) |
21
(16) |
22
(9) |
23
(1) |
24
(5) |
25
(8) |
26
(13) |
27
(25) |
28
(25) |
29
(14) |
30
(10) |
31
(1) |
|
|
|
|
|
|
I would like to create a colormap that plots a particular value in a specific color but is otherwise normal. So far I haven't been smart enough to figure out how to do this. For example, imagine an image with missing data. The missing data has some sentinel value e.g. -1, which I can set to be outside the range of the rest of the image. I want the missing data to plot is a specific color unrelated to the colormap for the rest of the image. Like I said, I haven't been clever enough to figure it out. This is sort of similar behavior to masked arrays in pcolor, but I would like to use imshow if possible. Perhaps a custom normalization to compress a given colormap and map the sentinel to a boundary value which has discontinuous segment? Any ideas would be appreciated. Thanks, Danny
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> John,<br> <br> I will make the changes shortly. How would I send you a diff? I have used the diff feature of Vim, does that generate any file of value or is there another script that does?<br> <br> While I'm at this, is there anyway to make it possible to have two legends for the same plot? I have plots where I overlay 2 sets of 6 things. I do this using 6 different colors and 2 different line styles. The general nature of the legend command allowed me to make a legend with only the 6 colors instead of all 12 lines. This is really cool. But I would also like to add a second legend with just 2 entries, one for each line type. Basically, I think it easier to make room for 2 small legends of 6 and 2 entries each instead of one legend with 12 entries. It seems like if drawing a legend could be done with an optional flag to delete the previous one, this could work. Just browsing around in legend.py, it wasn't obvious to me how to implement it.<br> <br> Thanks,<br> <br> Ryan<br> <br> <br> John Hunter wrote: <blockquote cite="mid...@pe..." type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <blockquote type="cite"> <pre wrap="">"Ryan" == Ryan Krauss <a class="moz-txt-link-rfc2396E" href="mailto:rya...@co..."><rya...@co...></a> writes: </pre> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <pre wrap=""><!----> Ryan> A while back I asked whether or not I could set the legend Ryan> fontsize from the rc file and John asked me to make it Ryan> possible. I think I have it working, but don't know how to Ryan> check it in to CVS and need some one else to try it. I have Ryan> made two changes to legend.py: 1. added from matplotlib Ryan> import rcParams (added at line 29) 2. changed the default Ryan> parameters to the __init__ method to read from the rc: prop Ryan> = FontProperties(size=rcParams['legend.fontsize']), (change Ryan> line 116) Hi Ryan, Thanks for looking into this. This is the right approach, but if we are going to add the fontsize I think it would make more sense to expose the other legend properties that currently have default values. In particular, the various values in the Legend class init function isaxes=True, numpoints = 4, # the number of points in the legend line prop = FontProperties(size='smaller'), pad = 0.2, # the fractional whitespace inside the legend border markerscale = 0.6, # the relative size of legend markers vs. original # the following dimensions are in axes coords labelsep = 0.005, # the vertical space between the legend entries handlelen = 0.05, # the length of the legend lines handletextsep = 0.02, # the space between the legend line and legend text axespad = 0.02, # the border between the axes and legend edge shadow=False, The only other comment I have is that in the legend __init__ *signature* you do def __init__(self, prop = FontProperties(size=rcParams['legend.fontsize']), ...snip): self.prop = prop This sets the rc parameter at *module load time*. Compare this with def __init__(self, prop = None, ...snip): if prop is None: prop = FontProperties(size=rcParams['legend.fontsize']), self.prop = prop This set the rc value at the time the legend is created, and thus allows for dynamic, script based configuration of the rc properties. The latter is what is used throughout matplotlib for rc properties. If you are still interested in pursuing this, you can send me a diff or your updated files and I'll check them in. Thanks! JDH ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit <a class="moz-txt-link-freetext" href="http://www.hp.com/go/dualwebinar">http://www.hp.com/go/dualwebinar</a> _______________________________________________ Matplotlib-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Mat...@li...">Mat...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a> </pre> </blockquote> <br> </body> </html>
Hi, I upgraded to matplotlib0.82 from the previous version. Now my markers plot fast. I plotted 30,000 points without too much complaining from my computer. Not sure what the problem was but it works now. I attached the sample code I was using. If I set marker = 'None' it plotted just fine. If I set marker = 'o' is would seize up on me. Thanks for the help! -----Original Message----- From: mat...@li... [mailto:mat...@li...] On Behalf Of mat...@li... Sent: Tuesday, July 12, 2005 11:50 AM To: mat...@li... Subject: Matplotlib-users digest, Vol 1 #698 - 14 msgs Send Matplotlib-users mailing list submissions to mat...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/matplotlib-users or, via email, send a message with subject or body 'help' to mat...@li... You can reach the person managing the list at mat...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Matplotlib-users digest..." Today's Topics: 1. Re: plot with nans (Andrew Straw) 2. Re: difference between imshow and pcolor (Norbert Nemec) 3. Re: plot with nans (Norbert Nemec) 4. Re: plot with nans (Eric Firing) 5. Re: plot with nans (Jeff Whitaker) 6. Re: plot with nans (Andrew Straw) 7. Re: RE: Performance problems (Matt Newville) 8. Re: plot with nans (Mark Bakker) 9. Re: Re: plot with nans (Darren Dale) 10. imcrop (Brice Thurin) 11. Re: imcrop (John Hunter) 12. Re: legend fontsize in rc file (John Hunter) 13. Re: performance problems (Donour Sizemore) 14. Re: performance problems (John Hunter) --__--__-- Message: 1 From: Andrew Straw <str...@as...> Subject: Re: [Matplotlib-users] plot with nans Date: 2005年7月11日 22:46:53 -0700 To: matplotlib-users matplotlib-users <mat...@li...> Hi Alan, It seems MaskedArrays are the preferred way to do this. See the masked_demo.py example. And while I'm at it, does anyone if there is simple function call which returns only the unmasked values of a masked array (without filling the masked values in, but simply returning a shorter sequence)? What is it? I have my own, but it's not pretty: import matplotlib.numerix as nx import matplotlib.numerix.ma as M def unmasked_values(b): indices = nx.where(b.mask()==0) result = M.take(b,indices).filled()[0] return result (tested only in numarray) Cheers! Andrew On Jul 11, 2005, at 6:21 PM, Alan G Isaac wrote: > Is the default handling of nan by plot the "right" one? > I am accustomed (from GAUSS) to missing values being > treated as "gaps". > E.g., > x=[nan,2,3,4,5] > plot(x) > fails completely. I expect the last 4 numbers to be > plotted. > x=[1,2,nan,4,5] > plot(x) > plots a single line. I expect two segments and a gap. > > fwiw, > Alan Isaac > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event hosted > by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users --__--__-- Message: 2 Date: 2005年7月12日 09:39:58 +0200 From: Norbert Nemec <Nor...@gm...> To: Mat...@li... CC: Danny Shevitz <sh...@la...> Subject: Re: [Matplotlib-users] difference between imshow and pcolor Danny Shevitz wrote: > Howdy, I'm struggling to understand the different intents between > imshow and pcolor. They have different > return types but both seem to do pretty much the same thing. Pcolor > seems to do non-rectangular domains > and bordered pixels if you want. Is there more to the story? > As I understand it, there is a fundamental internal difference: imshow produces embedded png, while pcolor produces a collection of rectangles. The first is less flexible, the second less efficient. I believe it is correct to have two distinct functions for that, but it certainly could be documented more clearly. --__--__-- Message: 3 Date: 2005年7月12日 09:43:51 +0200 From: Norbert Nemec <Nor...@gm...> To: matplotlib-users matplotlib-users <mat...@li...> CC: Andrew Straw <str...@as...> Subject: Re: [Matplotlib-users] plot with nans Andrew Straw wrote: > It seems MaskedArrays are the preferred way to do this. See the > masked_demo.py example. Why is that? Couldn't both be handled in the same way? The only advantage of MaskedArray is the portability to non IEEE systems. However, 99% of the systems in use are IEEE conformant, and there NaN is by far more powerful. --__--__-- Message: 4 Date: 2005年7月11日 22:07:14 -1000 From: Eric Firing <ef...@ha...> Organization: University of Hawaii To: Alan G Isaac <ai...@am...> CC: mat...@li... Subject: [Matplotlib-users] Re: plot with nans Alan, > > Is the default handling of nan by plot the "right" one? > I am accustomed (from GAUSS) to missing values being > treated as "gaps". > E.g., > x=[nan,2,3,4,5] > plot(x) > fails completely. I expect the last 4 numbers to be > plotted. > x=[1,2,nan,4,5] > plot(x) > plots a single line. I expect two segments and a gap. Slightly modifying a reply to a similar question not long ago: At present, you need to use masked arrays instead of NaN. NaN is not uniformly supported in Python and numerix, but masked arrays, in both numarray and Numeric, can accomplish the same thing and more. See masked_demo.py in the mpl examples subdirectory, and see http://stsdas.stsci.edu/numarray/numarray-1.3.html/module-numarray.ma.ht ml for an explanation of masked arrays. Numeric is in the midst of a major revision (including renaming), which I think will include support of NaNs similar to that in numarray. When this new version becomes common, then it may be both possible and desirable for matplotlib to handle NaNs as smoothly as Matlab, Octave, and evidently Gauss do. Eric --__--__-- Message: 5 Date: 2005年7月12日 06:23:33 -0600 From: Jeff Whitaker <js...@fa...> To: Andrew Straw <str...@as...> CC: matplotlib-users matplotlib-users <mat...@li...> Subject: Re: [Matplotlib-users] plot with nans Andrew Straw wrote: > Hi Alan, > > It seems MaskedArrays are the preferred way to do this. See the > masked_demo.py example. > > And while I'm at it, does anyone if there is simple function call > which returns only the unmasked values of a masked array (without > filling the masked values in, but simply returning a shorter > sequence)? What is it? I have my own, but it's not pretty: Andrew: If x is a masked array, x.compressed() returns the unmasked contented in a ravelled (i.e. rank-1) array. For example: >>> x = ma.array(arange(5), mask = [0,0,1,0,0]) >>> print x.compressed() [0,1,3,4,] -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 --__--__-- Message: 6 Date: 2005年7月12日 08:49:10 -0700 From: Andrew Straw <str...@as...> To: Norbert Nemec <Nor...@gm...>, matplotlib-users matplotlib-users <mat...@li...> Subject: Re: [Matplotlib-users] plot with nans Norbert Nemec wrote: > Andrew Straw wrote: > > >>It seems MaskedArrays are the preferred way to do this. See the >>masked_demo.py example. > > > Why is that? Couldn't both be handled in the same way? > > The only advantage of MaskedArray is the portability to non IEEE > systems. However, 99% of the systems in use are IEEE conformant, and > there NaN is by far more powerful. The reason is compatibility across platforms, and the issue is (at least) at the level of the Python interpreter. Handling of nans and infs depends on the hardware-specific representation and C library support. Have you ever tried struct.pack('>f',nan)? Maybe someday these issues will get resolved in a cross-platform manner. Or maybe not. For now, masked arrays are the way to go. A couple threads of interest: http://groups-beta.google.com/group/comp.lang.python/msg/16dbf848c050405 a http://aspn.activestate.com/ASPN/Mail/Message/numpy-discussion/2549894 Cheers! Andrew --__--__-- Message: 7 Date: 2005年7月12日 12:04:52 -0500 (CDT) From: Matt Newville <new...@ca...> To: Jeff Peery <jef...@se...> cc: mat...@li... Subject: Re: [Matplotlib-users] RE: Performance problems Jeff, Donour, Hm, this seems like it's a recurring complaint, but WXAgg and wxPython are plenty fast for me. I routinely get better than 10 plots per second with ~500 data points on WinXP / WXAgg, and can plot 25000 point arrays in under 0.5 second with any symbol or line type. Actually, that's with my own wrapper around matplotlib/wxPython, so raw matplotlib may go even faster. Example code is included as 'examples/test.py' in MPlot at http://cars.uchicago.edu/~newville/Python/MPlot If you're having performance trouble, please post code next time, and/or try the test.py from MPlot and report drawing times. Also, make sure you know what you're timing and don't include the creation of the data or the creation of the wx Window that contains the plot frame. Cheers, --Matt --__--__-- Message: 8 Date: 2005年7月12日 13:03:52 -0400 From: Mark Bakker <ma...@gm...> Reply-To: Mark Bakker <ma...@gm...> To: ai...@am... Cc: mat...@li... Subject: [Matplotlib-users] Re: plot with nans Plotting with 'nans' doesn't work as far as I know. Read the discussion on using masked arrays posted in the last 2 weeks. They work well in my experience, Mark --__--__-- Message: 9 From: Darren Dale <dd...@co...> Reply-To: dd...@co... Organization: Cornell University To: mat...@li... Subject: Re: [Matplotlib-users] Re: plot with nans Date: 2005年7月12日 13:17:08 -0400 On Tuesday 12 July 2005 01:03 pm, Mark Bakker wrote: > Plotting with 'nans' doesn't work as far as I know. > Read the discussion on using masked arrays posted in the last 2 weeks. I had asked about plotting with NaNs a while back. John says the problem is with the way the Agg backend deals with them. plot([0,nan,2,3],'o') works, plot([nan,1,2,3],'o') does not. -- Darren --__--__-- Message: 10 To: Mat...@li... From: Brice Thurin <B.P...@ci...> Date: 2005年7月12日 19:10:54 +0100 Subject: [Matplotlib-users] imcrop Dear All, I am new to matplotlib and I was wondering if there is any functions like imcrop in matlab which allow to interactively select the zone of the image. Many thanks for your answers Brice --__--__-- Message: 11 To: Brice Thurin <B.P...@ci...> Cc: Mat...@li... Subject: Re: [Matplotlib-users] imcrop From: John Hunter <jdh...@ac...> Date: 2005年7月12日 13:27:15 -0500 >>>>> "Brice" == Brice Thurin <B.P...@ci...> writes: Brice> Dear All, I am new to matplotlib and I was wondering if Brice> there is any functions like imcrop in matlab which allow to Brice> interactively select the zone of the image. I do not currently have matlab installed on my system. Could you describe what imcrop does. Not knowing, I'll venture and answer 1) you can use the zoom-to-rectangle feature on the toolbar to zoom to the rectangle of interest. Equivalently, you can set the axis xlim and ylim to view only part of the rectangle 2) you can extract the region of interest from you numerix array using array slicing before passing it to matplotlib for plotting. JDH --__--__-- Message: 12 To: Ryan Krauss <rya...@co...> Cc: mat...@li... Subject: Re: [Matplotlib-users] legend fontsize in rc file From: John Hunter <jdh...@ac...> Date: 2005年7月12日 13:37:21 -0500 >>>>> "Ryan" == Ryan Krauss <rya...@co...> writes: Ryan> A while back I asked whether or not I could set the legend Ryan> fontsize from the rc file and John asked me to make it Ryan> possible. I think I have it working, but don't know how to Ryan> check it in to CVS and need some one else to try it. I have Ryan> made two changes to legend.py: 1. added from matplotlib Ryan> import rcParams (added at line 29) 2. changed the default Ryan> parameters to the __init__ method to read from the rc: prop Ryan> = FontProperties(size=rcParams['legend.fontsize']), (change Ryan> line 116) Hi Ryan, Thanks for looking into this. This is the right approach, but if we are going to add the fontsize I think it would make more sense to expose the other legend properties that currently have default values. In particular, the various values in the Legend class init function isaxes=True, numpoints = 4, # the number of points in the legend line prop = FontProperties(size='smaller'), pad = 0.2, # the fractional whitespace inside the legend border markerscale = 0.6, # the relative size of legend markers vs. original # the following dimensions are in axes coords labelsep = 0.005, # the vertical space between the legend entries handlelen = 0.05, # the length of the legend lines handletextsep = 0.02, # the space between the legend line and legend text axespad = 0.02, # the border between the axes and legend edge shadow=False, The only other comment I have is that in the legend __init__ *signature* you do def __init__(self, prop = FontProperties(size=rcParams['legend.fontsize']), ...snip): self.prop = prop This sets the rc parameter at *module load time*. Compare this with def __init__(self, prop = None, ...snip): if prop is None: prop = FontProperties(size=rcParams['legend.fontsize']), self.prop = prop This set the rc value at the time the legend is created, and thus allows for dynamic, script based configuration of the rc properties. The latter is what is used throughout matplotlib for rc properties. If you are still interested in pursuing this, you can send me a diff or your updated files and I'll check them in. Thanks! JDH --__--__-- Message: 13 Cc: mat...@li... From: Donour Sizemore <do...@uc...> Subject: Re: [Matplotlib-users] performance problems Date: 2005年7月12日 13:42:54 -0500 To: John Hunter <jdh...@ni...> On Jul 12, 2005, at 1:25 PM, John Hunter wrote: >>>>>> "Donour" == Donour Sizemore <do...@uc...> writes: >>> Can you post a complete script that is slow for you? > > Donour> Sure thing. > > To assist in timing, I modified your script to call SystemExit on idle > -- that way we can get a pretty good measurement of how much time it > takes to load the libs and plot the figure. You can pass plot or > noplot or the script to compare the all the wx overhead with wx + > matplotlib. While this is important, it's not the start up costs that concern me. I know well the overhead incurred with an import. My problem is with the time to actually perform the WX window painting as I've embedded matplot lib into my own custom wxpanel. > > Here are three runs on my system with and w/o plotting. > >> time python slow_example.py noplot > 0.401u 0.044s 0:00.61 72.1% 0+0k 0+0io 0pf+0w >> time python slow_example.py noplot > 0.391u 0.048s 0:00.54 79.6% 0+0k 0+0io 0pf+0w >> time python slow_example.py noplot > 0.394u 0.049s 0:00.51 84.3% 0+0k 0+0io 0pf+0w > > >> time python slow_example.py plot > 0.612u 0.074s 0:01.04 65.3% 0+0k 0+0io 5pf+0w >> time python slow_example.py plot > 0.628u 0.057s 0:00.81 82.7% 0+0k 0+0io 0pf+0w >> time python slow_example.py plot > update > 0.624u 0.057s 0:00.81 82.7% 0+0k 0+0io 0pf+0w > > For comparable CPU utilization, the numbers are 0.51s w/o mpl and > 0.81s w/ mpl. > > Notice that the first run with plotting is considerably slower than > subsequent runs and that CPU utilization is lower. This suggests that > a large part of the runtime is being dominated by the load time of > the many large matplotlib modules. > I would argue that this isn't terribly useful without the addition of profile data. The time _might_ be going to python namespace conversion and dyload, but in my case it isn't. As per my first post, I noticed an inordinate amount of time spent in the axes drawing functions. I can provide more details shortly. > Here is another example that simply does 'from pylab import *' > >> cat test.py > from pylab import * >> time python test.py > 0.245u 0.074s 0:01.96 15.8% 0+0k 0+0io 72pf+0w >> time python test.py > 0.248u 0.034s 0:00.30 90.0% 0+0k 0+0io 0pf+0w >> time python test.py > 0.249u 0.030s 0:00.30 90.0% 0+0k 0+0io 0pf+0w > > My guess is that your matplotlib runtime is being dominated by module > load time. This explains why Matt is getting 10 frames per second > (you only pay load costs once) and other users are complaining about > sluggishness when scripts launch. Again, launch time is of no concern to me, only the window paint time. I'm on the chicago campus, so I've you'd like to see my slow as molasses code in action, that can be arranged. :) thanks donour |Donour Sizemore do...@cs...| |Technical Programmer & Numerical Analyst | |Economics Research Center Ph: 773-834-4399 | |University of Chicago Office: Walker 303-a | --__--__-- Message: 14 To: Donour Sizemore <do...@uc...> Cc: mat...@li... Subject: Re: [Matplotlib-users] performance problems From: John Hunter <jdh...@ac...> Date: 2005年7月12日 13:46:46 -0500 >>>>> "Donour" == Donour Sizemore <do...@uc...> writes: Donour> Again, launch time is of no concern to me, only the window Donour> paint time. Well that simplifies things :-) Donour> I'm on the chicago campus, so I've you'd like to see my Donour> slow as molasses code in action, that can be arranged. :) Sure, I could swing by tomorrow. When and where? JDH --__--__-- _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest
I am trying to run the examples (for example agg_oo.py) and got the following error message, I am using the wxagg backend (I had previously some problems to import pylab (but it is working fine now)): Many Thanks Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/backends/backend_agg.py", line 432, in print_figure self.draw() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/backends/backend_agg.py", line 369, in draw self.figure.draw(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/figure.py", line 498, in draw for a in self.axes: a.draw(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/axes.py", line 1361, in draw self.xaxis.draw(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/axis.py", line 544, in draw tick.draw(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/axis.py", line 147, in draw if self.label1On: self.label1.draw(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/text.py", line 847, in draw self._mytext.draw(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/text.py", line 334, in draw bbox, info = self._get_layout(renderer) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/text.py", line 179, in _get_layout w,h = renderer.get_text_width_height( File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/backends/backend_agg.py", line 245, in get_text_width_height font = self._get_agg_font(prop) File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- packages/matplotlib/backends/backend_agg.py", line 305, in _get_agg_font font = FT2Font(str(fname)) RuntimeError: Could not load facefile /System/Library/Fonts/LucidaGrande.dfont; Unknown_File_Format
>>>>> "Donour" == Donour Sizemore <do...@uc...> writes: Donour> Again, launch time is of no concern to me, only the window Donour> paint time. Well that simplifies things :-) Donour> I'm on the chicago campus, so I've you'd like to see my Donour> slow as molasses code in action, that can be arranged. :) Sure, I could swing by tomorrow. When and where? JDH
On Jul 12, 2005, at 1:25 PM, John Hunter wrote: >>>>>> "Donour" == Donour Sizemore <do...@uc...> writes: >>> Can you post a complete script that is slow for you? > > Donour> Sure thing. > > To assist in timing, I modified your script to call SystemExit on idle > -- that way we can get a pretty good measurement of how much time it > takes to load the libs and plot the figure. You can pass plot or > noplot or the script to compare the all the wx overhead with wx + > matplotlib. While this is important, it's not the start up costs that concern me. I know well the overhead incurred with an import. My problem is with the time to actually perform the WX window painting as I've embedded matplot lib into my own custom wxpanel. > > Here are three runs on my system with and w/o plotting. > >> time python slow_example.py noplot > 0.401u 0.044s 0:00.61 72.1% 0+0k 0+0io 0pf+0w >> time python slow_example.py noplot > 0.391u 0.048s 0:00.54 79.6% 0+0k 0+0io 0pf+0w >> time python slow_example.py noplot > 0.394u 0.049s 0:00.51 84.3% 0+0k 0+0io 0pf+0w > > >> time python slow_example.py plot > 0.612u 0.074s 0:01.04 65.3% 0+0k 0+0io 5pf+0w >> time python slow_example.py plot > 0.628u 0.057s 0:00.81 82.7% 0+0k 0+0io 0pf+0w >> time python slow_example.py plot > update > 0.624u 0.057s 0:00.81 82.7% 0+0k 0+0io 0pf+0w > > For comparable CPU utilization, the numbers are 0.51s w/o mpl and > 0.81s w/ mpl. > > Notice that the first run with plotting is considerably slower than > subsequent runs and that CPU utilization is lower. This suggests that > a large part of the runtime is being dominated by the load time of > the many large matplotlib modules. > I would argue that this isn't terribly useful without the addition of profile data. The time _might_ be going to python namespace conversion and dyload, but in my case it isn't. As per my first post, I noticed an inordinate amount of time spent in the axes drawing functions. I can provide more details shortly. > Here is another example that simply does 'from pylab import *' > >> cat test.py > from pylab import * >> time python test.py > 0.245u 0.074s 0:01.96 15.8% 0+0k 0+0io 72pf+0w >> time python test.py > 0.248u 0.034s 0:00.30 90.0% 0+0k 0+0io 0pf+0w >> time python test.py > 0.249u 0.030s 0:00.30 90.0% 0+0k 0+0io 0pf+0w > > My guess is that your matplotlib runtime is being dominated by module > load time. This explains why Matt is getting 10 frames per second > (you only pay load costs once) and other users are complaining about > sluggishness when scripts launch. Again, launch time is of no concern to me, only the window paint time. I'm on the chicago campus, so I've you'd like to see my slow as molasses code in action, that can be arranged. :) thanks donour |Donour Sizemore do...@cs...| |Technical Programmer & Numerical Analyst | |Economics Research Center Ph: 773-834-4399 | |University of Chicago Office: Walker 303-a |
>>>>> "Ryan" == Ryan Krauss <rya...@co...> writes: Ryan> A while back I asked whether or not I could set the legend Ryan> fontsize from the rc file and John asked me to make it Ryan> possible. I think I have it working, but don't know how to Ryan> check it in to CVS and need some one else to try it. I have Ryan> made two changes to legend.py: 1. added from matplotlib Ryan> import rcParams (added at line 29) 2. changed the default Ryan> parameters to the __init__ method to read from the rc: prop Ryan> = FontProperties(size=rcParams['legend.fontsize']), (change Ryan> line 116) Hi Ryan, Thanks for looking into this. This is the right approach, but if we are going to add the fontsize I think it would make more sense to expose the other legend properties that currently have default values. In particular, the various values in the Legend class init function isaxes=True, numpoints = 4, # the number of points in the legend line prop = FontProperties(size='smaller'), pad = 0.2, # the fractional whitespace inside the legend border markerscale = 0.6, # the relative size of legend markers vs. original # the following dimensions are in axes coords labelsep = 0.005, # the vertical space between the legend entries handlelen = 0.05, # the length of the legend lines handletextsep = 0.02, # the space between the legend line and legend text axespad = 0.02, # the border between the axes and legend edge shadow=False, The only other comment I have is that in the legend __init__ *signature* you do def __init__(self, prop = FontProperties(size=rcParams['legend.fontsize']), ...snip): self.prop = prop This sets the rc parameter at *module load time*. Compare this with def __init__(self, prop = None, ...snip): if prop is None: prop = FontProperties(size=rcParams['legend.fontsize']), self.prop = prop This set the rc value at the time the legend is created, and thus allows for dynamic, script based configuration of the rc properties. The latter is what is used throughout matplotlib for rc properties. If you are still interested in pursuing this, you can send me a diff or your updated files and I'll check them in. Thanks! JDH
>>>>> "Brice" == Brice Thurin <B.P...@ci...> writes: Brice> Dear All, I am new to matplotlib and I was wondering if Brice> there is any functions like imcrop in matlab which allow to Brice> interactively select the zone of the image. I do not currently have matlab installed on my system. Could you describe what imcrop does. Not knowing, I'll venture and answer 1) you can use the zoom-to-rectangle feature on the toolbar to zoom to the rectangle of interest. Equivalently, you can set the axis xlim and ylim to view only part of the rectangle 2) you can extract the region of interest from you numerix array using array slicing before passing it to matplotlib for plotting. JDH
Dear All, I am new to matplotlib and I was wondering if there is any functions like imcrop in matlab which allow to interactively select the zone of the image. Many thanks for your answers Brice
On Tuesday 12 July 2005 01:03 pm, Mark Bakker wrote: > Plotting with 'nans' doesn't work as far as I know. > Read the discussion on using masked arrays posted in the last 2 weeks. I had asked about plotting with NaNs a while back. John says the problem is with the way the Agg backend deals with them. plot([0,nan,2,3],'o') works, plot([nan,1,2,3],'o') does not. -- Darren
Jeff, Donour, Hm, this seems like it's a recurring complaint, but WXAgg and wxPython are plenty fast for me. I routinely get better than 10 plots per second with ~500 data points on WinXP / WXAgg, and can plot 25000 point arrays in under 0.5 second with any symbol or line type. Actually, that's with my own wrapper around matplotlib/wxPython, so raw matplotlib may go even faster. Example code is included as 'examples/test.py' in MPlot at http://cars.uchicago.edu/~newville/Python/MPlot If you're having performance trouble, please post code next time, and/or try the test.py from MPlot and report drawing times. Also, make sure you know what you're timing and don't include the creation of the data or the creation of the wx Window that contains the plot frame. Cheers, --Matt
Plotting with 'nans' doesn't work as far as I know. Read the discussion on using masked arrays posted in the last 2 weeks. They work well in my experience, Mark
Norbert Nemec wrote: > Andrew Straw wrote: > > >>It seems MaskedArrays are the preferred way to do this. See the >>masked_demo.py example. > > > Why is that? Couldn't both be handled in the same way? > > The only advantage of MaskedArray is the portability to non IEEE > systems. However, 99% of the systems in use are IEEE conformant, and > there NaN is by far more powerful. The reason is compatibility across platforms, and the issue is (at least) at the level of the Python interpreter. Handling of nans and infs depends on the hardware-specific representation and C library support. Have you ever tried struct.pack('>f',nan)? Maybe someday these issues will get resolved in a cross-platform manner. Or maybe not. For now, masked arrays are the way to go. A couple threads of interest: http://groups-beta.google.com/group/comp.lang.python/msg/16dbf848c050405a http://aspn.activestate.com/ASPN/Mail/Message/numpy-discussion/2549894 Cheers! Andrew
Andrew Straw wrote: > Hi Alan, > > It seems MaskedArrays are the preferred way to do this. See the > masked_demo.py example. > > And while I'm at it, does anyone if there is simple function call > which returns only the unmasked values of a masked array (without > filling the masked values in, but simply returning a shorter > sequence)? What is it? I have my own, but it's not pretty: Andrew: If x is a masked array, x.compressed() returns the unmasked contented in a ravelled (i.e. rank-1) array. For example: >>> x = ma.array(arange(5), mask = [0,0,1,0,0]) >>> print x.compressed() [0,1,3,4,] -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
Alan, > > Is the default handling of nan by plot the "right" one? > I am accustomed (from GAUSS) to missing values being > treated as "gaps". > E.g., > x=[nan,2,3,4,5] > plot(x) > fails completely. I expect the last 4 numbers to be > plotted. > x=[1,2,nan,4,5] > plot(x) > plots a single line. I expect two segments and a gap. Slightly modifying a reply to a similar question not long ago: At present, you need to use masked arrays instead of NaN. NaN is not uniformly supported in Python and numerix, but masked arrays, in both numarray and Numeric, can accomplish the same thing and more. See masked_demo.py in the mpl examples subdirectory, and see http://stsdas.stsci.edu/numarray/numarray-1.3.html/module-numarray.ma.html for an explanation of masked arrays. Numeric is in the midst of a major revision (including renaming), which I think will include support of NaNs similar to that in numarray. When this new version becomes common, then it may be both possible and desirable for matplotlib to handle NaNs as smoothly as Matlab, Octave, and evidently Gauss do. Eric
Andrew Straw wrote: > It seems MaskedArrays are the preferred way to do this. See the > masked_demo.py example. Why is that? Couldn't both be handled in the same way? The only advantage of MaskedArray is the portability to non IEEE systems. However, 99% of the systems in use are IEEE conformant, and there NaN is by far more powerful.
Danny Shevitz wrote: > Howdy, I'm struggling to understand the different intents between > imshow and pcolor. They have different > return types but both seem to do pretty much the same thing. Pcolor > seems to do non-rectangular domains > and bordered pixels if you want. Is there more to the story? > As I understand it, there is a fundamental internal difference: imshow produces embedded png, while pcolor produces a collection of rectangles. The first is less flexible, the second less efficient. I believe it is correct to have two distinct functions for that, but it certainly could be documented more clearly.
Hi Alan, It seems MaskedArrays are the preferred way to do this. See the masked_demo.py example. And while I'm at it, does anyone if there is simple function call which returns only the unmasked values of a masked array (without filling the masked values in, but simply returning a shorter sequence)? What is it? I have my own, but it's not pretty: import matplotlib.numerix as nx import matplotlib.numerix.ma as M def unmasked_values(b): indices = nx.where(b.mask()==0) result = M.take(b,indices).filled()[0] return result (tested only in numarray) Cheers! Andrew On Jul 11, 2005, at 6:21 PM, Alan G Isaac wrote: > Is the default handling of nan by plot the "right" one? > I am accustomed (from GAUSS) to missing values being > treated as "gaps". > E.g., > x=[nan,2,3,4,5] > plot(x) > fails completely. I expect the last 4 numbers to be > plotted. > x=[1,2,nan,4,5] > plot(x) > plots a single line. I expect two segments and a gap. > > fwiw, > Alan Isaac > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event hosted > by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Is the default handling of nan by plot the "right" one? I am accustomed (from GAUSS) to missing values being treated as "gaps". E.g., x=[nan,2,3,4,5] plot(x) fails completely. I expect the last 4 numbers to be plotted. x=[1,2,nan,4,5] plot(x) plots a single line. I expect two segments and a gap. fwiw, Alan Isaac
A while back I asked whether or not I could set the legend fontsize from the rc file and John asked me to make it possible. I think I have it working, but don't know how to check it in to CVS and need some one else to try it. I have made two changes to legend.py: 1. added from matplotlib import rcParams (added at line 29) 2. changed the default parameters to the __init__ method to read from the rc: prop = FontProperties(size=rcParams['legend.fontsize']), (change line 116) I made one change to __init__.py. A default value needs to be added for legend.fontsize: #legend properties 'legend.fontsize' : ['small',validate_fontsize], (lines 645-646) From there I added the following to my matplotlibrc file and it seems to work: ### Legend legend.fontsize : 16 (lines 149-150) Please let me know what else I need to do. I don't think I have access to upload stuff to sourceforge (nor am I sure I should be given that power). Ryan
Howdy, I'm struggling to understand the different intents between imshow and pcolor. They have different return types but both seem to do pretty much the same thing. Pcolor seems to do non-rectangular domains and bordered pixels if you want. Is there more to the story? TIA, Danny
Chris, Thanks for the suggestions. I remember now reading about RSPython, but I hadn't considered it. I guess one of my goals is to be able to share my analysis tools with my coworkers, and requiring them to set up R to use the tools adds some headaches. (Unless there's an "R2exe" I haven't heard about!) Python+matplotlib+wxpython+py2exe would be great for sharing my tools with other users. My datasets can be large for a PC, so having to move the data between numarray and R probably means making copies and swapping, unless I'm careful about subsetting on the numarray side before handing off data to be Trellis plotted. Also, some of the data I'm analyzing is written by (black-box) measurement equipment, and I've found it tricky to implement a pure-R file reader in some cases. Python+numarray seems better with respect to file I/O. I really like the interactivity and the quality of the matplotlib backends, and I'd be giving those up taking the RSPython route. However, R can write Enhanced Metafiles, which I use quite a bit since we're an MS Office shop. You're right that a lot of the expressiveness in S+Trellis is in the formula notation, and that would be some work to replicate in Python. For the relatively simple stuff I do, RecArrays seem like a good equivalent to data.frames, and subscripting RecArrays can function like a formula spec in Trellis. So, those are my thoughts on what I'd gain and lose by going to Python+matplotlib from R. If I've got some misconceptions or if there are other options I've not considered, I'd like to know. Best regards, John --------- Original Message -------- From: "Chris Neff" <ca...@gm...> To: "John Pitney" <jo...@pi...> Cc: mat...@li... Subject: Re: [Matplotlib-users] Trellis-style plots Date: 11/07/05 04:48 Hi John, Any reason why you need to use matplotlib to do this? In my view of things it would be easier to use R itself with the RSPython package: http://www.omegahat.org/RSPython/index.html. This way you can get whatever you want done in python and then just plot the results in R. This is vastly preferable as there is no formula expressions in Python as there are in R, and that is 95% of Trellis's power. I guess you could cook up the formula capability yourself, but why bother? If you could explain a little more on what you want to do, I could probably give the best course of action. -Chris Neff On 10/07/05, John Pitney <jo...@pi...> wrote: > Hi, > > I'm a new user of matplotlib, and I'm trying to learn how to do some of > the things I'm accustomed to doing in the R environment with matplotlib > and numarray. I find R's Lattice implentation of Trellis graphics very > useful in my industrial data analysis work. > > For those unfamiliar with Trellis, here's the user manual: > http://www.stat.purdue.edu/~wsc/papers/trellis.user.pdf > > Does anyone have any experience with making conditioned plots or > scatterplot matrices with matplotlib? I'd like to try them out with > matplotlib and would appreciate seeing any code that's already out there. > > Thanks to the matplotlib developers for what looks like a great tool! > > Best regards, > John
Hello, This subject caught my eye. I'm also using WXAgg as a backend and I'm plotting approximately 500 points. I am using markers. I'm not using antialiasing or interactive mode. My operating system is windows XP. It takes approximately 1-3 seconds to make a simple plot. -----Original Message----- From: mat...@li... [mailto:mat...@li...] On Behalf Of mat...@li... Sent: Sunday, July 10, 2005 8:34 PM To: mat...@li... Subject: Matplotlib-users digest, Vol 1 #695 - 4 msgs Send Matplotlib-users mailing list submissions to mat...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/matplotlib-users or, via email, send a message with subject or body 'help' to mat...@li... You can reach the person managing the list at mat...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of Matplotlib-users digest..." Today's Topics: 1. performance problems (Donour Sizemore) 2. Re: performance problems (John Hunter) 3. Re: 0.83 iPython problem (John Hunter) 4. Trellis-style plots (John Pitney) --__--__-- Message: 1 To: mat...@li... From: Donour Sizemore <do...@uc...> Date: 2005年7月10日 00:58:26 -0500 Subject: [Matplotlib-users] performance problems I'm having pretty serious performance problems using the wxpython backend. On linux, it takes about 1-2 seconds to render a small window with 1000 data points. On my mac laptop, it takes about three times as long. I've verified that interactive mode is off, antialiasing is disabled, and the machine is otherwise idle. I'm using: matplotlib 0.82 wxwindows 2.6.0.0 numeric 23.8 Profiling shows that all the time is being sucked into a couple of axis drawing functions by way of OnPaint. Any idea why it's so slow? thanks donour |Donour Sizemore do...@cs...| |Technical Programmer & Numerical Analyst | |Economics Research Center Ph: 773-834-4399 | |University of Chicago Office: Walker 303-a | --__--__-- Message: 2 To: Donour Sizemore <do...@uc...> Cc: mat...@li... Subject: Re: [Matplotlib-users] performance problems From: John Hunter <jdh...@ac...> Date: 2005年7月10日 08:47:20 -0500 >>>>> "Donour" == Donour Sizemore <do...@uc...> writes: Donour> I'm having pretty serious performance problems using the Donour> wxpython backend. On linux, it takes about 1-2 seconds to Donour> render a small window with 1000 data points. On my mac Donour> laptop, it takes about three times as long. Donour> I've verified that interactive mode is off, antialiasing Donour> is disabled, and the machine is otherwise idle. I'm using: Donour> matplotlib 0.82 wxwindows 2.6.0.0 numeric 23.8 Donour> Profiling shows that all the time is being sucked into a Donour> couple of axis drawing functions by way of OnPaint. Donour> Any idea why it's so slow? Can you post a complete script that is slow for you? If it is a marker plot and you are using 'backend : WX', it is likely to be pretty slow because of a problem with marker drawing that was fixed for the *Agg backends. Also, are you using wx or wxagg? The WXAgg backend is likely faster and certainly will produce better output with more features. After you come up with your test script, please run it with --verbose-helpful and post the script and the output. Thanks, JDH --__--__-- Message: 3 To: Ryan Krauss <rya...@co...> Cc: mat...@li... Subject: Re: [Matplotlib-users] 0.83 iPython problem From: John Hunter <jdh...@ac...> Date: 2005年7月10日 08:50:28 -0500 >>>>> "Ryan" == Ryan Krauss <rya...@co...> writes: Ryan> I just updated to 0.83 and I am now having a problem with Ryan> Ipython. Running the following code as a script produces Ryan> the error message below. I am running Python 2.3.5 on Ryan> Windows XP with Ipython 0.6.15. I get the same message Ryan> regardless of whether or not I set ion(). Ryan> How do I fix this? Update from matplotlib CVS -- this bug was reported on Friday in the thread "ipython and matplotlib-0.83" and will be included in a bug-fix release next week. http://sourceforge.net/mailarchive/message.php?msg_id=12305161 JDH --__--__-- Message: 4 Date: 2005年7月10日 21:41:02 -0500 From: John Pitney <jo...@pi...> To: mat...@li... Subject: [Matplotlib-users] Trellis-style plots Hi, I'm a new user of matplotlib, and I'm trying to learn how to do some of the things I'm accustomed to doing in the R environment with matplotlib and numarray. I find R's Lattice implentation of Trellis graphics very useful in my industrial data analysis work. For those unfamiliar with Trellis, here's the user manual: http://www.stat.purdue.edu/~wsc/papers/trellis.user.pdf Does anyone have any experience with making conditioned plots or scatterplot matrices with matplotlib? I'd like to try them out with matplotlib and would appreciate seeing any code that's already out there. Thanks to the matplotlib developers for what looks like a great tool! Best regards, John --__--__-- _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest
This fixes (we hope) the ipython run bug reported last week on the mailing list. https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=340606 JDH
Well, I spoke too soon about this. Apologies for saying tex_demo.py works under Win2k now. Unfortunately, only the png file backend rendering works and I've also only tried viewing in TkAgg. When I try saving the .eps, which is presumably what most people would want, it bombs out. I'm strictly a pdflatex user, hence my not trying the eps output until now. Again, sorry for anyone wanting to use this, but you'll have to wait for more fixes, Gary Gary Ruben wrote: > Hi John, > thanks for the help pointing to the area to look at. > I've made some progress on this. Just replying here rather than the dev > list to keep this thread together. > > On Win98, running "dvipng --version" returms > > DVIPNG.EXE (dvipng) 1.1 > kpathsea version 3.3.2 > Copyright (C) 2002-2004 Jan-+ke Larsson. > There is NO warranty. You may redistribute this software > under the terms of the GNU General Public License. > For more information about these matters, see the files > named COPYING and dvipng.c. > > On Win2k it is lower case, like in linux. > > The other problem is that Windows doesn't know about ' characters in > command-line commands, so when calling latex and dvipng I changed "''" > sequences to '""' to keep windows happy. I can't remember whether linux > is happy with this, but I'm sure you'll know. You may have to treat the > two OSes differently. > > After making these changes it works in Win2k. Curiously there's > something nasty going on in Win98 still where it gets partway through > the tex demo and freezes saying there are system resource problems. I > suspect this is to do with pipes not being flushed, but I'm unlikely to > have time to look at this for a few weeks (I've got a 6 hour quantum > field theory exam coming up - eek). > It would be worth incorporating the changes because it should get most > Windows users going with TeX. Note also that I'm using the MiKTeX > distribution, although I would expect other TeX distros to be fine. > In summary, to get TeX working under Win2k I made the following changes: > > Changed line: > if line.startswith('dvipng '): > to > if line.lower().startswith('dvipng'): > > Changed line: > command = "latex -interaction=nonstopmode '%s'"%fname > to > command = 'latex -interaction=nonstopmode "%s"'%fname > > Changed line: > command = "dvipng -bg Transparent -fg 'rgb 0.0 0.0 0.0' -D %d -T > tight -o %s %s"% (dpi, pngfile, dvifile) > to > command = 'dvipng -bg Transparent -fg "rgb 0.0 0.0 0.0" -D %d -T > tight -o %s %s'% (dpi, pngfile, dvifile) > > > regards, > Gary