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
(8) |
2
(14) |
3
(22) |
4
(13) |
5
(11) |
6
(12) |
7
(4) |
|
8
(6) |
9
(19) |
10
(14) |
11
(16) |
12
(6) |
13
(15) |
14
(6) |
|
15
(8) |
16
(22) |
17
(17) |
18
(8) |
19
(16) |
20
(19) |
21
(3) |
|
22
(6) |
23
(18) |
24
(26) |
25
(17) |
26
(13) |
27
(18) |
28
(8) |
|
29
|
30
(14) |
31
(30) |
|
|
|
|
|
From: Jeremy C. <jer...@gm...> - 2009-03-09 20:03:13
|
On Mon, Mar 9, 2009 at 12:50 PM, Jeff Whitaker <js...@fa...> wrote: > Jeremy Conlin wrote: > > >> >> On Mon, Mar 9, 2009 at 12:19 PM, Jeff Whitaker <js...@fa...<mailto: >> js...@fa...>> wrote: >> >> Jeremy Conlin wrote: >> >> I am using Mac OS X 10.5.5 and have installed Enthought's >> latest Python distribution which includes Matplotlib 0.98.3. >> I get a fatal python error whenever I try to import >> matplotlib.pyplot. The exact message I get is: >> >> Fatal Python error: Interpreter not initialized (version >> mismatch?) >> Abort trap >> >> Has anyone else had a problem with this? Please help me >> because I can't do any plotting until it's fixed! >> >> Thanks, >> Jeremy >> >> Jeremy: That sometimes means you are importing a module into a >> different version of python than it was built against. Are you >> sure you are running Enthough python when you import matplotlib? >> >> >> I'm pretty sure it's the Enthought python. >> $ python --version >> Python 2.5.2 |EPD Py25 4.1.30101| >> >> Jeremy >> > Jeremy: Then unless you have DYLD_LIBRARY_PATH or PYTHONPATH set so that > the wrong python libs or extensions are being picked up, it must be an EPD > problem. I'd ask on the EPD list. Oops. A long time ago I set PYTHONPATH in my bash_profile. The value for that is now wrong. Now that I've fixed it, everything seems to work fine. Thanks for the help. Jeremy |
|
From: Christopher B. <Chr...@no...> - 2009-03-09 17:33:53
|
Hey folks, I'm trying to get an idea of how many folks from the numpy/scipy/mpl community will be at PyCon this year. If enough of us, maybe a sprint is in order, but in any case, it might be nice to get together. Please send me a note off-list (to keep the clutter down) if you are going. I may compile a list and post that, so let me know if it's OK to post your name. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Jeff W. <js...@fa...> - 2009-03-09 16:50:32
|
Jeremy Conlin wrote: > > > On Mon, Mar 9, 2009 at 12:19 PM, Jeff Whitaker <js...@fa... > <mailto:js...@fa...>> wrote: > > Jeremy Conlin wrote: > > I am using Mac OS X 10.5.5 and have installed Enthought's > latest Python distribution which includes Matplotlib 0.98.3. > I get a fatal python error whenever I try to import > matplotlib.pyplot. The exact message I get is: > > Fatal Python error: Interpreter not initialized (version > mismatch?) > Abort trap > > Has anyone else had a problem with this? Please help me > because I can't do any plotting until it's fixed! > > Thanks, > Jeremy > > Jeremy: That sometimes means you are importing a module into a > different version of python than it was built against. Are you > sure you are running Enthough python when you import matplotlib? > > > I'm pretty sure it's the Enthought python. > > $ python --version > Python 2.5.2 |EPD Py25 4.1.30101| > > Jeremy Jeremy: Then unless you have DYLD_LIBRARY_PATH or PYTHONPATH set so that the wrong python libs or extensions are being picked up, it must be an EPD problem. I'd ask on the EPD list. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Jeff W. <js...@fa...> - 2009-03-09 16:19:23
|
Jeremy Conlin wrote: > I am using Mac OS X 10.5.5 and have installed Enthought's latest > Python distribution which includes Matplotlib 0.98.3. I get a fatal > python error whenever I try to import matplotlib.pyplot. The exact > message I get is: > > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort trap > > Has anyone else had a problem with this? Please help me because I > can't do any plotting until it's fixed! > > Thanks, > Jeremy Jeremy: That sometimes means you are importing a module into a different version of python than it was built against. Are you sure you are running Enthough python when you import matplotlib? -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Gökhan S. <gok...@gm...> - 2009-03-09 16:15:26
|
Hello, I have six subplots in my canvas, and wondering how to place a common ylabel into the canvas in matplotlib? (Let say instead of having six same text on the y-axes just to replace them with one bigger text encompassing all six y-axes.) Is this available in ml or am I too blind to see this feature? Thanks, Gökhan |
|
From: Jeff W. <js...@fa...> - 2009-03-09 16:13:20
|
Jeremy Conlin wrote: > I am using Mac OS X 10.5.5 and have installed Enthought's latest > Python distribution which includes Matplotlib 0.98.3. I get a fatal > python error whenever I try to import matplotlib.pyplot. The exact > message I get is: > > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort trap > > Has anyone else had a problem with this? Please help me because I > can't do any plotting until it's fixed! > > Thanks, > Jeremy Jeremy: That usually means you are importing a module into a different version of python than it was built against. Are you sure you are running Enthough python when you import matplotlib? -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: John H. <jd...@gm...> - 2009-03-09 16:08:23
|
On Mon, Mar 9, 2009 at 10:43 AM, Jeremy Conlin <jer...@gm...> wrote:
> I am using Mac OS X 10.5.5 and have installed Enthought's latest Python
> distribution which includes Matplotlib 0.98.3. I get a fatal python error
> whenever I try to import matplotlib.pyplot. The exact message I get is:
> Fatal Python error: Interpreter not initialized (version mismatch?)
> Abort trap
>
> Has anyone else had a problem with this? Please help me because I can't do
> any plotting until it's fixed!
>
So you haven't installed matplotlib or wxpython separately? This error can
arise when the version of python that built the extension is not the same as
the version of python you are running. I suggest making sure you have a
clean install of enthought python (remove the install dir entirely),
reinstall it, and if you still see the same problem report it on the
enthought list because it looks like a build problem more than a matplotlib
problem.
Before you report, you may want to do some extra diagnostics. Eg create a
script like
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot
and try running this script, replacing 'Agg' with 'PS', 'PDF', 'TkAgg' and
'WXAgg' and noting whether all fail in the same way, or if only some do.
|
|
From: Jeremy C. <jer...@gm...> - 2009-03-09 15:43:57
|
I am using Mac OS X 10.5.5 and have installed Enthought's latest Python distribution which includes Matplotlib 0.98.3. I get a fatal python error whenever I try to import matplotlib.pyplot. The exact message I get is: Fatal Python error: Interpreter not initialized (version mismatch?) Abort trap Has anyone else had a problem with this? Please help me because I can't do any plotting until it's fixed! Thanks, Jeremy |
|
From: Jeff W. <js...@fa...> - 2009-03-09 15:21:27
|
Marjolaine Rouault wrote: > Hi, > > I am trying to extract a a line (or transect) of data across a 2 dimensional array. I want to know what the best way of finding data points within my 2D dataset closest to each point on my line. Is there a matplotlib pre-defined function to find the closest point within a radius or must I create my own? > > Thanks a lot, Marjolaine. > Marjolaine: Sounds like what you want is nearest neighbor interpolation. The Basemap toolkit has an interp function that can do bilinear or nearest neighbor interpolation. It's typically used for regridding, but I think it will work for your use case too. Here's some pseudo-code: from mpl_toolkits.basemap import interp # here datarr is 2d data array on a regular grid with x,y coordinates # defined by 1-d arrays x,y. The arrays xout, yout describe the points # on the transect. order=0 means nearest neighbor interp, order=1 means bilinear. # dataout is the data interpolated to the transect. dataout = interp(datarr,x,y,xout,yout,order=0) -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Marjolaine R. <mro...@cs...> - 2009-03-09 12:59:19
|
Hi, I am trying to extract a a line (or transect) of data across a 2 dimensional array. I want to know what the best way of finding data points within my 2D dataset closest to each point on my line. Is there a matplotlib pre-defined function to find the closest point within a radius or must I create my own? Thanks a lot, Marjolaine. Marjolaine Rouault CSIR - NRE Research Group : Earth Observation 15 Lower Hope street, Rosebank 7700 South Africa Tel.: +27 (0) 21 658-2755 Fax: +27 (0) 21 658-2744 mro...@cs... -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. |
|
From: Eric F. <ef...@ha...> - 2009-03-08 23:58:46
|
João Luís Silva wrote: > Eric Firing wrote: >> I added two functions to pyplot in svn: fignum_exists(num) and >> get_fignums() so that with future releases you won't have to delve into >> _pylab_helpers for this information. >> >> Eric > > Wouldn't it be better to have some way to iterate mpl objects, rather > than having adhoc functions just for figures? I though there was a > standard way to iterate all figures, all axes etc, something like > > import matplotlib as mpl > > for fig in mpl.Figures: > ... do stuff > > or something similar. Does something like this exist in mpl? No. The functions I added to pyplot were to provide more information about the figure tracking that pyplot does via the odd Gcf class in _pylab_helpers. This is based on the Matlab practice of having numbered figures. When the pyplot interface is *not* being used (see examples/api/agg_oo.py and examples/user_interfaces/embedding*.py), a Figure instance is just that--an instance of a class. Tracking the instances is up to the user, who presumably created them. The figure is at the top of the Artist hierarchy. It *does* track axes that are added to it, and you can iterate over those; and those axes track artists that are added to them. Is there a real need for module-level tracking of Figure instances in this case where pyplot is not being used? When pyplot is being used, one can always use pyplot.figure(num) to get the Figure object with that number. Eric |
|
From: João L. S. <js...@fc...> - 2009-03-08 22:30:24
|
Eric Firing wrote:
> I added two functions to pyplot in svn: fignum_exists(num) and
> get_fignums() so that with future releases you won't have to delve into
> _pylab_helpers for this information.
>
> Eric
Wouldn't it be better to have some way to iterate mpl objects, rather
than having adhoc functions just for figures? I though there was a
standard way to iterate all figures, all axes etc, something like
import matplotlib as mpl
for fig in mpl.Figures:
... do stuff
or something similar. Does something like this exist in mpl?
JLS
|
|
From: Jonathan T. <jon...@ut...> - 2009-03-08 20:04:11
|
Wow... changing to TkAgg backend makes raw_input() just work. I suppose this is because the Tk thread does not need the GIL to render? Is there a downside to using TkAgg? I am also noticing that it is much faster than GtkAgg. Jon. On Sun, Mar 8, 2009 at 2:55 PM, Jonathan Taylor <jon...@ut...> wrote: > Hi, > > I am looking to have ipython pause to show me a figure and wait for me > to press a key before it updates the figure. I see that raw_input() > does not let the figure update presumably because it blocks the gui > thread. On the other hand, pylab.waitforbuttonpress works but only > takes keys that were sent to the gui. I would love to be able to > press enter or something on the ipython command prompt to allow the > script to continue. Is this possible? > > I was thinking that it might be possible to use timeouts to keep > switching between the window and the console looking for input. Any > ideas here? > > Thanks, > Jonathan. > |
|
From: Jonathan T. <jon...@ut...> - 2009-03-08 18:56:09
|
Hi, I am looking to have ipython pause to show me a figure and wait for me to press a key before it updates the figure. I see that raw_input() does not let the figure update presumably because it blocks the gui thread. On the other hand, pylab.waitforbuttonpress works but only takes keys that were sent to the gui. I would love to be able to press enter or something on the ipython command prompt to allow the script to continue. Is this possible? I was thinking that it might be possible to use timeouts to keep switching between the window and the console looking for input. Any ideas here? Thanks, Jonathan. |
|
From: Eric F. <ef...@ha...> - 2009-03-08 06:39:59
|
Christopher Brown wrote: > Hi, > > If I have a figure: > > h = pp.figure(num=14) > > What is the best way to check to see if Figure 14 exists? I'm writing a > function that adds plots to a figure window. I want the function to > check if the figure exists, and if so, turn off autoscaling (using > Eric's suggested axes.set_autoscale_on(False)) in case the user has zoomed. > I added two functions to pyplot in svn: fignum_exists(num) and get_fignums() so that with future releases you won't have to delve into _pylab_helpers for this information. Eric |
|
From: per f. <per...@gm...> - 2009-03-08 01:23:09
|
hi all,
i am trying to make scatter plots with marginal histograms shown in the same
plot, using the recently checked in example 'scatter_hist.py'. i want the
scatter plot to have an equal aspect ratio, but when i do this, the scales
of the marginal histograms get out of sync. for example, the code below
makes the main scatter plot look as it should but is out of sync with the
scales of the histograms:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter
from numpy.random import normal
from frame import FrameAxes
from numpy import *
def scatter_hist(x, y, num_bins=20):
nullfmt = NullFormatter() # no labels
left, width = 0.1, 0.65
bottom, height = 0.1, 0.65
bottom_h = left_h = left+width+0.02
rect1 = [left, bottom, width, height]
rect2 = [left, bottom_h, width, 0.2]
rect3 = [left_h, bottom, 0.2, height]
axScatter = plt.axes(rect1)
axHistx = plt.axes(rect2)#, sharex=axScatter)
axHisty = plt.axes(rect3)#, sharey=axScatter)
axHistx.xaxis.set_major_formatter(nullfmt)
axHisty.yaxis.set_major_formatter(nullfmt)
axScatter.set_aspect('equal')
axScatter.scatter(x, y)
c = .05
bins = np.linspace(min(x)-c,max(x)+c,num_bins)
axHistx.hist(x, bins=bins)
axHisty.hist(y, bins=bins, orientation='horizontal')
axHistx.set_xlim(axScatter.get_xlim())
axHisty.set_ylim(axScatter.get_ylim())
x = np.random.randn(1000)
y = np.random.randn(1000)
scatter_hist(x,y)
plt.show()
if i pass the 'sharex' and 'sharey' arguments to 'axes' (see commented lines
in code above), then the dimensions are in sync, but the NullFormatter from
these lines:
axHistx.xaxis.set_major_formatter(nullfmt)
axHisty.yaxis.set_major_formatter(nullfmt)
removes the axes from the main scatter plot. i simply want the scatter plot
to have both x and y axes, and the marginal histograms to only have the
yaxis, but have their dimensions be in sync with the square scatter plot.
how can i do this?
thanks very much.
|
|
From: Jeff W. <js...@fa...> - 2009-03-07 23:04:32
|
Pablo Romero wrote: > Jeff, > > Here's a link to the website that's creating the basemap plots with > the "H"'s and "L"'s: > > http://magicseaweed.com/msw-surf-charts2.php?chart=64&res=750&type=pressure&starttime= > > > As you can see, this website's "pressure chart" interface is based on > creating individual images for each point in a time series. And, if > you click on any one of the "region" links below the plot, you'll be > presented with the same pressure plot for a sub-region; obviously, > this needs to be based on an automated process, since I seriously > doubt someone is manually creating each plot for each time step for > each "sub-region" in their catalog...bottom line, there MUST be a > systematic way to add those "H" and "L" characters to closed contours > that are local min/max AND that are LARGE enough to hold an "H" or "L" > character (as you mentioned, some of the smaller closed contours dont > display the 'H'/'L' characters). > > > So the big question is: how could one go about setting something like > this up??? > Do you think it would be possible to accomplish this with the > function/tutorial you provided??? > If so, could you please help me understand a little more how I would > go about using that function? (sorry, I wasnt very clear on how it > should be applied to this problem). > > > I know for a fact that this website is using matplotlib/basemap to > create these plots. Theyre using a python interface to > matplolib/basemap named 'pygrads'; it provides basemap/mpl plotting > capabilities to an existing application named GrADS. I just dont know > how the heck they got those "H/L" characters there.... > > Thanks again for the help, > > Pablo Pablo: I've added a script (attached to this email) called "plothighsandlows.py" in the basemap examples directory that shows how to do this. It uses scipy.ndimage.filters, so you'll need to have scipy installed to run it. -Jeff > > > > ---------------------------------------- >> Date: Fri, 6 Mar 2009 06:07:10 -0700 >> From: js...@fa... >> To: rom...@ho... >> CC: mat...@li... >> Subject: Re: [Matplotlib-users] plotting air pressure data with >> contour() function >> >> Jeff Whitaker wrote: >>> Pablo Romero wrote: >>> >>>> Hello, >>>> I have a question about plotting pressure contours with matplotlib. >>>> >>>> I've seen other applications using matplotlib where the pressure >>>> contours are drawn with annoted text "H" and "L" characters being >>>> drawn in the centers of closed contours... >>>> >>>> i.e., if there is a closed contour line, and its value is over a >>>> certain threshold value, plot an "H" to indicate a "high pressure >>>> zone", else plot a "L" to indicate a "low pressure zone." >>>> >>>> This is standard weather map plotting stuff, and Ive definitely >>>> seen other plots produced using matplotlib that inlude these >>>> annoted "H" and "L" characters. In the application Ive seen, the >>>> process was most definitely automated, since it was applied to a >>>> large number of plots (i.e., the "H"'s and "L"'s werent added >>>> manually, since its not feasible). Unfortunately, the creators of >>>> these plots are not willing to share their technique. >>>> >>>> I dont know how to set this up with matplotlib. >>>> Does anyone have any experience with this??? >>>> Is there any way to identify a "closed contour" & its value from a >>>> "contour class" that is returned from matplotlib's contour() >>>> function??? >>>> >>>> >>> Pablo: There is no easy way to do this in matplotlib. I guess you >>> would try to find closed contours with no other contours inside them, >>> the place the label at the center of that region. This might end up >>> being quite tricky. I see from your example that there are many such >>> regions that are not labelled (some are, some aren't). >>> >>> Or, you might just try to find local minima and maxima in your gridded >>> data and plot H's and L's there. This ought to be easier. >>> >>> -Jeff >>> >>> >> Pablo: Regarding the latter method, here's a relevant thread from the >> scipy list: >> >> http://www.nabble.com/Finding-local-minima-of-greater-than-a-given-depth-td18988309.html >> >> >> -Jeff > _________________________________________________________________ > Windows Live™ Contacts: Organize your contact list. > http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009 > |
|
From: per f. <per...@gm...> - 2009-03-07 19:28:38
|
thank you very much for this (i include your code below). one question about this: how can i remove the top x-axis and the right yaxis from each of the marginal histograms? in other words, keep only the left y-axis and the bottom x-axis of each of the histograms. thank you. mport numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter x = np.random.randn(1000) y = np.random.randn(1000) nullfmt = NullFormatter() # no labels left, width = 0.1, 0.65 bottom, height = 0.1, 0.65 bottom_h = left_h = left+width+0.02 rect1 = [left, bottom, width, height] rect2 = [left, bottom_h, width, 0.2] rect3 = [left_h, bottom, 0.2, height] # start with a rectangular figure #fig = plt.Figure( (8,8) ) axScatter = plt.axes(rect1) axHistx = plt.axes(rect2)#, sharex=axScatter) axHisty = plt.axes(rect3)#, sharey=axScatter) axHistx.xaxis.set_major_formatter(nullfmt) axHisty.yaxis.set_major_formatter(nullfmt) axScatter.scatter(x,y) bins = np.linspace(-4,4,21) axHistx.hist(x, bins=bins) axHisty.hist(x, bins=bins, orientation='horizontal') axHistx.set_xlim( axScatter.get_xlim() ) axHisty.set_ylim( axScatter.get_ylim() ) plt.show() On Mon, Feb 16, 2009 at 8:22 AM, Manuel Metz <mm...@as...>wrote: > Attached is a very simple example that shows how to do something similar > to scatterhist in matplotlib > > Manuel > > per freem wrote: > > hello, > > > > is there a way to make a 2d scatter plot that includes (outside the axes) > > histograms of the marginals of the two variables? like the matlab > function > > 'scatterhist'. see this for an example: > > > > > http://www.mathworks.com/access/helpdesk/help/toolbox/stats/index.html?/access/helpdesk/help/toolbox/stats/scatterhist.html > > > > ideally i'd like the histograms outside the scatter plot to also have > axes > > so that the height of each histogram bar will be interpretable. > > i understand that there's no command for this - but how can i construct > it? > > i would not mind writing code to do this... if it's possible. right now > > this is the only thing keeping me from switching from matlab to > matplotlib > > exclusively since i use these graphs a lot > > > > thank you > > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------------ > > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > > -Strategies to boost innovation and cut costs with open source > participation > > -Receive a $600 discount off the registration fee with the source code: > SFAD > > http://p.sf.net/sfu/XcvMzF8H > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Jae-Joon L. <lee...@gm...> - 2009-03-07 17:29:29
|
Your code works fine for me with mpl 0.98.5.2.
What version of mpl are you using?
print matplotlib.__version__
-JJ
On Thu, Mar 5, 2009 at 12:03 PM, Erik Granstedt <egr...@gm...> wrote:
> Hello,
>
> I found an issue in working with subplots and using figlegend: it
> doesn't display markers. This code illustrates the problem:
>
> x=r_[0.:11.:1.]
> y=x**1.5
> figure()
> subplot(211)
> line=plot(x,y,'sb-.')
> figlegend( (line,),('y',),'right' )
>
> Supplying the "numpoints" keyword to figlegend doesn't seem to have
> any effect, ie. I get the same results with:
> figlegend( (line,),('y',),'right',numpoints=10 )
>
> Is this the intended behavior? Is there a good way to display the markers?
>
> I did find a workaround, but I don't think this is the ideal method:
> x=r_[0.:11.:1.]
> y=x**1.5
> figure()
> subplot(111)
> line=plot(x,y,'sb-.')
> figlegend( (line,),('y',),'right' )
> subplot(211)
> line=plot(x,y,'sb-.')
>
> Thanks,
>
> -Erik
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-03-07 16:00:45
|
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.bar use ax.set_xticks(ind+width*.5) instead of ax.set_xticks(ind+width) -JJ On Thu, Mar 5, 2009 at 1:40 PM, Timmie <tim...@gm...> wrote: > Hello, > I tried to modify the bar chart demo for my case. > I want to plot only bar charts for one data set. > > But the xticklables are not centered below the bars, rather are they left in > place as if there were still two data sets. > > How do I modify set_xticklabels in oder to get the lables centered below the bar > one data set? > > Thanks in advance, > Timmie > > > #### modified bar charts demo > > > #!/usr/bin/env python > # a bar plot with errorbars > import numpy as np > import matplotlib.pyplot as plt > > N = 5 > menMeans = (20, 35, 30, 35, 27) > menStd = (2, 3, 4, 1, 2) > > ind = np.arange(N) # the x locations for the groups > width = 0.35 # the width of the bars > > fig = plt.figure() > ax = fig.add_subplot(111) > rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd) > > womenMeans = (25, 32, 34, 20, 25) > womenStd = (3, 5, 2, 3, 3) > #~ rects2 = ax.bar(ind+width, womenMeans, width, color='y', yerr=womenStd) > > # add some > ax.set_ylabel('Scores') > ax.set_title('Scores by group and gender') > ax.set_xticks(ind+width) > ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5'), multialignment='left', > position=(-2,0) ) > > #~ ax.legend( (rects1[0], rects2[0]), ('Men', 'Women') ) > > def autolabel(rects): > # attach some text labels > for rect in rects: > #~ print rect > height = rect.get_height() > print height > ax.text(rect.get_x()+rect.get_width()/2., 1.05*height, '%d'%int(height), > ha='center', va='bottom') > > > autolabel(rects1) > #~ autolabel(rects2) > > plt.show() > > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Alan J. <al...@aj...> - 2009-03-06 22:45:58
|
Pretty nice video trying to convince Excel users to try out R for their graphics needs. Anyone inspired to do the same for python? http://chartsgraphs.wordpress.com/2009/02/27/video-to-help-excel-users-get-familiar-with-r/ -- ----------------------------------------------------------------------- | Alan K. Jackson | To see a World in a Grain of Sand | | al...@aj... | And a Heaven in a Wild Flower, | | www.ajackson.org | Hold Infinity in the palm of your hand | | Houston, Texas | And Eternity in an hour. - Blake | ----------------------------------------------------------------------- |
|
From: Jeff W. <js...@fa...> - 2009-03-06 13:07:40
|
Jeff Whitaker wrote: > Pablo Romero wrote: > >> Hello, >> I have a question about plotting pressure contours with matplotlib. >> >> I've seen other applications using matplotlib where the pressure contours are drawn with annoted text "H" and "L" characters being drawn in the centers of closed contours... >> >> i.e., if there is a closed contour line, and its value is over a certain threshold value, plot an "H" to indicate a "high pressure zone", else plot a "L" to indicate a "low pressure zone." >> >> This is standard weather map plotting stuff, and Ive definitely seen other plots produced using matplotlib that inlude these annoted "H" and "L" characters. In the application Ive seen, the process was most definitely automated, since it was applied to a large number of plots (i.e., the "H"'s and "L"'s werent added manually, since its not feasible). Unfortunately, the creators of these plots are not willing to share their technique. >> >> I dont know how to set this up with matplotlib. >> Does anyone have any experience with this??? >> Is there any way to identify a "closed contour" & its value from a "contour class" that is returned from matplotlib's contour() function??? >> >> > Pablo: There is no easy way to do this in matplotlib. I guess you > would try to find closed contours with no other contours inside them, > the place the label at the center of that region. This might end up > being quite tricky. I see from your example that there are many such > regions that are not labelled (some are, some aren't). > > Or, you might just try to find local minima and maxima in your gridded > data and plot H's and L's there. This ought to be easier. > > -Jeff > > Pablo: Regarding the latter method, here's a relevant thread from the scipy list: http://www.nabble.com/Finding-local-minima-of-greater-than-a-given-depth-td18988309.html -Jeff |
|
From: Jeff W. <js...@fa...> - 2009-03-06 12:55:46
|
Pablo Romero wrote: > Hello, > I have a question about plotting pressure contours with matplotlib. > > I've seen other applications using matplotlib where the pressure contours are drawn with annoted text "H" and "L" characters being drawn in the centers of closed contours... > > i.e., if there is a closed contour line, and its value is over a certain threshold value, plot an "H" to indicate a "high pressure zone", else plot a "L" to indicate a "low pressure zone." > > This is standard weather map plotting stuff, and Ive definitely seen other plots produced using matplotlib that inlude these annoted "H" and "L" characters. In the application Ive seen, the process was most definitely automated, since it was applied to a large number of plots (i.e., the "H"'s and "L"'s werent added manually, since its not feasible). Unfortunately, the creators of these plots are not willing to share their technique. > > I dont know how to set this up with matplotlib. > Does anyone have any experience with this??? > Is there any way to identify a "closed contour" & its value from a "contour class" that is returned from matplotlib's contour() function??? > Pablo: There is no easy way to do this in matplotlib. I guess you would try to find closed contours with no other contours inside them, the place the label at the center of that region. This might end up being quite tricky. I see from your example that there are many such regions that are not labelled (some are, some aren't). Or, you might just try to find local minima and maxima in your gridded data and plot H's and L's there. This ought to be easier. -Jeff |
|
From: Jeff W. <js...@fa...> - 2009-03-06 12:46:48
|
Pablo Romero wrote: > Hi, > I need help doing the following: > > I need to create a square png image (256x256 pixels) with NO margins. I need my plot area to completely fill this 256x256 box, regardless of what the plot's aspect ratio should be; i.e., I want the plot area stretched or compressed either in the vertical or horizontal direction so that the plot completely fills png output...no margins at either the top&bottom or left&right edges. > > The data Im plotting is geographic lat&lon ranges, and these areas are not perfectly square, they are more rectangular. matplotlib tries to maintain the aspect ratio in my plots and so it always adds margins to the top&bottom of my plot edges. I need to tell matplotlib to ignore the fact that the plot should be rectangular, and instead plot it to fit my figure size, even if this visually deforms my plot. > > > I understand that if I set the axes, I can somewhat control the margin size, so doing something like 'axes([0,0,1,1],frameon='false')' should eliminate the margins. I see that the axes() function has a 'set_aspect()' function, but Im not clear on how to use it, and Im even sure that it can do what I need it to do; 'disable' the aspect ratio and fill my figure area with my plot.... > > So, again, what can I do to completely fill the 2.56"x2.56" square figure ??? (even when the plot is NOT square, its rectangular...) > > > Please help, > P.Romero > Pablo: If you are using basemap, the set_aspect method of the axes method is called automatically to force the aspect ratio of the map to be preserved. There is currently no way to override this, but it could be added if you really need it. I do wonder why you would want have a distorted map, just so it could be a certain pixel size? If you want a square map, why not just make your map a square region (in lat/lon coordinates)? -Jeff |
|
From: Gary R. <gr...@bi...> - 2009-03-06 12:17:18
|
Hi Michael, Thanks for your explanation. It turns out that it is a combination of (1) and (3). I hadn't thought about (1) and I hadn't done enough playing to see the python interpreter releasing blocks of memory. As you suggested, the "solution" is to limit the iPython cache by using the iPython -cs option. thanks for your help, Gary Michael Droettboom wrote: > There are at least three possible causes of what you're seeing here: > > 1) ipython stores references to all results in the console. (ipython > maintains a history of results so they can easily be accessed later). I > don't recall the details, but it may be possible to turn this feature > off or limit the number of objects stored. > > 2) matplotlib stores references to all figures until they are explicitly > closed with pyplot.close(fignum) > > 3) Python uses pools of memory, and is often imposes a significant delay > returning memory to the operating system. It is actually very hard to > determine from the outside whether something is leaking or just pooling > without compiling a special build of Python with memory pooling turned off. > > In general, interactive use is somewhat at odds with creating many large > plots in a single session, since all of the nice interactive features > (history etc.) do not know automagically when the user is done with > certain objects. > > I am not aware of any memory leaks in current versions of matplotlib > with *noninteractive* use, other than small leaks caused by bugs in > older versions of some of the GUI toolkits (notably gtk+). If you find > a script that produces a leak reproducibly, please share so we can track > down the cause. > > Gary Ruben wrote: >> Doing plot(rand(1000000)) or matshow(rand(1000,1000)) for example eats >> a big chunk of memory (tried with TkAgg and WxAgg in Windows (mpl >> v0.98.5.2) and Linux (mpl v0.98.3)), most of which is not returned >> when the window is closed. The same goes if you create an array, plot >> it, and explicitly del it after closing the window. > Can you elaborate on these steps? It's possible that the del has little > effect, since del only deletes a single reference to the object, not all > references which may be keeping it alive (such as the figure, which > matplotlib itself keeps a reference to). In general, you need to > explicitly call pyplot.close(fignum) to delete a figure. > > Cheers, > Mike > |