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
(12) |
2
(13) |
3
(14) |
4
(9) |
5
(9) |
6
(22) |
7
(17) |
8
(16) |
9
(19) |
10
(17) |
11
(6) |
12
|
13
(20) |
14
(21) |
15
(20) |
16
(10) |
17
(14) |
18
(3) |
19
(3) |
20
(12) |
21
(22) |
22
(26) |
23
(31) |
24
(26) |
25
(9) |
26
(4) |
27
(33) |
28
(15) |
29
(37) |
30
(26) |
|
|
From: VC <va...@gm...> - 2009-04-01 23:44:23
|
Hi all, I am experiencing the following difficulty: My program basically loops and wants to redraw a plot (using imshow() ) every 5 seconds or so. So it looks something like: ion() while 1: do redraw business.. time.sleep(5) The redrawing shows up fine, the only problem is that during the 5 seconds of sleep, I cannot really move the figure window or really do anything with it. I am using MPL on windows with the 'Qt4Agg' backed, and running this code from ipython (on the command line). I don't quite understand the threading model of the GUI kit, vs. the main thread, so could someone enlighten me how it works roughly, and what I need to do in a multi-threaded application in order to update a figure periodically, and be able to move it around, and do things with its figure window. Thanks in advance for any responses. |
From: VGC123 <va...@gm...> - 2009-04-01 23:40:50
|
Hi all, I am experiencing the following difficulty: My program basically loops and wants to redraw a plot (using imshow() ) every 5 seconds or so. So it looks something like: ion() while 1: do redraw business.. time.sleep(5) The redrawing shows up fine, the only problem is that during the 5 seconds of sleep, I cannot really move the figure window or really do anything with it. I am using MPL on windows with the 'Qt4Agg' backed, and running this code from ipython (on the command line). I don't quite understand the threading model of the GUI kit, vs. the main thread, so could someone enlighten me how it works roughly, and what I need to do in a multi-threaded application in order to update a figure periodically, and be able to move it around, and do things with its figure window. Thanks in advance for any responses. -- View this message in context: http://www.nabble.com/Being-able-to-move-figure-around-during-time.sleep%28%29-tp22835008p22835008.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Eric F. <ef...@ha...> - 2009-04-01 21:53:08
|
Michael Hearne wrote: > Is it possible to use multiple conditionals with the pylab.find() function? > > For example, in Matlab, I can do the following: > > x = rand(1,10); > i = find(x > 0.5 & x < 0.9); %returns the indices between 0.5 and 0.9 > > In Python: (ipython -pylab) > x = rand(1,10) > > None of the following approaches work: > #i = find(x > 0.5 and x < 0.9) > #i = find(x > 0.5 && x < 0.9) > #i = find(x > 0.5 & x < 0.9) > > I'm pretty certain there is some other way to do this using a numpy > method, and if that's all there is, then I will happily use it. > > However, if the goal of the pylab module is to achieve (some level of) > compatibility with Matlab, then may I suggest this sort of functionality > be added to the pylab.find() function? This is a fundamental python/numpy problem. The workaround is x = rand(10) i = find((x > 0.5) & (x < 0.9)) Note the explicit parentheses to make the conditionals evaluated before the bitwise and. The real problem is that we are stuck using bitwise and as a surrogate for logical and. This problem is not going away any time soon, although proposed solutions have been discussed. Also note that in numpy we are using a 1-D array. If you really want the 2-D array, then you will have to index it as x[:,i]. Longer term, the recommendation is that you move away from trying to write matlab code using pylab, and instead use numpy idioms directly. import numpy as np x = np.random.rand(10) y = x[(x > 0.5) & (x < 0.9)] or if you really want the indices: i = np.nonzero((x > 0.5) & (x < 0.9))[0] Eric > > Thanks, > > Mike > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Jeff W. <js...@fa...> - 2009-04-01 21:50:45
|
Michael Hearne wrote: > Is it possible to use multiple conditionals with the pylab.find() function? > > For example, in Matlab, I can do the following: > > x = rand(1,10); > i = find(x > 0.5 & x < 0.9); %returns the indices between 0.5 and 0.9 > > In Python: (ipython -pylab) > x = rand(1,10) > > None of the following approaches work: > #i = find(x > 0.5 and x < 0.9) > #i = find(x > 0.5 && x < 0.9) > #i = find(x > 0.5 & x < 0.9) > > I'm pretty certain there is some other way to do this using a numpy > method, and if that's all there is, then I will happily use it. > > However, if the goal of the pylab module is to achieve (some level of) > compatibility with Matlab, then may I suggest this sort of functionality > be added to the pylab.find() function? > > Thanks, > > Mike > Mike: Use numpy.logical_and/numpy.logical_or for elementwise logical operations. In your case, find(logical_and(x>0.5,x<0.9)) works, as does using parantheses find((x > 0.5) & (x < 0.9)) -Jeff |
From: Michael H. <mh...@us...> - 2009-04-01 21:29:38
|
Is it possible to use multiple conditionals with the pylab.find() function? For example, in Matlab, I can do the following: x = rand(1,10); i = find(x > 0.5 & x < 0.9); %returns the indices between 0.5 and 0.9 In Python: (ipython -pylab) x = rand(1,10) None of the following approaches work: #i = find(x > 0.5 and x < 0.9) #i = find(x > 0.5 && x < 0.9) #i = find(x > 0.5 & x < 0.9) I'm pretty certain there is some other way to do this using a numpy method, and if that's all there is, then I will happily use it. However, if the goal of the pylab module is to achieve (some level of) compatibility with Matlab, then may I suggest this sort of functionality be added to the pylab.find() function? Thanks, Mike |
From: Cohen-Tanugi J. <co...@lp...> - 2009-04-01 21:06:04
|
I tried to look at the code (axes.py I presume) in order to attempt a patch, but it defeated me, I do not have the instructions to navigate through this code :) Where is the actual transform of the error bars occurring? thanks, Johann Michael Droettboom wrote: > I have to say I don't really have a lot of experience with error bars > on log plots -- but the root cause here is that the lower bound of the > error bar goes negative, and as we all know, the log of a negative > number is undefined. If you can suggest where the lower bound should > be drawn or provide third-party examples, I'm happy to look into this > further and resolve this "surprise". > > Mike > > Cohen-Tanugi Johann wrote: >> yes exactly.... >> I should have provided a test case, thanks for following up! >> Johann >> >> Matthias Michler wrote: >> >>> Hello Johann, >>> >>> is the problem you are reporting the one I observe in the attached >>> picture? Namely some vertical and horizontal lines are missing when >>> using yscale="log". More precisely everything below y=1 seems to be >>> missing. >>> >>> The picture was generated with the code below and >>> matplotlib.__version__ = '0.98.6svn' >>> matplotlib.__revision__ = '$Revision: 6887 $' >>> >>> best regards Matthias >>> >>> ############################### >>> import numpy as np >>> import matplotlib.pyplot as plt >>> >>> plt.subplot(111, xscale="log", yscale="log") >>> x = 10.0**np.linspace(0.0, 2.0, 20) >>> y = x**2.0 >>> plt.errorbar(x, y, xerr=0.1*x, yerr=5.0+0.75*y) >>> plt.show() >>> ################################ >>> On Friday 27 March 2009 16:12:12 Cohen-Tanugi Johann wrote: >>> >>>> Hello, what is the best way to get log log plots with error bars? I >>>> tried putting log10() everywhere but as I was afraid results look >>>> ugly.... >>>> thanks, >>>> johann >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
From: John H. <jd...@gm...> - 2009-04-01 20:18:06
|
On Wed, Apr 1, 2009 at 2:50 PM, empty83 <mat...@gm...> wrote: > > I understand why things were not behaving as I expected and I don't really > have any good ideas on how to make a legend from a RegularPolyCollection in > general. > > However, I do not grok why fill_between returns a RegularPolyCollection > rather than a Polygon (like fill does). Does fill_between(x,y0,y1) differ > substantially from fill(x+x[::-1], y0+y1[::-1])? To me this seems like the > most intuitive behavior. Because fill_between handles masks, it uses a collection (a PolyCollection, not a RegularPolyCollection) rather than a simple Polygon. For example, see the use of the "where" argument in the second plot at http://matplotlib.sourceforge.net/examples/pylab_examples/fill_between.html The simplest way to handle this for the legend is probably to create a proxy Rectangle with the same properties as the first element in the poly collection. Since it is not designed to support multiple properties for the different fill regions, we might be able to improve this from a design and performance perspective by using a complex Path instead of a PolyCollection. In the interim, you can always manually create a legend using a proxy Rectangle passed in as a handle to the legend, though admittedly this is much more cumbersome. JDH |
From: empty83 <mat...@gm...> - 2009-04-01 19:50:31
|
I understand why things were not behaving as I expected and I don't really have any good ideas on how to make a legend from a RegularPolyCollection in general. However, I do not grok why fill_between returns a RegularPolyCollection rather than a Polygon (like fill does). Does fill_between(x,y0,y1) differ substantially from fill(x+x[::-1], y0+y1[::-1])? To me this seems like the most intuitive behavior. -matt Jae-Joon Lee wrote: > > The matplotlib legend does not currently support fill_between. As a > matter of fact, fill_between command creates RegularPolyCollection > artist, and the mpl legend does not know how to handle this kind of > artist at this time. And I personally do not have good idea how to > draw a handle for this (a simple rectangle box like the handles for > the Patch?). Any suggestion is welcomed. > -- View this message in context: http://www.nabble.com/legends-with-fill_between-tp22816609p22834285.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Jae-Joon L. <lee...@gm...> - 2009-04-01 17:54:50
|
This thread might be helpful. http://thread.gmane.org/gmane.comp.python.matplotlib.general/16373 Take a look at the above thread and see if it fits your need. However, it became tricky if your axes adjust its position (e.g., aspect=1) during the drawing time. The example below will be helpful in those case (you need recent version of matplotlib for this, see if your axes has "set_axes_locator" method), but this requires some knowledge on how mpl works. import matplotlib.transforms class InsetPosition(object): def __init__(self, parent, lbwh): self.parent = parent self.lbwh = lbwh # position of the inset axes in the normalized coordinate of the parent axes def __call__(self, ax, renderer): bbox_parent = self.parent.get_position(original=False) trans = matplotlib.transforms.BboxTransformTo(bbox_parent) bbox_inset = matplotlib.transforms.Bbox.from_bounds(*self.lbwh) bb = matplotlib.transforms.TransformedBbox(bbox_inset, trans) return bb ax = gca() ax.set_aspect(1.) axins = axes([0, 0, 1, 1]) ip = InsetPosition(ax, [0.5, 0.1, 0.4, 0.2]) axins.set_axes_locator(ip) IHTH, -JJ On Wed, Apr 1, 2009 at 8:22 AM, oyarsa the old <oya...@gm...> wrote: > Hello, > > I am new to matplotlib and pylab. > I have an image plotted with imshow/contour, or even just a coordinate > system plotted with axis. > > I need to plot smaller contours/images on them at selected pixels. The only > way I can figure how to do that is using axes. However, axes is defined on > normalised coordinates which cover the entire window, whereas the axis of > the main figure is drawn within it, with some margin. > > My problem is how to get the correct coordinates for plotting each of the > smaller figures ? The easiest way to do so would be to get the normalised > coordinates of the rectangle which is drawn by axis. Is there a way to get > that? > > Thanks > Mohan. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Jae-Joon L. <lee...@gm...> - 2009-04-01 17:02:34
|
The matplotlib legend does not currently support fill_between. As a matter of fact, fill_between command creates RegularPolyCollection artist, and the mpl legend does not know how to handle this kind of artist at this time. And I personally do not have good idea how to draw a handle for this (a simple rectangle box like the handles for the Patch?). Any suggestion is welcomed. Meanwhile, you may draw an artist out of your axes area and use this for the legend entry. For example, for simple a rectangle handle, from pylab import fill_between, legend, show a = [0,1,2,4,5] b = [1,1,1,1,1] c = [0,1,2,4,5] fb = fill_between(a,b,c,label='hi') from matplotlib.patches import Rectangle r = Rectangle((0, 0), 1, 1) # creates rectangle patch for legend use. legend([r], ["hi"]) show() -JJ On Tue, Mar 31, 2009 at 7:06 PM, empty83 <mat...@gm...> wrote: > > i can't make a legend for a fill_between and don't understand what i'm doing > wrong. the following code seems like the most obvious way to make a legend > for a fill_between, but does do what i expect. the code plots, but > complains that "No labeled objects found." any help would be much > appreciated. > > from pylab import fill_between, legend, show > a = [0,1,2,4,5] > b = [1,1,1,1,1] > c = [0,1,2,4,5] > fill_between(a,b,c,label='hi') > legend() > show() > -- > View this message in context: http://www.nabble.com/legends-with-fill_between-tp22816609p22816609.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: oyarsa t. o. <oya...@gm...> - 2009-04-01 13:11:34
|
Hello, I am new to matplotlib and pylab. I have an image plotted with imshow/contour, or even just a coordinate system plotted with axis. I need to plot smaller contours/images on them at selected pixels. The only way I can figure how to do that is using axes. However, axes is defined on normalised coordinates which cover the entire window, whereas the axis of the main figure is drawn within it, with some margin. My problem is how to get the correct coordinates for plotting each of the smaller figures ? The easiest way to do so would be to get the normalised coordinates of the rectangle which is drawn by axis. Is there a way to get that? Thanks Mohan. |
From: Lorenzo I. <lor...@gm...> - 2009-04-01 10:50:43
|
Dear All, I am having a hard time with something which must be fairly doable: I would like to plot a simple scalar function on a circular domain. Consider for instance a trivial modification of one of the online examples: Code 1 #!/usr/bin/env python """ See pcolor_demo2 for a much faster way of generating pcolor plots """ from __future__ import division from pylab import * def func3(x,y): return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) def func4(x,y): theta=arcsin(y) return cos(theta) # make these smaller to increase the resolution dx, dy = 0.05, 0.05 x = arange(-1.0, 1.0, dx) y = arange(-1.0, 1.0, dy) X,Y = meshgrid(x, y) Z = func4(X, Y) print "Z is, ", Z ax = subplot(111) im = imshow(Z, cmap=cm.jet) #im.set_interpolation('nearest') #im.set_interpolation('bicubic') im.set_interpolation('bilinear') #ax.set_image_extent(-3, 3, -3, 3) show() Now, I would like to plot exactly the same function but on a circular domain (circle of radius 1 centered at (0,0)). What is the easiest way of doing that? Some time ago I came across a similar problem (again, plotting a scalar on a circular domain) and I came up with this code (thanks to the help I got from the list) Code 2 #! /usr/bin/env python from scipy import * import pylab import numpy nt=20 nr=20 r=linspace(0.,10.,nr) theta=linspace(0.,2.*pi,nt) #print "theta is ", theta sin_t=sin(theta) cos_t=cos(theta) rsin_t=r[newaxis,:]*sin_t[:,newaxis] rcos_t=r[newaxis,:]*cos_t[:,newaxis] rsin_t=ravel(rsin_t) rcos_t=ravel(rcos_t) rsin_t.shape=(nt,nr) rcos_t.shape=(nt,nr) vel_section=numpy.random.normal(0.,5.,(nr*nt)) vel_section=reshape(vel_section,(nt,nr)) print 'OK up to here' #pylab.colorbar() #pylab.clf() pylab.figure() X = rsin_t.transpose() Y = rcos_t.transpose() Z = vel_section.transpose() velmin = vel_section.min() velmax = vel_section.max() print velmin, velmax levels = arange(velmin, velmax+0.01, 0.1) pylab.contourf(X, Y, Z, levels, cmap=pylab.cm.jet) pylab.colorbar() pylab.show() pylab.savefig("velocity_on_section_DNS") #pylab.hold(False) but I have been unable to modify it according to my present needs. I am not really finding my way through the documentation/examples for some details (for instance, I am not sure about how to include a discrete colorbar ranging from 0 to 1 in steps of 0.1 in code 1), but at the moment this is secondary probably. Any suggestion is welcome. Many thanks Lorenzo -- Life is what happens to you while you're busy making other plans. |