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
(11) |
2
(24) |
3
(24) |
4
(31) |
5
(30) |
6
(27) |
7
(25) |
8
(8) |
9
(2) |
10
(12) |
11
(16) |
12
(33) |
13
(18) |
14
(17) |
15
(3) |
16
(7) |
17
(8) |
18
(22) |
19
(20) |
20
(25) |
21
(10) |
22
(17) |
23
(18) |
24
(23) |
25
(15) |
26
(19) |
27
(6) |
28
(7) |
29
(6) |
30
(1) |
31
(12) |
|
|
|
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-08-23 04:12:55
|
On Thu, Aug 20, 2009 at 2:01 AM, Sameer Regmi<re...@gm...> wrote: > We tried the method 1 but the result was a garbled mesh Please describe what you did and why the result is wrong. The method 1 with quadratic bezier curve should be most straight-forward and easy thing to do. Calculating the control points is also straight forward. While you may simply use matplotlib.bezier.get_intersection, you'd better come up with some optimized version since you need to calculate this for lots of positions. It is not clear how you're drawing path currently, but Line2D class is not suitable for bezier lines. You may use PathPatch class. Or you can create your own artist class (maybe this is what you meant by "implemented"). A simple version of bezier artist can be found in mpl_toolkits.axes_grid.axeslines.BezierPath (included in mpl 0.99). If you haven't, please take a look at the tutorial below. http://matplotlib.sourceforge.net/users/path_tutorial.html -JJ |
From: Jae-Joon L. <lee...@gm...> - 2009-08-23 03:37:30
|
What you need is to adjust the axes position of the colorbar at the drawing time (because the axes position of the contour plot is adjusted only during the drawing time). You may do this by properly setting the axe_locator property of the axes. If you're using mpl 0.99, axes_grid toolkit may be helpful. I just posted a simple example with the screenshot in the link below. http://abitofpythonabitofastronomy.blogspot.com/2009/08/creating-color-bar-using-inset-axes.html Regards, -JJ On Sat, Aug 22, 2009 at 9:51 PM, Patrick Marsh<pat...@gm...> wrote: > Greeting MPL world, > > I have a contourf plot where the aspect ratio is 1. I need to add a > colorbar to the plot in a manner that keeps the colorbar in the same > place relative to the contourf plot (good.png), even if the parent > window is resized. I can do this with text, but haven't been able to > figure out how to do it with a colorbar. To the best of my knowledge, > there are two ways forward. > > 1.) I can create an entirely new axis instance (cax) but will need to > find a way to define the axes in a relative way to the original ax > instance. As it stands now, I can only define axes in terms of the > total figure size. As a result, the figure looks like it does in > bad.png > > > 2.) I can use the original ax instance, but need to find a way to > have more control over the colorbar placement. For example, it needs > to "sit" on the x-axis and not be centered in the middle of the yaxis. > Using shrink and aspect, I can get the plot size to be correct, > however it's position is centered on the yaxis as in bad2.png > > Is there a way to accomplish what I'm needing to do and I'm just missing it? > > Thanks in advance, > Patrick > --- > Patrick MarshC > Graduate Research Assistant > School of Meteorology > University of OklahomaC > http://www.patricktmarsh.com > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Patrick M. <pat...@gm...> - 2009-08-23 01:51:40
|
Greeting MPL world, I have a contourf plot where the aspect ratio is 1. I need to add a colorbar to the plot in a manner that keeps the colorbar in the same place relative to the contourf plot (good.png), even if the parent window is resized. I can do this with text, but haven't been able to figure out how to do it with a colorbar. To the best of my knowledge, there are two ways forward. 1.) I can create an entirely new axis instance (cax) but will need to find a way to define the axes in a relative way to the original ax instance. As it stands now, I can only define axes in terms of the total figure size. As a result, the figure looks like it does in bad.png 2.) I can use the original ax instance, but need to find a way to have more control over the colorbar placement. For example, it needs to "sit" on the x-axis and not be centered in the middle of the yaxis. Using shrink and aspect, I can get the plot size to be correct, however it's position is centered on the yaxis as in bad2.png Is there a way to accomplish what I'm needing to do and I'm just missing it? Thanks in advance, Patrick --- Patrick MarshC Graduate Research Assistant School of Meteorology University of OklahomaC http://www.patricktmarsh.com |
From: per f. <per...@gm...> - 2009-08-22 23:36:19
|
i figured out what i did wrong and so am writing it here in case it helps others. the basic issue is that the .ttf font was missing in the new matplotlib directory. to discover this, i ran python with --verbose-debug as suggested in previous threads by others. then i copied my version of Helvetica.ttf into: /Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/pdfcorefonts and /Library/Python/2.5/site-packages/matplotlib/mpl-data/fonts/ttf then everything worked and i was able to change fonts to helvetica. thanks. On Sat, Aug 22, 2009 at 7:12 PM, per freem<per...@gm...> wrote: > Hi all, > > the following code used to work for me in matplotlib-0.98 to make a > simple scatter plot and change the font from the default font to > Helvetica (I am using mac os x). > > import matplotlib > matplotlib.use('PDF') > import matplotlib.pyplot as plt > from matplotlib import rc > rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) > from scipy import * > from numpy import * > > my_fig = plt.figure(figsize=(6,5), dpi=100) > x = rand(100)*300 > y = rand(100) > plt.scatter(x, y) > plt.rcParams['xtick.direction'] = 'out' > plt.rcParams['ytick.direction'] = 'out' > c = 0.05*300.5 > plt.xlim([0-c, 300+c]) > plt.ylim([-0.05, 1.05]) > plt.savefig('x.pdf') > > i recently upgraded to matplotlib-0.99 and the changing of the font > using the above method no longer works. the figure is plotted the > same, but the font remains the default matplotlib font. > > one potential problem in the installation was this: i installed > matplotlib-0.99 using the dmg prepackaged binary installer. this > installed matplotlib in the directory: > > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > > however, for some reason ipython / python2.5 was looking for packages in: > > /Library/Python/2.5/site-packages > > and so matplotlib/mpl_toolkits was not found. so I copied the > directories 'matplotlib' and 'mpl_toolkits' from > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > to /Library/Python/2.5/site-packages. Perhaps this was the cause of > the problem? > > thanks for your help. > > (i run my code via ipython, by the way.) > |
From: per f. <per...@gm...> - 2009-08-22 23:12:40
|
Hi all, the following code used to work for me in matplotlib-0.98 to make a simple scatter plot and change the font from the default font to Helvetica (I am using mac os x). import matplotlib matplotlib.use('PDF') import matplotlib.pyplot as plt from matplotlib import rc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) from scipy import * from numpy import * my_fig = plt.figure(figsize=(6,5), dpi=100) x = rand(100)*300 y = rand(100) plt.scatter(x, y) plt.rcParams['xtick.direction'] = 'out' plt.rcParams['ytick.direction'] = 'out' c = 0.05*300.5 plt.xlim([0-c, 300+c]) plt.ylim([-0.05, 1.05]) plt.savefig('x.pdf') i recently upgraded to matplotlib-0.99 and the changing of the font using the above method no longer works. the figure is plotted the same, but the font remains the default matplotlib font. one potential problem in the installation was this: i installed matplotlib-0.99 using the dmg prepackaged binary installer. this installed matplotlib in the directory: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages however, for some reason ipython / python2.5 was looking for packages in: /Library/Python/2.5/site-packages and so matplotlib/mpl_toolkits was not found. so I copied the directories 'matplotlib' and 'mpl_toolkits' from /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages to /Library/Python/2.5/site-packages. Perhaps this was the cause of the problem? thanks for your help. (i run my code via ipython, by the way.) |
From: marc d. <mde...@ya...> - 2009-08-22 21:20:40
|
I created a simple scatter plot and a service routine to print out the coordinates of the points I pick with the cursor (based on the demo). It works until I select the pan or zoom cursor. After I zoom or pan, I can no longer get back to the normal cursor which allows me to "pick" a circle. Even clicking "home" doesn't help. The code is shown below -------------------------------------------------------------------------------- from matplotlib import figure,pyplot from numpy import linspace,sin,take fig=pyplot.figure() ax1=fig.add_subplot(1,1,1) # (numRows, numCols, plotNum) t=linspace(0,10,100) y1=sin(5*t) y2=y1+sin(10*t) line1=ax1.scatter(y1,y2,picker=True) def onpick1(event): ind = event.ind print 'onpick1 scatter:', ind, take(y1, ind), take(y2, ind) fig.canvas.mpl_connect('pick_event', onpick1) pyplot.show() -------------------------------------------------------------------------------- this is based on the demo at http://matplotlib.sourceforge.net/examples/event_handling/pick_event_demo.html?highlight=scatter Marc Desmarais 537 Park Av. Long Beach, CA, 90814 (562) 712 8682 cell |
From: John O. <joh...@ya...> - 2009-08-22 18:49:37
|
Jouni K. Seppänen <jks@...> writes: > John Owens <john_owens@...> writes: > > > plot([1,2,3], [1,4,9], markerlist=['A', 'B', 'C']) > > > > and have it draw the first point with a rendered > > letter 'A', the second with a 'B', and the third with > > a 'C'. > > You could do > > text(1,1,'A') > text(2,4,'B') > text(3,9,'C') Quite sensible, thanks! DW also suggests "You can use the 'hold' command to plot multiple vectors on the same plot, each with its own marker." Neither of those is ideal - it would be much nicer to be able to pass either a {marker list, text list} as an argument to the plot command directly - but at least the workaround is reasonable. JDO |
From: Darren D. <dsd...@gm...> - 2009-08-22 16:29:59
|
On Sat, Aug 22, 2009 at 11:07 AM, marc desmarais<mde...@ya...> wrote: > what's a "patch" for? > > At this address: > > http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Patch > > I found the following description of a "patch" > > "A patch is a 2D thingy with a face color and an edge color." > > Could someone expand? Why use it? When to use it? What does it look like? Have a look at the examples that include patch in the name, for example api/patch_collection.py and api/path_patch_demo.py Darren |
From: marc d. <mde...@ya...> - 2009-08-22 15:08:08
|
what's a "patch" for? At this address: http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.patches.Patch I found the following description of a "patch" "A patch is a 2D thingy with a face color and an edge color." Could someone expand? Why use it? When to use it? What does it look like? thanks Marc Desmarais |
From: Alan G I. <ala...@gm...> - 2009-08-22 12:53:17
|
On 8/22/2009 2:42 AM Michiel de Hoon apparently wrote: > Does anybody know why the show._needmain stuff is needed in the show() function in backend_tkagg.py?... > If I remove the show._needmain stuff ... > then the function still seems to work fine, and multiple show()s also works. Define "works". It seems to me that you could then have a script that tries to enter the mainloop multiple times. I suspect "works" means that in an interactive session you can enter and leave the mainloop repeatedly? Alan Isaac (just another user) |
From: German O. <ger...@gm...> - 2009-08-22 12:01:16
|
I'm new in Python and QT, Do you know where I could find an example of a mplot3d plot embebed in QT4? Thanks for your help german |
From: Werner F. B. <wer...@fr...> - 2009-08-22 11:09:25
|
Werner F. Bruhin wrote: > I would like to have the percentage values shown in white instead of in > black within a pie chart. > The following code is doing what I want, but it does not feel right. myPie = axes.pie(values, labels=labels, autopct=u'%1.0f%%', shadow=False, colors=colors) for x in myPie[2]: x.set_color('w') Is there really no "cleaner" way of doing this? Werner |
From: Michiel de H. <mjl...@ya...> - 2009-08-22 06:42:41
|
Does anybody know why the show._needmain stuff is needed in the show() function in backend_tkagg.py? Currently, this function is as follows: def show(): """ Show all the figures and enter the gtk mainloop This should be the last line of your script. This function sets interactive mode to True, as detailed on http://matplotlib.sf.net/interactive.html """ for manager in Gcf.get_all_fig_managers(): manager.show() import matplotlib matplotlib.interactive(True) if rcParams['tk.pythoninspect']: os.environ['PYTHONINSPECT'] = '1' if show._needmain: Tk.mainloop() show._needmain = False show._needmain = True If I remove the show._needmain stuff, as in: def show(): """ Show all the figures and enter the gtk mainloop This should be the last line of your script. This function sets interactive mode to True, as detailed on http://matplotlib.sf.net/interactive.html """ for manager in Gcf.get_all_fig_managers(): manager.show() import matplotlib matplotlib.interactive(True) if rcParams['tk.pythoninspect']: os.environ['PYTHONINSPECT'] = '1' Tk.mainloop() then the function still seems to work fine, and multiple show()s also works. --Michiel. --- On Thu, 8/20/09, Kim, Dae-Won <dw...@gm...> wrote: > From: Kim, Dae-Won <dw...@gm...> > Subject: Re: [Matplotlib-users] show() problem in Mac OS X 10.5.8 > To: "Michiel de Hoon" <mjl...@ya...> > Cc: "Ryan May" <rm...@gm...>, mat...@li... > Date: Thursday, August 20, 2009, 10:26 AM > > I tested with TKAgg and WXAgg. I just bought macbook and > I'm newbie yet. Do I need to set something special for > the multiple show()s? > > Thanks, > > -Dae-Won > > On Thu, Aug 20, 2009 at 10:01 AM, > Michiel de Hoon <mjl...@ya...> > wrote: > > > Whether or not you can do multiple > show()s depends on which backend you use. For example, the > Mac OS X native backend has no problems with the multiple > show()s in your example. Which backend were you using? While > matplotlib does not support multiple show()s in general, > there may be a simple solution to get that working for the > backend you are using. > > > > > > --Michiel. > > > > --- On Wed, 8/19/09, Kim, Dae-Won <dw...@gm...> > wrote: > > > > > From: Kim, Dae-Won <dw...@gm...> > > > Subject: Re: [Matplotlib-users] show() problem in Mac > OS X 10.5.8 > > > To: "Ryan May" <rm...@gm...> > > > Cc: mat...@li... > > > Date: Wednesday, August 19, 2009, 2:48 PM > > > > > > The one 'preliminary' solution I found is > using > > > an interactive mode + raw_input. > > > Here is and example, > > > > > > ion() > > > plot([1,2,3,4,5]) > > > raw_input('Type Enter') > > > clf() > > > > > > > > > plot([1,2,3,4,5]) > > > raw_input('Type_Enter') > > > clf() > > > plot([1,2,3,4,5]) > > > show() > > > > > > With this approach, I can press the enter when I want > to > > > see next figure. > > > > > > > > > > > > Though It's not as convenient as 'multiple > > > show()'.. > > > > > > > > > On Wed, Aug 19, 2009 at 1:57 PM, > > > Kim, Dae-Won <dw...@gm...> > > > wrote: > > > > > > > > > > > > > > > On Wed, Aug 19, 2009 at 1:02 PM, > > > Ryan May <rm...@gm...> > > > wrote: > > > > > > > > > > > > On Wed, Aug 19, 2009 at 11:55 > > > AM, coati <dw...@gm...> > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > I have a problem with show() command in my macbook > > > machine (Leopard 10.5.8). > > > > > > For example, if I run the script shown below > > > > > > (let assume it is saved as 'test.py', and I > run a > > > command 'python test.py'), > > > > > > > > > > > > --------------------------------------- > > > > > > > > > > > > plot([1,2,3,4,5]) > > > > > > show() #first window > > > > > > plot([1,2,3,4,5]) > > > > > > show() #second window > > > > > > plot([1,2,3,4,5]) > > > > > > show() #third window > > > > > > > > > > > > --------------------------------------- > > > > > > > > > > > > Then the first window just pops up and I can see a > > > beautiful straight line > > > > > > :) No problem so far. > > > > > > But, after I close the first window by clicking the > close > > > button of the > > > > > > window, > > > > > > other two window (second and third) just pops up and > close > > > themselves > > > > > > instantly > > > > > > even though I didn't click the close button... > > > > > > Also, the second and third plot is shown in the same > > > window. > > > > > > > > > > > > I don't have such problem in my Ubuntu machine.. > > > > > > > > > > > > Does anybody know reasons? > > > show() actually handles starting the GUI mainloop, so > you > > > really shouldn't be calling it more than once from > a > > > script. Quite frankly, it's more amazing that it > works > > > on your Ubuntu macine. :) If you're wanting 3 > separate > > > windows, try: > > > > > > > > > > > > > > > > > > > > > plot([1,2,3,4,5]) > > > figure() > > > plot([1,2,3,4,5]) > > > figure() > > > plot([1,2,3,4,5]) > > > show() > > > > > > Ryan > > > > > > -- > > > Ryan May > > > > > > Graduate Research Assistant > > > School of Meteorology > > > University of Oklahoma > > > > > > > > > > > > > > > > > > Thanks Ryan, > > > > > > Hm.. it's a bit strange.. I just installed > matplotlib > > > at Ubuntu using the package manager :) > > > And, another linux machines (red hat enterprise) can > do > > > this too. For the RHELs, I compiled matplotlib source > code > > > by myself. > > > > > > > > > > > > > > > > > > figure() works very well, but what I want to do is to > check > > > the plots one by one and thus > > > I can exit the script at any time I want (because I > usually > > > have lots of figures to check and I don't want > > > to pop up every of them at the same time..) > > > > > > > > > > > > > > > > > > Anyway, thank you very much! > > > > > > > > > > > > > > > > > > > > > > > > -----Inline Attachment Follows----- > > > > > > > ------------------------------------------------------------------------------ > > > Let Crystal Reports handle the reporting - Free > Crystal > > > Reports 2008 30-Day > > > trial. Simplify your report design, integration and > > > deployment - and focus on > > > what you do best, core application coding. Discover > what's > > > new with > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > -----Inline Attachment Follows----- > > > > > > _______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > > > > > > |
From: Jouni K. S. <jk...@ik...> - 2009-08-22 06:11:30
|
John Owens <joh...@ya...> writes: > plot([1,2,3], [1,4,9], markerlist=['A', 'B', 'C']) > > and have it draw the first point with a rendered > letter 'A', the second with a 'B', and the third with > a 'C'. You could do text(1,1,'A') text(2,4,'B') text(3,9,'C') -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Christopher B. <Chr...@no...> - 2009-08-22 05:46:10
|
Erik Schweller wrote: > My overall goal is to generate contour plots for a wide range of input > data. The data points are not regularly spaced and do not align to > any grid. The data points represent measurements taken from a model > that can take on a variety of shapes. To make matters more difficult, > I'd prefer not to interpolate around corners of the model. It strikes me that when you are working with unstructured data like this, it may be better to keep it unstrucured -- do the delanauy triangulation and directly contour from that. It's actually prety easy to contour a triangular mesh. Unfortunately, I haven't see code to do it in scipy or MPL. Am I wrong? Is there something there. If not, there really should be it seems a bit silly to shoehorn your data to a rectangular grid just to contour it. I suppose NN interpolation is essentially doing this already, but it introduces issues with a boundary that doesnt' line up to a rectangular grid. As I think about it, I'm going to have to write code to do this (contour an unstructured triangular mesh) sometime soon, so please let me know if it does exist already -- if not I'll try to remember to contribute it when I get around to it. -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: Nicolas P. <nic...@gm...> - 2009-08-22 04:20:38
|
Hey guys, I found another typo here: http://matplotlib.sourceforge.net/api/axes_api.html?highlight=legend#matplotlib.axes.Axes.get_legend_handles_labels -equibalent +equivalent Cheers, N On Fri, Aug 21, 2009 at 8:29 PM, marc desmarais <mde...@ya...> wrote: > This sentence is missing "to" or "and" I think: > > "These helper methods will take your data (eg. numpy arrays and strings) > create primitive ... > > Is in at http://matplotlib.sourceforge.net/users/artists.html > > Marc Desmarais > Long Beach, CA > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Nicolas Pinto Ph.D. Candidate, Brain & Computer Sciences Massachusetts Institute of Technology, USA http://web.mit.edu/pinto |
From: marc d. <mde...@ya...> - 2009-08-22 03:30:08
|
This sentence is missing "to" or "and" I think: "These helper methods will take your data (eg. numpy arrays and strings) create primitive ... Is in at http://matplotlib.sourceforge.net/users/artists.html Marc Desmarais Long Beach, CA |
From: John O. <joh...@ya...> - 2009-08-22 03:05:26
|
So I can do: plot([1,2,3], [1,4,9], marker='+') and it'll draw 3 points each with a + marker. What I'd really like to do is plot([1,2,3], [1,4,9], markerlist=['A', 'B', 'C']) and have it draw the first point with a rendered letter 'A', the second with a 'B', and the third with a 'C'. 1) Not sure how to draw a letter as my marker - are markers limited to those in the marker list? Is that possible? 2) And is it possible to have a different marker for each point in a dataset, specified by a vector? I guess I could draw a separate plot for each point, but that's an enormous kludge. JDO |
From: John H. <jd...@gm...> - 2009-08-22 00:06:28
|
On Fri, Aug 21, 2009 at 6:44 PM, Michael Cohen<mc...@ca...> wrote: > Hi all, > At the Scipy2009 conference I was recently told I could get better > performance from matplotlib through an ssh tunnel by using a different > backend. However, I can't find any introductory material on this, just > function docs for backend_bases module. What part of the matplotlib > call includes backend specification? What backends work well for ssh > tunnels? GTK and WX should work best working over ssh, and I think GTKCairo, since these should send the drawing commands over X11 rather than the entire raster which the *Agg backends send. We should put this in the backends FAQ, but for now there is some additional relevant info there: http://matplotlib.sourceforge.net/faq/installing_faq.html#backends |
From: Ryanitus <rya...@ho...> - 2009-08-22 00:02:45
|
Hello. I was doing a simple test using a FIFOBuffer. I set the dataLim parameter to the dataLim of a Line2D plot. After adding a value to the FIFO, it raises an exception. It looks like the FIFO is trying to call Bbox.update(), but that method does not exist. Other update_*() methods do. Any ideas? Here's a snippet: import matplotlib.pyplot as plt from matplotlib.mlab import FIFOBuffer as FIFO f = FIFO(100) p = plt.plot([0,1,2],[0,1,2]) f.dataLim = p[0].get_axes().dataLim plt.draw() f.add(3,3) Here's the exception: Traceback (most recent call last): File "C:\fifo.py", line 9, in <module> f.add(3,3) File "C:\Python26\lib\site-packages\matplotlib\mlab.py", line 1103, in add self.dataLim.update(xys, -1) #-1 means use the default ignore setting AttributeError: 'Bbox' object has no attribute 'update' -- View this message in context: http://www.nabble.com/FIFOBuffer-calls-BBox.update%2C-not-a-method-tp25088821p25088821.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michael C. <mc...@ca...> - 2009-08-21 23:54:03
|
Hi all, At the Scipy2009 conference I was recently told I could get better performance from matplotlib through an ssh tunnel by using a different backend. However, I can't find any introductory material on this, just function docs for backend_bases module. What part of the matplotlib call includes backend specification? What backends work well for ssh tunnels? Cheers, Mike |
From: Chloe L. <ch...@na...> - 2009-08-21 18:40:27
|
The sixteen lines of data you sent work in a little histogram- generator for me, ignoring the masking (as a nearly-newbie, I can say that ignoring the stuff I don't yet care about usually works): from matplotlib.mlab import csv2rec, csv import pylab as p import numpy as n names = ('date', 'time', 'program', 'level', 'error_id', 'thread', 'na', 'machine', 'request', 'detail') r = csv2rec("/Users/clew/Documents/pycode/test.csv", names = names) print r.shape print r[3] for name in names: print 'Values of ', name, ':' print r[name] for row in r: if row['thread'] == 537: print row print type(r['thread']) n, bins, patches = p.hist(r['thread']) print n,bins,patches p.savefig('csvhistogram') p.show() Does this work for you? On the whole file? &C On Aug 21, 2009, at 9:27 AM, Phil Robare wrote: > Hi folks, > > I have a (newbie) problem using csv2rec. I am a regular python user > but this is my first time using matplotlib and numpy after being > inspired by attending a talk by Dr. John Hunter. > > I am trying to read a csv file that has >6000 lines that look like > this: > > <code> > 8/17/2009,4:49:52 > PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F: > 20090210::7881558:3893255:311247:166422::,Completed.. > 8/17/2009,4:49:52 > PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F: > 20090210::7881558:3888955:311247:166422::,From > Disk.. > 8/17/2009,4:49:51 PM,CVAgent,Warning,8,556,N/A,THP-PR-APVL,Exception > in CVProcess.GetNewfile: The process cannot access the file because it > is being used by another process.., > 8/17/2009,4:49:51 PM,CVAgent,Information,2,447,N/A,THP-PR-APVL,SDAY -> > R: > 20090210 > :::3893955:311247:166422::20090210:::3893955:388247:166422::50:,. > 8/17/2009,4:29:55 > PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F: > 20090728::7881558:4888461:22088980:964878::,Completed.. > 8/17/2009,4:29:55 > PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F: > 20090728::7881558:4888461:22030980:964878::,From > Disk.. > 8/17/2009,4:29:54 PM,CVAgent,Information,2,3045,N/A,THP-PR-APVL,JJULIO > -> R: > 20090728 > :::4888461:22030980:964878::20090728:::4888461:22030980:964878::50:,. > 8/17/2009,4:24:02 > PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F: > 20090226::7881558:2882501:325032:316888::,Completed.. > 8/17/2009,4:24:02 > PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F: > 20090226::7881558:8822501:325882:318816::,From > Disk.. > 8/17/2009,4:23:56 PM,CVAgent,Information,2,556,N/A,THP-PR-APVL,tdietz > -> R:20090226::::325882:318816::20090226::::325882:318816::50:,. > 8/17/2009,4:21:41 PM,CVAgent,Information,2,3045,N/A,THP-PR-APVL,tdietz > -> R:20090226::::325882:318816::20090226::::325032:318816::50:,. > 8/17/2009,4:19:44 > PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F: > 20090210::7881558:2882613:278887:4020000::,Completed.. > 8/17/2009,4:19:43 > PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F: > 20090210::7881558:2882613:278777:4020000::,From > Disk.. > 8/17/2009,4:19:42 PM,CVAgent,Information,2,793,N/A,THP-PR-APVL,MUTSCH > -> R: > 20090210 > :::2882613:278887:4020000::20090210:::2882613:278887:4020000::50:,. > 8/17/2009,4:11:02 > PM,CVAgent,Information,5,793,N/A,THP-PR-APVL,F: > 20090817::7881558:1776517:1211:58800::,Completed.. > 8/17/2009,4:49:52 > PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F: > 20090210::7881558:3893255:311247:166422::,Completed.. > </code> > > I have given the columns names since there is not a header line: > <code> > In [150]: print names > ('date', 'time', 'program', 'level', 'error_id', 'thread', 'na', > 'machine', 'request', 'detail') > </code> > > and I have provided convert functions to be sure the data is read > correctly: > <code> > In [152]: print converterd > {'thread': <type 'int'>, 'level': <type 'str'>, 'na': <type 'str'>, > 'request': <type 'str'>, 'detail': <type 'str'>, 'machine': <type > 'str'>, 'program': <type 'str'>, 'time': <function str2time at > 0x03795530>, 'date': <function str2date at > 0x037950B0>} > </code> > > (I'm not sure if this is needed. IPython seems to recognize csv2rec > just fine but the sample program does an import like this.) > <code> > In [141]: import matplotlib.mlab as mlab > </code> > > So now I call csv2rec on my file. It takes a second or so to gulp it > all in and then returns without error. > <code> > In [142]: r=mlab.csv2rec(filename,converterd=converterd,names=names) > </code> > > So now I look to see what I have. And it's nothing like I thought it > would be. I expected thousands of records and I have 10. I expected > times and dates, ints and strings. And all I have are masked values. > <code> > In [143]: r > Out[143]: > masked_records( > date : [-- -- -- -- -- -- -- -- -- --] > time : [-- -- -- -- -- -- -- -- -- --] > program : [-- -- -- -- -- -- -- -- -- --] > level : [-- -- -- -- -- -- -- -- -- --] > error_id : [-- -- -- -- -- -- -- -- -- --] > thread : [-- -- -- -- -- -- -- -- -- --] > na : [-- -- -- -- -- -- -- -- -- --] > machine : [-- -- -- -- -- -- -- -- -- --] > request : [-- -- -- -- -- -- -- -- -- --] > detail : [-- -- -- -- -- -- -- -- -- --] > fill_value : ('?', '?', '?', '?', '?', '?', '?', '?', '?', '?') > ) > </code> > > So I look at the mask. I see no clues here. > <code> > In [144]: r.mask > Out[144]: > array([(True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True), > (True, True, True, True, True, True, True, True, True, True)], > dtype=[('date', '|b1'), ('time', '|b1'), ('program', '|b1'), > ('level', '|b1'), ('error_id', '|b1'), ('thread', '|b1'), ('na', > '|b1'), ('machine', '|b1'), > ('request', '|b1'), ('detail', '|b1')]) > </code> > > Well, maybe if I change the mask I can see what is being hidden. > <code> > In [145]: r.mask[0] > Out[145]: (True, True, True, True, True, True, True, True, True, True) > > In [146]: r.mask[0]=(False,)*10 > > In [147]: r > Out[147]: > masked_records( > date : [2009-08-17 -- -- -- -- -- -- -- -- --] > time : [2009-08-17 -- -- -- -- -- -- -- -- --] > program : [2009-08-17 -- -- -- -- -- -- -- -- --] > level : [2009-08-17 -- -- -- -- -- -- -- -- --] > error_id : [2009-08-17 -- -- -- -- -- -- -- -- --] > thread : [2009-08-17 -- -- -- -- -- -- -- -- --] > na : [2009-08-17 -- -- -- -- -- -- -- -- --] > machine : [2009-08-17 -- -- -- -- -- -- -- -- --] > request : [2009-08-17 -- -- -- -- -- -- -- -- --] > detail : [2009-08-17 -- -- -- -- -- -- -- -- --] > fill_value : ('?', '?', '?', '?', '?', '?', '?', '?', '?', '?') > ) > </code> > > So I think I see what is going on. Rather than taking each line of > the input file as a record it is taking each column as a record. > Since I said there are ten values per record it stopped after ten rows > since that is all the columns it had to fill in. > > Now you know my problem. > > How do I get csv2rec to read my file so I can start getting nice > histograms of counts per day? > > A further question is why am I getting masked records at all and how > do I control this? I don't see anything in the numpy or matplotlib > user guides that answer this. I did find a helpful document on the > web (http://www.bom.gov.au/bmrc/climdyn/staff/lih/pubs/docs/masks.pdf) > that explained what masks are > and why and how they can be used. I don't need them and would like to > make sure that nothing is masked. > > Thanks in advance for helping a newbie over the hump. > > Phil Robare > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users Chloe Lewis Graduate student, Amundson Lab Division of Ecosystem Sciences, ESPM University of California, Berkeley 137 Mulford Hall - #3114 Berkeley, CA 94720-3114 ch...@na... |
From: mkoss <Mic...@na...> - 2009-08-21 17:01:16
|
Does anyone know how to do a contour plot of a set of X,Y data where each contour level has the same number of data points inside it? What I want to show is where most of the data is appearing in the x, y position for a scatter plot of ~1,000 points, so you can't just plot all those as points. This is similar to the probability density function for a scatter plot. In concept, you would start at the median of x and median of y and then include points by their distance from the median until you reach the number in each contour and draw a contour around this region. Then you would proceed outward from the contour to find more points. An alternative, but not exactly correct approach I have already done is to bin the data like a 2D histogram and then use the number of occurrences in each bin as the z value for contourf. I see this plot a lot in the scientific literature, so I know it must be possible, but haven't been able to find it on the web for python. Thanks, Mike -- View this message in context: http://www.nabble.com/Contour-of-Number-of-Occurences-in-a-Scatter-Plot-tp25083681p25083681.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: John H. <jd...@gm...> - 2009-08-21 16:38:51
|
On Fri, Aug 21, 2009 at 11:27 AM, Phil Robare<ver...@gm...> wrote: > I have a (newbie) problem using csv2rec. I am a regular python user > but this is my first time using matplotlib and numpy after being > inspired by attending a talk by Dr. John Hunter. > > I am trying to read a csv file that has >6000 lines that look like this: Are you able to post your file somewhere -- publicly if possible (eg attach it to your response) but offlist if it contains info you would not like to disseminate widely? JDH |
From: Phil R. <ver...@gm...> - 2009-08-21 16:27:28
|
Hi folks, I have a (newbie) problem using csv2rec. I am a regular python user but this is my first time using matplotlib and numpy after being inspired by attending a talk by Dr. John Hunter. I am trying to read a csv file that has >6000 lines that look like this: <code> 8/17/2009,4:49:52 PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F:20090210::7881558:3893255:311247:166422::,Completed.. 8/17/2009,4:49:52 PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F:20090210::7881558:3888955:311247:166422::,From Disk.. 8/17/2009,4:49:51 PM,CVAgent,Warning,8,556,N/A,THP-PR-APVL,Exception in CVProcess.GetNewfile: The process cannot access the file because it is being used by another process.., 8/17/2009,4:49:51 PM,CVAgent,Information,2,447,N/A,THP-PR-APVL,SDAY -> R:20090210:::3893955:311247:166422::20090210:::3893955:388247:166422::50:,. 8/17/2009,4:29:55 PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F:20090728::7881558:4888461:22088980:964878::,Completed.. 8/17/2009,4:29:55 PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F:20090728::7881558:4888461:22030980:964878::,From Disk.. 8/17/2009,4:29:54 PM,CVAgent,Information,2,3045,N/A,THP-PR-APVL,JJULIO -> R:20090728:::4888461:22030980:964878::20090728:::4888461:22030980:964878::50:,. 8/17/2009,4:24:02 PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F:20090226::7881558:2882501:325032:316888::,Completed.. 8/17/2009,4:24:02 PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F:20090226::7881558:8822501:325882:318816::,From Disk.. 8/17/2009,4:23:56 PM,CVAgent,Information,2,556,N/A,THP-PR-APVL,tdietz -> R:20090226::::325882:318816::20090226::::325882:318816::50:,. 8/17/2009,4:21:41 PM,CVAgent,Information,2,3045,N/A,THP-PR-APVL,tdietz -> R:20090226::::325882:318816::20090226::::325032:318816::50:,. 8/17/2009,4:19:44 PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F:20090210::7881558:2882613:278887:4020000::,Completed.. 8/17/2009,4:19:43 PM,CVAgent,Information,3,537,N/A,THP-PR-APVL,F:20090210::7881558:2882613:278777:4020000::,From Disk.. 8/17/2009,4:19:42 PM,CVAgent,Information,2,793,N/A,THP-PR-APVL,MUTSCH -> R:20090210:::2882613:278887:4020000::20090210:::2882613:278887:4020000::50:,. 8/17/2009,4:11:02 PM,CVAgent,Information,5,793,N/A,THP-PR-APVL,F:20090817::7881558:1776517:1211:58800::,Completed.. 8/17/2009,4:49:52 PM,CVAgent,Information,5,537,N/A,THP-PR-APVL,F:20090210::7881558:3893255:311247:166422::,Completed.. </code> I have given the columns names since there is not a header line: <code> In [150]: print names ('date', 'time', 'program', 'level', 'error_id', 'thread', 'na', 'machine', 'request', 'detail') </code> and I have provided convert functions to be sure the data is read correctly: <code> In [152]: print converterd {'thread': <type 'int'>, 'level': <type 'str'>, 'na': <type 'str'>, 'request': <type 'str'>, 'detail': <type 'str'>, 'machine': <type 'str'>, 'program': <type 'str'>, 'time': <function str2time at 0x03795530>, 'date': <function str2date at 0x037950B0>} </code> (I'm not sure if this is needed. IPython seems to recognize csv2rec just fine but the sample program does an import like this.) <code> In [141]: import matplotlib.mlab as mlab </code> So now I call csv2rec on my file. It takes a second or so to gulp it all in and then returns without error. <code> In [142]: r=mlab.csv2rec(filename,converterd=converterd,names=names) </code> So now I look to see what I have. And it's nothing like I thought it would be. I expected thousands of records and I have 10. I expected times and dates, ints and strings. And all I have are masked values. <code> In [143]: r Out[143]: masked_records( date : [-- -- -- -- -- -- -- -- -- --] time : [-- -- -- -- -- -- -- -- -- --] program : [-- -- -- -- -- -- -- -- -- --] level : [-- -- -- -- -- -- -- -- -- --] error_id : [-- -- -- -- -- -- -- -- -- --] thread : [-- -- -- -- -- -- -- -- -- --] na : [-- -- -- -- -- -- -- -- -- --] machine : [-- -- -- -- -- -- -- -- -- --] request : [-- -- -- -- -- -- -- -- -- --] detail : [-- -- -- -- -- -- -- -- -- --] fill_value : ('?', '?', '?', '?', '?', '?', '?', '?', '?', '?') ) </code> So I look at the mask. I see no clues here. <code> In [144]: r.mask Out[144]: array([(True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True), (True, True, True, True, True, True, True, True, True, True)], dtype=[('date', '|b1'), ('time', '|b1'), ('program', '|b1'), ('level', '|b1'), ('error_id', '|b1'), ('thread', '|b1'), ('na', '|b1'), ('machine', '|b1'), ('request', '|b1'), ('detail', '|b1')]) </code> Well, maybe if I change the mask I can see what is being hidden. <code> In [145]: r.mask[0] Out[145]: (True, True, True, True, True, True, True, True, True, True) In [146]: r.mask[0]=(False,)*10 In [147]: r Out[147]: masked_records( date : [2009-08-17 -- -- -- -- -- -- -- -- --] time : [2009-08-17 -- -- -- -- -- -- -- -- --] program : [2009-08-17 -- -- -- -- -- -- -- -- --] level : [2009-08-17 -- -- -- -- -- -- -- -- --] error_id : [2009-08-17 -- -- -- -- -- -- -- -- --] thread : [2009-08-17 -- -- -- -- -- -- -- -- --] na : [2009-08-17 -- -- -- -- -- -- -- -- --] machine : [2009-08-17 -- -- -- -- -- -- -- -- --] request : [2009-08-17 -- -- -- -- -- -- -- -- --] detail : [2009-08-17 -- -- -- -- -- -- -- -- --] fill_value : ('?', '?', '?', '?', '?', '?', '?', '?', '?', '?') ) </code> So I think I see what is going on. Rather than taking each line of the input file as a record it is taking each column as a record. Since I said there are ten values per record it stopped after ten rows since that is all the columns it had to fill in. Now you know my problem. How do I get csv2rec to read my file so I can start getting nice histograms of counts per day? A further question is why am I getting masked records at all and how do I control this? I don't see anything in the numpy or matplotlib user guides that answer this. I did find a helpful document on the web (http://www.bom.gov.au/bmrc/climdyn/staff/lih/pubs/docs/masks.pdf) that explained what masks are and why and how they can be used. I don't need them and would like to make sure that nothing is masked. Thanks in advance for helping a newbie over the hump. Phil Robare |