You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(1) |
2
(4) |
3
(12) |
4
(5) |
5
(30) |
6
(21) |
7
(20) |
8
(11) |
9
(9) |
10
(12) |
11
(11) |
12
(22) |
13
(22) |
14
(38) |
15
(25) |
16
(23) |
17
(20) |
18
(7) |
19
(13) |
20
(13) |
21
(18) |
22
(6) |
23
(7) |
24
(4) |
25
(9) |
26
(35) |
27
(37) |
28
(22) |
29
(27) |
30
(12) |
31
(4) |
This is a bug introduced in the recent version of MPL. While it is fixed in the maintenance branch, there is no release yet. You may 1) try the svn version or 2) apply the patch by yourself. http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_98_5_maint/lib/matplotlib/legend.py?r1=6685&r2=6818&diff_format=u or 3) use previous release of mpl (0.95 and before) or 4) draw a line (using plot() command) with same line characteristic outside the axes area and use this line for the legend. Regards, -JJ On Wed, Jan 28, 2009 at 10:05 AM, Nitin Bhide <nit...@ya...> wrote: > Hi, > > I am unable to create legend for vlines graph. I have modified the vline_demo.py to demonstrate the problem (see below) > ------------------------------------------------------------ > #!/usr/bin/env python > from matplotlib.pyplot import * > from numpy import sin, exp, absolute, pi, arange > from numpy.random import normal > > def f(t): > s1 = sin(2*pi*t) > e1 = exp(-t) > return absolute((s1*e1))+.05 > > t = arange(0.0, 5.0, 0.1) > s = f(t) > nse = normal(0.0, 0.3, t.shape) * s > > #plot(t, s+nse, 'b^') > vlines(t, [0], s, label='vline demo') > ##Legend creation addedin the demo > legend() > ##Legend creation addedin the demo > xlabel('time (s)') > title('Comparison of model with data') > show() > ------------------------------------------------------------ > I am getting following error stack > > ## File "\ActivePython25\Lib\site-packages\matplotlib\figure.py", line 772, in draw > ## for a in self.axes: a.draw(renderer) > ## File "\ActivePython25\Lib\site-packages\matplotlib\axes.py", line 1601, in draw > ## a.draw(renderer) > ## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 316, in draw > ## self._update_legend_box(renderer) > ## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 626, in _update_legend_box > ## legline_marker = legline._legmarker > ##AttributeError: 'Line2D' object has no attribute '_legmarker' > > Do I have to do something specific to get the legend for vlines graph ? > > regards, > Nitin > > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I'd like to make a mesh plot that has colors in it and a countor plot below it just like in matlab's meshc function. Is there a builtin function that does this, or how could I go about doing it from scratch? Thanks, Ryan -- View this message in context: http://www.nabble.com/matplotlib-equivalent-to-MATLAB-meshc--tp21709817p21709817.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I installed EPD and now would like to install the latest version of matplotlib so I can try out the new CocoaAgg background. I can download the binary mpkg from sourceforge, but it won't work for me because my python version isn't the python from python.org. Can someone help me get this installed? Mac OS 10.5.6 EPD with Py2.5 (4.0.30002 ) -- http://www.enthought.com/epd Thanks, Jeremy
Hi folks, I have a problem when I use the command "show" in matplotlib. I have this code (campo is a matrix of float numbers): from matplotlib.pyplot import figure, show, savefig from matplotlib import cm, colors fig=figure() a=fig.add_subplot(111) a.pcolormesh(vx,vz,campo) show() The first time that I run the code, there isn ́t any problem but when I run the code twice, I can ́t close the figure and Python give me this error message: "RunTime Error! This application has requested the RunTime to terminate it in an unusual way. Please contact the application ́s support team for more information." Somebody can help me? Thank you in advance at all. Oscar Public University of Navarra. _________________________________________________________________ Llévate Messenger en tu móvil allá donde vayas ¿A qué esperas? http://serviciosmoviles.es.msn.com/
Hi, I am unable to create legend for vlines graph. I have modified the vline_demo.py to demonstrate the problem (see below) ------------------------------------------------------------ #!/usr/bin/env python from matplotlib.pyplot import * from numpy import sin, exp, absolute, pi, arange from numpy.random import normal def f(t): s1 = sin(2*pi*t) e1 = exp(-t) return absolute((s1*e1))+.05 t = arange(0.0, 5.0, 0.1) s = f(t) nse = normal(0.0, 0.3, t.shape) * s #plot(t, s+nse, 'b^') vlines(t, [0], s, label='vline demo') ##Legend creation addedin the demo legend() ##Legend creation addedin the demo xlabel('time (s)') title('Comparison of model with data') show() ------------------------------------------------------------ I am getting following error stack ## File "\ActivePython25\Lib\site-packages\matplotlib\figure.py", line 772, in draw ## for a in self.axes: a.draw(renderer) ## File "\ActivePython25\Lib\site-packages\matplotlib\axes.py", line 1601, in draw ## a.draw(renderer) ## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 316, in draw ## self._update_legend_box(renderer) ## File "\ACTIVE~1\lib\site-packages\matplotlib\legend.py", line 626, in _update_legend_box ## legline_marker = legline._legmarker ##AttributeError: 'Line2D' object has no attribute '_legmarker' Do I have to do something specific to get the legend for vlines graph ? regards, Nitin
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <title>Flashmail</title> <style type="text/css"> BODY, TABLE, TR, TD, P {margin:0;padding:0;} BODY {background:#FFFFFF;} </style> </head> <body> <P>Hello,</P> <P>I'm looking a solution for ploting relation like f(x;y)=0.</P> <P> </P> <P>Best regards.</P> <P>Christophe.</P></body></html>
On Tue, Jan 27, 2009 at 11:00 PM, C M <cmp...@gm...> wrote: > I don't think there is a built-in way to do this, but > I thought I'd check first. Can matplotlib (somehow) > directly plot a duration of time, such as in the form: > 0:01:39.983001 (h:m:s:microsec) In general, you must first convert your data to floating point (eg seconds) and then plot that. There is a way of registering custom types to automate the conversions and axis formatting, however , so it can be done. This is how we support plotting of python datetime objects. See for example http://matplotlib.sourceforge.net/examples/units/date_converter.html http://matplotlib.sourceforge.net/examples/units/date_support.html and the matplotlib.units module JDH
On Wed, Jan 28, 2009 at 3:05 AM, dikshie <di...@gm...> wrote: > hi, > does matplotlib support tgif? No, you can see a list of outputs at http://matplotlib.sourceforge.net/faq/installing_faq.html#backends JDH
dikshie wrote: > hi, > does matplotlib support tgif? > > > with best regards, > I had to google tgif to find out that it is the file format output by the tgif drawing program (http://bourbon.usc.edu:8001/tgif/current.html). It is not an image format, and matplotlib cannot read or write it. If you mean gif, the answer is still no, although you can easily convert from png to gif using PIL. -Jeff
hi, does matplotlib support tgif? with best regards, -- -dikshie-
I don't think there is a built-in way to do this, but I thought I'd check first. Can matplotlib (somehow) directly plot a duration of time, such as in the form: 0:01:39.983001 (h:m:s:microsec) Thanks, Che
On Tue, Jan 27, 2009 at 7:16 PM, Eli Brosh <eb...@gm...> wrote: > Many thanks to Jeff and to Patric ! > I will try to work along the line suggested by Jeff. > Patric, please send me your code. > I hope to learn from it. > > Thanks again, > Eli Here is a template that can be used. I use this for meteorological models, but should work with any gridded file. import numpy as np from mpl_toolkits.basemap import Basemap f = (some gridded file) X = np.array(grab longitudes from f) Y = np.array(grab latitudes from f) field = np.array(grab field to be contoured from f) map = Basemap(make a Basemap call here) level = np.arange(minval, maxval, interval) col = map.contour(X, Y, field, level).collections for vertex in col[i].get_paths(): # GET THE PATHS FOR THE EACH CONTOUR BY LOOPING THROUGH CONTOURS for vertex in xy.vertices: # ITERATE OVER THE PATH OBJECTS x, y = map(vertex[0],vertex[1],inverse=True) # vertex[0] and now 'x' is the longitude of the vertex and vertex[1] and now 'y' is the latitude of the vertex Let me know how this works. -Patrick > > On Tue, Jan 27, 2009 at 7:09 PM, Patrick Marsh <pat...@gm...> > wrote: >> >> On Tue, Jan 27, 2009 at 5:33 PM, Jeff Whitaker <js...@fa...> wrote: >> > Eli Brosh wrote: >> >> Hello, >> >> I am trying to extract the coordinates of contour lines. >> >> I tried the following: >> >> >> >> cs = *contour*(Z) >> >> for lev, col in zip(cs.levels, cs.collections): >> >> s = col._segments >> >> >> >> that I found in a previous post (title "contouring", by Jose >> >> Gómez-Dans-2 <http://www.nabble.com/user/UserProfile.jtp?user=30071> >> >> Nov 30, 2007; 07:47am ) . >> >> >> >> I hoped that s will be a list of numpy arrays, each containing the >> >> (x,y) vertices >> >> defining a contour line at level lev. >> >> However, I got an error message: >> >> AttributeError: 'LineCollection' object has no attribute '_segments' >> >> >> >> >> >> How is it possible to get coordinates of the contours, similar to the >> >> MATLAB command >> >> [C,H] = *CONTOUR*(...) >> >> where the result in C is the coordinates of the contours. >> >> >> >> A similar question appeared in a post "contour data" (by Albert Swart >> >> <http://www.nabble.com/user/UserProfile.jtp?user=382945> May 17, 2006; >> >> 09:42am) but I could not understand the answer. >> >> Is it possible to get more specific directions with a simple example ? >> >> >> >> >> >> Thanks >> >> Eli >> > Eli: Calling get_paths() on each line collection in CS.collections will >> > return a list of Path objects. From the Path objects, you can get a Nx2 >> > array of vertices from the "vertices" attribute. There are no examples >> > that I know of, but if you get it to do what you want to do, it would be >> > great if you could contribute an example. As you noted, this question >> > has come up several times before. >> > >> > -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 >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > This SF.net email is sponsored by: >> > SourcForge Community >> > SourceForge wants to tell your story. >> > http://p.sf.net/sfu/sf-spreadtheword >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> >> I'm not sure if this is entirely what you (Eli) are looking for, but I >> have code that will contour model data on a map and then extract the >> lat,lon pairs of all the vertices. If this is what you are looking >> for, I'm happy to share what I've done. >> >> -Patrick >> >> -- >> Patrick Marsh >> Graduate Research Assistant >> School of Meteorology >> University of Oklahoma >> http://www.patricktmarsh.com > > -- Patrick Marsh Graduate Research Assistant School of Meteorology University of Oklahoma http://www.patricktmarsh.com
On Tue, Jan 27, 2009 at 12:44 PM, Mostafa Razavi <mo...@se...> wrote: > At http://www.scipy.org/Cookbook/Matplotlib/SigmoidalFunctions I read > that matplotlib supports drawing arbitrary paths with splines, but the > functionality hasn't been exposed to the user. Can anyone tell me how I > can use this functionality? I tried searching the source code for > "spline," but I couldn't find anything useful. > > (Sorry if this has been already brought up. I tried to search the > archives but, weirdly enough, I couldn't find any search functionality. > Perhaps it hasn't been exposed to the user, yet!) > This is lightly documented, so no worries. See the following examples http://matplotlib.sourceforge.net/examples/api/path_patch_demo.html http://matplotlib.sourceforge.net/examples/event_handling/path_editor.html http://matplotlib.sourceforge.net/examples/pylab_examples/dolphin.html and the docs for the path module http://matplotlib.sourceforge.net/api/path_api.html JDH
Many thanks to Jeff and to Patric ! I will try to work along the line suggested by Jeff. Patric, please send me your code. I hope to learn from it. Thanks again, Eli On Tue, Jan 27, 2009 at 7:09 PM, Patrick Marsh <pat...@gm...>wrote: > On Tue, Jan 27, 2009 at 5:33 PM, Jeff Whitaker <js...@fa...> wrote: > > Eli Brosh wrote: > >> Hello, > >> I am trying to extract the coordinates of contour lines. > >> I tried the following: > >> > >> cs = *contour*(Z) > >> for lev, col in zip(cs.levels, cs.collections): > >> s = col._segments > >> > >> that I found in a previous post (title "contouring", by Jose > >> Gómez-Dans-2 <http://www.nabble.com/user/UserProfile.jtp?user=30071> > >> Nov 30, 2007; 07:47am ) . > >> > >> I hoped that s will be a list of numpy arrays, each containing the > >> (x,y) vertices > >> defining a contour line at level lev. > >> However, I got an error message: > >> AttributeError: 'LineCollection' object has no attribute '_segments' > >> > >> > >> How is it possible to get coordinates of the contours, similar to the > >> MATLAB command > >> [C,H] = *CONTOUR*(...) > >> where the result in C is the coordinates of the contours. > >> > >> A similar question appeared in a post "contour data" (by Albert Swart > >> <http://www.nabble.com/user/UserProfile.jtp?user=382945> May 17, 2006; > >> 09:42am) but I could not understand the answer. > >> Is it possible to get more specific directions with a simple example ? > >> > >> > >> Thanks > >> Eli > > Eli: Calling get_paths() on each line collection in CS.collections will > > return a list of Path objects. From the Path objects, you can get a Nx2 > > array of vertices from the "vertices" attribute. There are no examples > > that I know of, but if you get it to do what you want to do, it would be > > great if you could contribute an example. As you noted, this question > > has come up several times before. > > > > -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 > > > > > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > I'm not sure if this is entirely what you (Eli) are looking for, but I > have code that will contour model data on a map and then extract the > lat,lon pairs of all the vertices. If this is what you are looking > for, I'm happy to share what I've done. > > -Patrick > > -- > Patrick Marsh > Graduate Research Assistant > School of Meteorology > University of Oklahoma > http://www.patricktmarsh.com >
On Tue, Jan 27, 2009 at 5:33 PM, Jeff Whitaker <js...@fa...> wrote: > Eli Brosh wrote: >> Hello, >> I am trying to extract the coordinates of contour lines. >> I tried the following: >> >> cs = *contour*(Z) >> for lev, col in zip(cs.levels, cs.collections): >> s = col._segments >> >> that I found in a previous post (title "contouring", by Jose >> Gómez-Dans-2 <http://www.nabble.com/user/UserProfile.jtp?user=30071> >> Nov 30, 2007; 07:47am ) . >> >> I hoped that s will be a list of numpy arrays, each containing the >> (x,y) vertices >> defining a contour line at level lev. >> However, I got an error message: >> AttributeError: 'LineCollection' object has no attribute '_segments' >> >> >> How is it possible to get coordinates of the contours, similar to the >> MATLAB command >> [C,H] = *CONTOUR*(...) >> where the result in C is the coordinates of the contours. >> >> A similar question appeared in a post "contour data" (by Albert Swart >> <http://www.nabble.com/user/UserProfile.jtp?user=382945> May 17, 2006; >> 09:42am) but I could not understand the answer. >> Is it possible to get more specific directions with a simple example ? >> >> >> Thanks >> Eli > Eli: Calling get_paths() on each line collection in CS.collections will > return a list of Path objects. From the Path objects, you can get a Nx2 > array of vertices from the "vertices" attribute. There are no examples > that I know of, but if you get it to do what you want to do, it would be > great if you could contribute an example. As you noted, this question > has come up several times before. > > -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 > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > I'm not sure if this is entirely what you (Eli) are looking for, but I have code that will contour model data on a map and then extract the lat,lon pairs of all the vertices. If this is what you are looking for, I'm happy to share what I've done. -Patrick -- Patrick Marsh Graduate Research Assistant School of Meteorology University of Oklahoma http://www.patricktmarsh.com
Eli Brosh wrote: > Hello, > I am trying to extract the coordinates of contour lines. > I tried the following: > > cs = *contour*(Z) > for lev, col in zip(cs.levels, cs.collections): > s = col._segments > > that I found in a previous post (title "contouring", by Jose > Gómez-Dans-2 <http://www.nabble.com/user/UserProfile.jtp?user=30071> > Nov 30, 2007; 07:47am ) . > > I hoped that s will be a list of numpy arrays, each containing the > (x,y) vertices > defining a contour line at level lev. > However, I got an error message: > AttributeError: 'LineCollection' object has no attribute '_segments' > > > How is it possible to get coordinates of the contours, similar to the > MATLAB command > [C,H] = *CONTOUR*(...) > where the result in C is the coordinates of the contours. > > A similar question appeared in a post "contour data" (by Albert Swart > <http://www.nabble.com/user/UserProfile.jtp?user=382945> May 17, 2006; > 09:42am) but I could not understand the answer. > Is it possible to get more specific directions with a simple example ? > > > Thanks > Eli Eli: Calling get_paths() on each line collection in CS.collections will return a list of Path objects. From the Path objects, you can get a Nx2 array of vertices from the "vertices" attribute. There are no examples that I know of, but if you get it to do what you want to do, it would be great if you could contribute an example. As you noted, this question has come up several times before. -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
Hello, I am trying to extract the coordinates of contour lines. I tried the following: cs = *contour*(Z) for lev, col in zip(cs.levels, cs.collections): s = col._segments that I found in a previous post (title "contouring", by Jose Gómez-Dans-2<http://www.nabble.com/user/UserProfile.jtp?user=30071> Nov 30, 2007; 07:47am ) . I hoped that s will be a list of numpy arrays, each containing the (x,y) vertices defining a contour line at level lev. However, I got an error message: AttributeError: 'LineCollection' object has no attribute '_segments' How is it possible to get coordinates of the contours, similar to the MATLAB command [C,H] = *CONTOUR*(...) where the result in C is the coordinates of the contours. A similar question appeared in a post "contour data" (by Albert Swart<http://www.nabble.com/user/UserProfile.jtp?user=382945> May 17, 2006; 09:42am) but I could not understand the answer. Is it possible to get more specific directions with a simple example ? Thanks Eli
> The problem I have is then when I issue the following > > >>> from pylab import * > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/local/lib/python2.6/site-packages/pylab.py", line 1, in > <module> File "/usr/local/lib/python2.6/site-packages/matplotlib/pylab.py", > line 206, in <module> File > "/usr/local/lib/python2.6/site-packages/matplotlib/mpl.py", line 1, in > <module> File > "/usr/local/lib/python2.6/site-packages/matplotlib/artist.py", line 5, in > <module> File > "/usr/local/lib/python2.6/site-packages/matplotlib/transforms.py", line 34, > in <module> ImportError: No module named _path I have resolved it. The problem was the protection on the .so files. They were installed with -rwxrwx--- which I changed to -rwxrwxrwx. I can now plot. Peter
It just occurred to me that another option might be to simply add a new colour option "line" for mec and mfc which would instruct them to pick up the current line colour. Gary
At http://www.scipy.org/Cookbook/Matplotlib/SigmoidalFunctions I read that matplotlib supports drawing arbitrary paths with splines, but the functionality hasn't been exposed to the user. Can anyone tell me how I can use this functionality? I tried searching the source code for "spline," but I couldn't find anything useful. (Sorry if this has been already brought up. I tried to search the archives but, weirdly enough, I couldn't find any search functionality. Perhaps it hasn't been exposed to the user, yet!)
Norbert Nemec wrote: > Before my work in 2004, the colors were not following the line color at > all, which was clearly bad behavior. > > Now, there are two categories: filled markers (with edge color black and > filling following the line color) and non-filled markers (with edge > color following line color). > > The black edge of filled markers is a matter of style which I personally > like and would not want to change. > > The thing that was up for dispute was only about what the edge color of > filled markers should do when the filling is switched off. I see three > ways to solve this: > > a) Leave it black. (current behavior) > b) Switch mec to line color if mfc is either "none" or "white". > c) Switch mec to line color if mfc is not "auto" For (b), please don't consider "white" as equivalent to "none"--they are completely different. The most logical thing, with minimum surprise and maximum ease of use, *might* be to consider filled markers with the filling turned off as exactly equivalent to unfilled markers. Setting mfc to "none" is what turns off the filling. I don't see any docstring explanation of the "auto" settings. Eric > > b) or c) might be what people would expect and prefer, but I feared that > it would be one step too many in built-in intelligence. But then - maybe > c) would be ok? After all, switching from c) to a) by an explicit > mec="k" is simple and obvious, the other way around takes a bit more. > > Greetings, > Norbert > > > > Gary Ruben wrote: >> Thanks John, >> >> That shows how long it is since I used line markers in my plots. Because >> I use them so infrequently, I'm probably not the best one to suggest it, >> but I think it would be nicer for the default colour to match the line >> colour by default, or for an option to be added to allow its simple >> selection without users having to search through the mailing list to >> find Norbert's solution. If I was publishing a colour plot with line >> markers I would definitely want to do this. >> >> Gary >> >> John Hunter wrote: >> >>> On Mon, Jan 26, 2009 at 6:17 AM, Gary Ruben wrote: >>> >>>> Has the mec always been black? I thought it used to be the same as the >>>> line colour. I expected it to default to the line colour, as Che expected. >>>> >>> It's been this way since at least 2004: >>> >>> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/__init__.py?revision=540&view=markup >>> >>> JDH >>> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Dear All, I apologise if this is naive, but I am having problems with matplotlib. I downloaded it as a tar ball from SourceForge and it all compiled and installed without any error. I have the following setup. Download source SourceForge - matplotlib-0.98.5.2.tar.gz OS OpenSUSE 11.1 gcc gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux) uname -a Linux trevor 2.6.27.7-9-pae #1 SMP 2008年12月04日 18:10:04 +0100 i686 i686 i386 GNU/Linux python Python 2.6 matplotlib >>> import matplotlib; print matplotlib.__version__ 0.98.5.2 I have taken the default 'matplotlibrc' from the web site and it is stored in ~/.matplotlib The problem I have is then when I issue the following >>> from pylab import * Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.6/site-packages/pylab.py", line 1, in <module> File "/usr/local/lib/python2.6/site-packages/matplotlib/pylab.py", line 206, in <module> File "/usr/local/lib/python2.6/site-packages/matplotlib/mpl.py", line 1, in <module> File "/usr/local/lib/python2.6/site-packages/matplotlib/artist.py", line 5, in <module> File "/usr/local/lib/python2.6/site-packages/matplotlib/transforms.py", line 34, in <module> ImportError: No module named _path Any suggestions will be greatly appreciated, thanks Peter
Hi, I am creating a scatter plot of some data that spans many orders of magnitude, and so I am changing the axes using gca().set_xscale('log') gca().set_yscale('log') Clearly, this only shows non-zero data. Is there an easy way to also include data has zero values for coordinates (say one tick mark to the left/below)? Thanks in advance! Uri -- Uri Laserson PhD Candidate, Biomedical Engineering Harvard Medical School (Genetics) Massachusetts Institute of Technology (Mathematics) phone +1 917 742 8019 las...@mi...
massimo sandal wrote: > Dmitrey ha scritto: >> hi matplotlib developers and users, >> after installation, it yields >> >> ImportError: No module named _tkinter, please install the python-tk package > all complex packages have dependencies. > It just seems Kubuntu missed one. Maybe, Maybe not -- MPL is perfectly usable without tk -- you just can't use the tk back-end. If someone is going to use it with GTK, or wx, or to generate images for a web app, they don't need TK, for instance, and may not want it installed. However, it looks like MPL is setting TK as the default back-end, so maybe TK should be a dependency if they're doing that. -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...
Derek Hohls wrote: > I hope I speak for others when I say: for those of us who cannot > be at PyCon, please consider making tutorials etc available for > download afterwards. We'd love to be able to spread the good > word about these excellent libraries. Keep an eye out on the PyConUS website after the conference, I believe they'll make the tutorials available there... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk