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: P.R. <rom...@ho...> - 2009-08-14 04:10:53
|
Hi, I'd like to generate a colormap index based on an array of levels & using an existing colormap (Spectral). However, Id like the cmap index to start at the 0.3 value of the Spectral scale (orange/yellow area) instead of starting at the '0' scale value (red area), and then continue until the 0.8 value area (green)...in essence, Id like to do a 'slice' of a given colormap, using BoundaryNorm or some other function, and using my levels array in order to break up the colormap. What would be the best way to get this done? Can it be easily done using existing functions, or would I need to create my own colormap? Please help, Thanks, P.Romero |
|
From: P.R. <rom...@ho...> - 2009-08-14 02:37:07
|
Nevermind, I found the answer; quiver also accepts the cmap & norm args... Sorry for the double post as well...email/outlook issues... Thanks, P.Romero -----Original Message----- From: P.R. [mailto:rom...@ho...] Sent: 2009-08-13 9:17 PM To: mat...@li... Subject: [Matplotlib-users] controlling quiver colors with C arg Question: If I have an array C with values for the arrow vectors' magnitudes, how can I control the magnitude levels & colors that are assigned to the quiver arrows? I successfully managed to plot multi-colored arrows using the 'C' arg, but I'd also like to control the levels & colors, and also plot a colorbar for the arrow magnitude values. Is this possible? Please help, Thanks, P.Romero ---------------------------------------------------------------------------- -- 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: <rom...@gm...> - 2009-08-14 02:23:02
|
Question: If I have an array C with values for the arrow vectors' magnitudes, how can I control the magnitude levels & colors that are assigned to the quiver arrows? I successfully managed to plot multi-colored arrows using the 'C' arg, but I'd also like to control the levels & colors, and also plot a colorbar for the arrow magnitude values. Is this possible? Please help, Thanks, P.Romero |
|
From: P.R. <rom...@ho...> - 2009-08-14 02:17:07
|
Question: If I have an array C with values for the arrow vectors' magnitudes, how can I control the magnitude levels & colors that are assigned to the quiver arrows? I successfully managed to plot multi-colored arrows using the 'C' arg, but I'd also like to control the levels & colors, and also plot a colorbar for the arrow magnitude values. Is this possible? Please help, Thanks, P.Romero |
|
From: Eric F. <ef...@ha...> - 2009-08-14 02:05:21
|
G Jones wrote:
> Hello,
> Executing the following commands from ipython --pylab produces the error
> below:
>
> ax = subplot(111)
> ax.pcolorfast(randn(100,100))
> ax.set_xlim(2000,2001)
> draw()
>
> I ran into the error in a more complicated script, but this seems to be
> a simple example to reproduce it.
> I notice if I instead use:
> ax.set_xlim(400,500)
> draw()
> I get the expected behavior, so it seems to be a combination of the
> width being smaller than the extent, and the drawing area being off screen.
Thank you. The error is actually coming from the image code, which
pcolorfast is using in this case, and it can be reproduced with imshow.
It is now fixed in the maintenance branch, and the fix will be
propagated to the trunk shortly.
Eric
>
> My matplot lib info is
>
> In [19]: matplotlib.get_backend()
> Out[19]: 'Qt4Agg'
>
> In [20]: matplotlib.__version__
> Out[20]: '1.0.svn'
>
> This version was built from SVN just a couple of days ago.
>
> Error traceback:
>
>
> ---------------------------------------------------------------------------
> ZeroDivisionError Traceback (most recent call last)
>
> /home/obs/workspace/backend/<ipython console> in <module>()
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/pyplot.pyc in draw()
> 350 def draw():
> 351 'redraw the current figure'
> --> 352 get_current_fig_manager().canvas.draw()
> 353
> 354 def savefig(*args, **kwargs):
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/backends/backend_qt4agg.pyc
> in draw(self)
> 128 if DEBUG: print "FigureCanvasQtAgg.draw", self
> 129 self.replot = True
> --> 130 FigureCanvasAgg.draw(self)
> 131 self.update()
> 132
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/backends/backend_agg.pyc
> in draw(self)
> 313
> 314 self.renderer = self.get_renderer()
> --> 315 self.figure.draw(self.renderer)
> 316
> 317 def get_renderer(self):
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/artist.pyc in
> draw_wrapper(artist, renderer, *kl)
> 44 def draw_wrapper(artist, renderer, *kl):
> 45 before(artist, renderer)
> ---> 46 draw(artist, renderer, *kl)
> 47 after(artist, renderer)
> 48
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/figure.pyc in
> draw(self, renderer)
> 773
> 774 # render the axes
>
> --> 775 for a in self.axes: a.draw(renderer)
> 776
> 777 # render the figure text
>
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/artist.pyc in
> draw_wrapper(artist, renderer, *kl)
> 44 def draw_wrapper(artist, renderer, *kl):
> 45 before(artist, renderer)
> ---> 46 draw(artist, renderer, *kl)
> 47 after(artist, renderer)
> 48
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/axes.pyc in draw(self,
> renderer, inframe)
> 1685 if len(self.images)<=1 or
> renderer.option_image_nocomposite():
> 1686 for im in self.images:
> -> 1687 im.draw(renderer)
> 1688 else:
> 1689 # make a composite image blending alpha
>
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/artist.pyc in
> draw_wrapper(artist, renderer, *kl)
> 44 def draw_wrapper(artist, renderer, *kl):
> 45 before(artist, renderer)
> ---> 46 draw(artist, renderer, *kl)
> 47 after(artist, renderer)
> 48
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/image.pyc in
> draw(self, renderer, *args, **kwargs)
> 134 self.axes.get_yscale() != 'linear'):
> 135 warnings.warn("Images are not supported on
> non-linear axes.")
> --> 136 im = self.make_image(renderer.get_image_magnification())
> 137 im._url = self.get_url()
> 138 l, b, widthDisplay, heightDisplay = self.axes.bbox.bounds
>
> /usr/local/lib/python2.6/dist-packages/matplotlib/image.pyc in
> make_image(self, magnification)
> 424
> 425 # resize viewport to display
>
> --> 426 rx = widthDisplay / numcols
> 427 ry = heightDisplay / numrows
> 428 im.apply_scaling(rx*sx, ry*sy)
>
> ZeroDivisionError: float division
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 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: Andrew K. <ndr...@gm...> - 2009-08-14 00:53:40
|
I am currently using the annotate() method for my data points and I was curious if there is a way to center a line of text relative to a line of text below it. I am currently using two annotate() function calls in a row (I need the text to be different colors) but I need the first one to act as a title for the second (i.e. so I want it centered relative to the one below.) I have tried to use the length of the second bit of text to center but I just cannot seem to do it. The code looks sort of like this: import matplotlib.pyplot as plt ....... annotateTitle='Title' annotateText='Blah, Blah, Blah' plt.annotate(annotateTitle, xy=(1,1), xytext=(20,50), xycoords='data', textcoords='offset points') plt.annotate(annotateText, xy=(1,1), xytext=(20,20), xycoords='data', textcoords='offset points', size='small', color='black') Any ideas? -Andy |
|
From: G J. <gle...@gm...> - 2009-08-13 23:44:41
|
Hello,
Executing the following commands from ipython --pylab produces the error
below:
ax = subplot(111)
ax.pcolorfast(randn(100,100))
ax.set_xlim(2000,2001)
draw()
I ran into the error in a more complicated script, but this seems to be a
simple example to reproduce it.
I notice if I instead use:
ax.set_xlim(400,500)
draw()
I get the expected behavior, so it seems to be a combination of the width
being smaller than the extent, and the drawing area being off screen.
My matplot lib info is
In [19]: matplotlib.get_backend()
Out[19]: 'Qt4Agg'
In [20]: matplotlib.__version__
Out[20]: '1.0.svn'
This version was built from SVN just a couple of days ago.
Error traceback:
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
/home/obs/workspace/backend/<ipython console> in <module>()
/usr/local/lib/python2.6/dist-packages/matplotlib/pyplot.pyc in draw()
350 def draw():
351 'redraw the current figure'
--> 352 get_current_fig_manager().canvas.draw()
353
354 def savefig(*args, **kwargs):
/usr/local/lib/python2.6/dist-packages/matplotlib/backends/backend_qt4agg.pyc
in draw(self)
128 if DEBUG: print "FigureCanvasQtAgg.draw", self
129 self.replot = True
--> 130 FigureCanvasAgg.draw(self)
131 self.update()
132
/usr/local/lib/python2.6/dist-packages/matplotlib/backends/backend_agg.pyc
in draw(self)
313
314 self.renderer = self.get_renderer()
--> 315 self.figure.draw(self.renderer)
316
317 def get_renderer(self):
/usr/local/lib/python2.6/dist-packages/matplotlib/artist.pyc in
draw_wrapper(artist, renderer, *kl)
44 def draw_wrapper(artist, renderer, *kl):
45 before(artist, renderer)
---> 46 draw(artist, renderer, *kl)
47 after(artist, renderer)
48
/usr/local/lib/python2.6/dist-packages/matplotlib/figure.pyc in draw(self,
renderer)
773
774 # render the axes
--> 775 for a in self.axes: a.draw(renderer)
776
777 # render the figure text
/usr/local/lib/python2.6/dist-packages/matplotlib/artist.pyc in
draw_wrapper(artist, renderer, *kl)
44 def draw_wrapper(artist, renderer, *kl):
45 before(artist, renderer)
---> 46 draw(artist, renderer, *kl)
47 after(artist, renderer)
48
/usr/local/lib/python2.6/dist-packages/matplotlib/axes.pyc in draw(self,
renderer, inframe)
1685 if len(self.images)<=1 or
renderer.option_image_nocomposite():
1686 for im in self.images:
-> 1687 im.draw(renderer)
1688 else:
1689 # make a composite image blending alpha
/usr/local/lib/python2.6/dist-packages/matplotlib/artist.pyc in
draw_wrapper(artist, renderer, *kl)
44 def draw_wrapper(artist, renderer, *kl):
45 before(artist, renderer)
---> 46 draw(artist, renderer, *kl)
47 after(artist, renderer)
48
/usr/local/lib/python2.6/dist-packages/matplotlib/image.pyc in draw(self,
renderer, *args, **kwargs)
134 self.axes.get_yscale() != 'linear'):
135 warnings.warn("Images are not supported on non-linear
axes.")
--> 136 im = self.make_image(renderer.get_image_magnification())
137 im._url = self.get_url()
138 l, b, widthDisplay, heightDisplay = self.axes.bbox.bounds
/usr/local/lib/python2.6/dist-packages/matplotlib/image.pyc in
make_image(self, magnification)
424
425 # resize viewport to display
--> 426 rx = widthDisplay / numcols
427 ry = heightDisplay / numrows
428 im.apply_scaling(rx*sx, ry*sy)
ZeroDivisionError: float division
|
|
From: Fernando P. <fpe...@gm...> - 2009-08-13 23:00:52
|
Hi folks, David Warde-Farley kindly set up a page to coordinate BoF attendance at the conference, in case anyone on this list is interested. Details below. Cheers, f ---------- Forwarded message ---------- From: David Warde-Farley <dw...@cs...> Date: Thu, Aug 13, 2009 at 2:20 PM Subject: [IPython-user] SciPy2009 BoF Wiki Page To: SciPy Users List <sci...@sc...>, Discussion of Numerical Python <num...@sc...>, ipy...@sc... I needed a short break from some heavy writing, so on Fernando's suggestion I took to the task of aggregating together mailing list traffic about the BoFs next week. So far, 4 have been proposed, and I've written down under "attendees" the names of anyone who has expressed interest (except in Perry's case, where I've only heard it via proxy). The page is at http://scipy.org/SciPy2009/BoF I've created sections below that are hyperlink targets for the topic of the session, if someone more knowledgeable of that domain can fill in those sections, please do. Edit away, and see you next week! (And if someone can forward this to the Matplotlib list, I'm not currently subscribed) David _______________________________________________ IPython-user mailing list IPy...@sc... http://mail.scipy.org/mailman/listinfo/ipython-user |
|
From: Eric A. <Ay...@ma...> - 2009-08-13 18:19:21
|
Hello, I've been using Gnuplot for years, but am quite impressed with what I see in matplotlib and am in the process of learning enough to switch. One item that I haven't been able to figure out yet is how to plot on an "open box". For example, in Gnuplot I would give the commands set xtics nomirror set ytics nomirror set border 3 and I would get a plot that only had left and bottom axes instead of a complete box. How do I get this "open box" plot with matplotlib? Thanks in advance, -ea -- --- ----- ------- ----------- ------------- Dr. Eric Ayars Associate Professor of Physics California State University, Chico ay...@ma... |
|
From: Erik S. <oth...@gm...> - 2009-08-13 17:52:23
|
Good day,
I've hit an issue that may be a bug. In a previous version of
matplotlib (.98.x) I had a picker set for lines plotted on two axes.
This was working until I upgraded to version 0.99.0. Now the first
axes's pick events never seem to fire even though they respond true if
queried with pickable(). The second axes's pick events still fire.
Using the example below, clicking on the left y's line will never
print anything, but the sin from the right will if clicked on.
OS: Windows XP Pro
Python: 2.6
matplotlib version: 0.99.0 -- installed using the python2.6 windows
exe obtained from sourceforge
Code to reproduce:
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax1 = fig.add_subplot(111)
t = np.arange(0.01, 10.0, 0.01)
s1 = np.exp(t)
ax1.plot(t, s1, 'b-', picker = 4.0)
ax1.set_xlabel('time (s)')
# Make the y-axis label and tick labels match the line color.
ax1.set_ylabel('exp', color='b')
for tl in ax1.get_yticklabels():
tl.set_color('b')
ax2 = ax1.twinx()
s2 = np.sin(2*np.pi*t)
ax2.plot(t, s2, 'r.', picker = 4.0)
ax2.set_ylabel('sin', color='r')
for tl in ax2.get_yticklabels():
tl.set_color('r')
def onpick(event):
thisline = event.artist
xdata = thisline.get_xdata()
ydata = thisline.get_ydata()
ind = event.ind
print 'onpick points:', zip(xdata[ind], ydata[ind])
fig.canvas.mpl_connect('pick_event', onpick)
plt.show()
Thanks for a wonderful plotting package!
|
|
From: William M. <wil...@en...> - 2009-08-13 17:37:31
|
When will a version of Matplotlib be available that¹s compatible with Python 2.6? Thanks! Buff Miner -- Enig Associates, Inc. Suite 500, Bethesda Crescent Bldg. 4600 East West Hwy Bethesda, Maryland 20814 Tel:(301)680-8600 Fax:(301)680-8100 This message is intended only for the use of the intended recipient(s), and it may be privileged and confidential. If you are not the intended recipient, you are hereby notified that any review, retransmission, conversion to hard copy, copying, circulation or other use of this message is strictly prohibited and may be illegal. If you are not the intended recipient, please notify the sender immediately by return e-mail, and delete this message from your system. Thank you. |
|
From: P.R. <rom...@ho...> - 2009-08-13 16:02:15
|
Jeff, The docstring is clear. My question was on how to actually create the lats&lons arrays (sorry, Im not a very strong python programmer). Could you please recommend a method for dividing a lat/lon array in half? Again, I apologize for asking such a basic question... Thanks, P.R. -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: 2009-08-13 10:56 AM To: P.R. Cc: mat...@li... Subject: Re: [Matplotlib-users] contourf interpolation/smoothness P.R. wrote: > Jeff, > One more question: > Given two arbitrary X&Y arrays, what's the easiest/fastest way to convert to > a finer array ? > (for example, convert a 0.5 degree 'X' or 'Y' array to a 0.25 array over the > same bounds as the original array) > > - I need a method that can handle arbitrary grid sizes & resolutions, so I > can't just hard-code the X&Y sizes for the finer grid. > > Any ideas? > > Thanks, > P.Romero > P.R. The interp function can do that easily, you just create an array of lats and lons defining the output grid by dividing the input grid size by 2. Is there something in the docstring that is not clear? -Jeff > -----Original Message----- > From: Jeff Whitaker [mailto:js...@fa...] > Sent: 2009-08-13 7:15 AM > To: Eric Firing > Cc: P.R.; mat...@li... > Subject: Re: [Matplotlib-users] contourf interpolation/smoothness > > Eric Firing wrote: > >> P.R. wrote: >> >> >>> This has probably been asked before, so I apologize... >>> >>> Is it possible to improve the smoothness/interpolation used in contourf? >>> I know that the interpolation can be set for imshow(pcolor?), but I >>> > couldn't > >>> see how to set it for contourf. >>> >>> Right now, contourf is producing some relatively jagged output for my >>> dataset, and I'd like to try to smoothen it out, without resorting to >>> > using > >>> pcolor/imshow... >>> >>> >> There are two approaches: >> >> 1) manipulate the contours (the patch boundaries) >> 2) smooth and interpolate the data to a finer grid before contouring. >> >> There are many problems with the first approach, and we have never tried >> to implement it. >> >> That leaves the second method, which is really not a plotting task but a >> data processing task. You might want to see if there is a suitable tool >> in scipy. >> >> Eric >> >> >> >> > Pablo: You could use the interp function in Basemap to bilinearly > interpolate to a finer grid. > > http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html#mpl_ > toolkits.basemap.interp > > -Jeff > > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Jeff W. <js...@fa...> - 2009-08-13 15:56:15
|
P.R. wrote: > Jeff, > One more question: > Given two arbitrary X&Y arrays, what's the easiest/fastest way to convert to > a finer array ? > (for example, convert a 0.5 degree 'X' or 'Y' array to a 0.25 array over the > same bounds as the original array) > > - I need a method that can handle arbitrary grid sizes & resolutions, so I > can't just hard-code the X&Y sizes for the finer grid. > > Any ideas? > > Thanks, > P.Romero > P.R. The interp function can do that easily, you just create an array of lats and lons defining the output grid by dividing the input grid size by 2. Is there something in the docstring that is not clear? -Jeff > -----Original Message----- > From: Jeff Whitaker [mailto:js...@fa...] > Sent: 2009-08-13 7:15 AM > To: Eric Firing > Cc: P.R.; mat...@li... > Subject: Re: [Matplotlib-users] contourf interpolation/smoothness > > Eric Firing wrote: > >> P.R. wrote: >> >> >>> This has probably been asked before, so I apologize... >>> >>> Is it possible to improve the smoothness/interpolation used in contourf? >>> I know that the interpolation can be set for imshow(pcolor?), but I >>> > couldn't > >>> see how to set it for contourf. >>> >>> Right now, contourf is producing some relatively jagged output for my >>> dataset, and I'd like to try to smoothen it out, without resorting to >>> > using > >>> pcolor/imshow... >>> >>> >> There are two approaches: >> >> 1) manipulate the contours (the patch boundaries) >> 2) smooth and interpolate the data to a finer grid before contouring. >> >> There are many problems with the first approach, and we have never tried >> to implement it. >> >> That leaves the second method, which is really not a plotting task but a >> data processing task. You might want to see if there is a suitable tool >> in scipy. >> >> Eric >> >> >> >> > Pablo: You could use the interp function in Basemap to bilinearly > interpolate to a finer grid. > > http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html#mpl_ > toolkits.basemap.interp > > -Jeff > > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: P.R. <rom...@ho...> - 2009-08-13 15:38:30
|
Jeff, One more question: Given two arbitrary X&Y arrays, what's the easiest/fastest way to convert to a finer array ? (for example, convert a 0.5 degree 'X' or 'Y' array to a 0.25 array over the same bounds as the original array) - I need a method that can handle arbitrary grid sizes & resolutions, so I can't just hard-code the X&Y sizes for the finer grid. Any ideas? Thanks, P.Romero -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: 2009-08-13 7:15 AM To: Eric Firing Cc: P.R.; mat...@li... Subject: Re: [Matplotlib-users] contourf interpolation/smoothness Eric Firing wrote: > P.R. wrote: > >> This has probably been asked before, so I apologize... >> >> Is it possible to improve the smoothness/interpolation used in contourf? >> I know that the interpolation can be set for imshow(pcolor?), but I couldn't >> see how to set it for contourf. >> >> Right now, contourf is producing some relatively jagged output for my >> dataset, and I'd like to try to smoothen it out, without resorting to using >> pcolor/imshow... >> > > There are two approaches: > > 1) manipulate the contours (the patch boundaries) > 2) smooth and interpolate the data to a finer grid before contouring. > > There are many problems with the first approach, and we have never tried > to implement it. > > That leaves the second method, which is really not a plotting task but a > data processing task. You might want to see if there is a suitable tool > in scipy. > > Eric > > > Pablo: You could use the interp function in Basemap to bilinearly interpolate to a finer grid. http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html#mpl_ toolkits.basemap.interp -Jeff |
|
From: P.R. <rom...@ho...> - 2009-08-13 14:55:33
|
Jeff, Perfect. I'll give that a try... Thanks again, P.R. -----Original Message----- From: Jeff Whitaker [mailto:js...@fa...] Sent: 2009-08-13 7:15 AM To: Eric Firing Cc: P.R.; mat...@li... Subject: Re: [Matplotlib-users] contourf interpolation/smoothness Eric Firing wrote: > P.R. wrote: > >> This has probably been asked before, so I apologize... >> >> Is it possible to improve the smoothness/interpolation used in contourf? >> I know that the interpolation can be set for imshow(pcolor?), but I couldn't >> see how to set it for contourf. >> >> Right now, contourf is producing some relatively jagged output for my >> dataset, and I'd like to try to smoothen it out, without resorting to using >> pcolor/imshow... >> > > There are two approaches: > > 1) manipulate the contours (the patch boundaries) > 2) smooth and interpolate the data to a finer grid before contouring. > > There are many problems with the first approach, and we have never tried > to implement it. > > That leaves the second method, which is really not a plotting task but a > data processing task. You might want to see if there is a suitable tool > in scipy. > > Eric > > > Pablo: You could use the interp function in Basemap to bilinearly interpolate to a finer grid. http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html#mpl_ toolkits.basemap.interp -Jeff |
|
From: Martin De K. <mde...@gm...> - 2009-08-13 13:14:26
|
Hi, I have a piece of code which explicitly creates a 3 column array of red, green, blue values which I have scaled. For example RGB = np.array( [ 10, 100, 180 ] ) etc. Anyway, I use "savefig" to ouput it to a png image. The problem is that the PNG looks a lot darker than it should do, in fact if I output the RGB array as 3 frames and view it in another plotting software the colours are brighter. Has anyone come across something similar when outputting PNG images? I am sure this is something very obvious that I am missing. Many thanks, Martin |
|
From: Jeff W. <js...@fa...> - 2009-08-13 12:19:00
|
Eric Firing wrote: > P.R. wrote: > >> This has probably been asked before, so I apologize... >> >> Is it possible to improve the smoothness/interpolation used in contourf? >> I know that the interpolation can be set for imshow(pcolor?), but I couldn't >> see how to set it for contourf. >> >> Right now, contourf is producing some relatively jagged output for my >> dataset, and I'd like to try to smoothen it out, without resorting to using >> pcolor/imshow... >> > > There are two approaches: > > 1) manipulate the contours (the patch boundaries) > 2) smooth and interpolate the data to a finer grid before contouring. > > There are many problems with the first approach, and we have never tried > to implement it. > > That leaves the second method, which is really not a plotting task but a > data processing task. You might want to see if there is a suitable tool > in scipy. > > Eric > > > Pablo: You could use the interp function in Basemap to bilinearly interpolate to a finer grid. http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html#mpl_toolkits.basemap.interp -Jeff |
|
From: Jae-Joon L. <lee...@gm...> - 2009-08-13 04:41:00
|
http://matplotlib.sourceforge.net/search.html?q=set_label_position&check_keywords=yes&area=default ax2.xaxis.set_label_position("top") ax2.yaxis.set_label_position("right") Regards, -JJ On Thu, Aug 13, 2009 at 12:10 AM, Duncan Mortimer<dm...@gm...> wrote: > Hi all, > > I'm trying to produce a graph in which two different sets of axes are > superimposed, with both x- and y- ticks taking on different ranges. > > I've managed to get the first set of axes to place its ticks on the > bottom and left of the figure, and the second set to place its ticks > on the top and right, however, xlabel and ylabel behave in an > unexpected manner: for the bottom-left axes, xlabel and ylabel place > text in the correct location, however, for the "top-right" axes, > xlabel and ylabel misbehave, placing the axis label text at the bottom > (for xlabel) and the left (for ylabel), but positioned closer to the > axis lines. > > This seems to be due to some sort of bug with the "alignment" keyword > for xlabel and ylabel: i.e. alignment = "top" or alignment = "right" > does not behave as I would have expected. > > I'm sorry if this has been reported before; I wasn't able to find > anything useful in the archives or elsewhere on the web. > Can anyone suggest a workaround? I don't have the time at the moment > to get to grips with the source. > > See below for a simple example. > > Thanks for your help! > Duncan > > ---- > > from pylab import * > > fig = figure() > > ax1 = fig.add_axes([0.1,0.1,0.8,0.8],label='axes 1') > ax2 = fig.add_axes([0.1,0.1,0.8,0.8],label='axes 2') > > plot1 = ax1.plot([1,2,3],[1,2,3]) > plot2 = ax2.plot([4,5,6],[3,2,1]) > > ax1.axis([0,4,0,4]) > ax1.set_xlabel('bottom') > ax1.set_ylabel('left') > > ax2.axis([3,7,0,4]) > ax2.xaxis.tick_top() > ax2.yaxis.tick_right() > ax2.set_xlabel('top') # I expected this to place the word "top" > at the top of the figure, corresponding to the ticks for ax2's x-axis > ax2.set_ylabel('right') # I expected this to place the word > "right" at the right of the figure, corresponding to the ticks for > ax2's y-axis > > ax2.axesPatch.set_fill(False) # so that you can see through to ax1 > > fig.canvas.draw() > > ------------------------------------------------------------------------------ > 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: Duncan M. <dm...@gm...> - 2009-08-13 04:16:50
|
Hi all,
I'm trying to produce a graph in which two different sets of axes are
superimposed, with both x- and y- ticks taking on different ranges.
I've managed to get the first set of axes to place its ticks on the
bottom and left of the figure, and the second set to place its ticks
on the top and right, however, xlabel and ylabel behave in an
unexpected manner: for the bottom-left axes, xlabel and ylabel place
text in the correct location, however, for the "top-right" axes,
xlabel and ylabel misbehave, placing the axis label text at the bottom
(for xlabel) and the left (for ylabel), but positioned closer to the
axis lines.
This seems to be due to some sort of bug with the "alignment" keyword
for xlabel and ylabel: i.e. alignment = "top" or alignment = "right"
does not behave as I would have expected.
I'm sorry if this has been reported before; I wasn't able to find
anything useful in the archives or elsewhere on the web.
Can anyone suggest a workaround? I don't have the time at the moment
to get to grips with the source.
See below for a simple example.
Thanks for your help!
Duncan
----
from pylab import *
fig = figure()
ax1 = fig.add_axes([0.1,0.1,0.8,0.8],label='axes 1')
ax2 = fig.add_axes([0.1,0.1,0.8,0.8],label='axes 2')
plot1 = ax1.plot([1,2,3],[1,2,3])
plot2 = ax2.plot([4,5,6],[3,2,1])
ax1.axis([0,4,0,4])
ax1.set_xlabel('bottom')
ax1.set_ylabel('left')
ax2.axis([3,7,0,4])
ax2.xaxis.tick_top()
ax2.yaxis.tick_right()
ax2.set_xlabel('top') # I expected this to place the word "top"
at the top of the figure, corresponding to the ticks for ax2's x-axis
ax2.set_ylabel('right') # I expected this to place the word
"right" at the right of the figure, corresponding to the ticks for
ax2's y-axis
ax2.axesPatch.set_fill(False) # so that you can see through to ax1
fig.canvas.draw()
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-08-13 03:10:43
|
On Wed, Aug 12, 2009 at 3:16 PM, Uri Laserson<las...@mi...> wrote: > Hi, > > I am trying to overlay a few Axes object that need to share axes. I would > like it to be the case that if I change the properties of one axis (e.g., > scale), the corresponding axis of the other axes will have the properties > changed automatically. I was trying to use twinx/twiny, but this behavior > failed. After looking at the code, it appears to me that the sharex/sharey > parameters to the Axes class never actually copies the axis instances of the > given axes object. Is this intentional? If I want to get properties to be > connected between axis objects in different axes, could I manually assign > the xaxis attribute of one axes to reference an Axis instance in a different > axes object? Or would this make everything break? Axis in matplotlib is partly a transform (not exactly, but sort of) and partly an artist. And it became tricky to share axis among different axes. The solution depends on details of what you want. If the scale is set before twin is called, than the twined axes will have a same scale as the original. If you need to change the scale after the axes is twined, you need to manually change the all shared axes (get_shared_x_axes and get_shared_y_axes would be helpful). Also, depending on you need, the ParasiteAxes in axes_grid toolkit may be useful. Regards, -JJ > > Thanks! > Uri > > -- > Uri Laserson > PhD Candidate, Biomedical Engineering > Harvard Medical School (Genetics) > Massachusetts Institute of Technology (Mathematics) > phone +1 917 742 8019 > las...@mi... > > ------------------------------------------------------------------------------ > 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: Eric F. <ef...@ha...> - 2009-08-13 02:59:28
|
P.R. wrote: > This has probably been asked before, so I apologize... > > Is it possible to improve the smoothness/interpolation used in contourf? > I know that the interpolation can be set for imshow(pcolor?), but I couldn't > see how to set it for contourf. > > Right now, contourf is producing some relatively jagged output for my > dataset, and I'd like to try to smoothen it out, without resorting to using > pcolor/imshow... There are two approaches: 1) manipulate the contours (the patch boundaries) 2) smooth and interpolate the data to a finer grid before contouring. There are many problems with the first approach, and we have never tried to implement it. That leaves the second method, which is really not a plotting task but a data processing task. You might want to see if there is a suitable tool in scipy. Eric > > Please help, > Thanks, > P.Romero > > > ------------------------------------------------------------------------------ > 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: Eli B. <eb...@gm...> - 2009-08-13 02:11:49
|
Hello, I am trying to use the RectangleSelector widget. In the corresponding example http://matplotlib.sourceforge.net/examples/widgets/rectangle_selector.html the rectangle selector is activated every time I click inside the axes. However, I would like to activate it on demand. For example, suppose there is a choice-box (using a simple gui like easygui). One of the possible choices would be "select rectangle". I would like the RectangleSelector to be activated only after the "select rectangle" option is chosen and deactivated after one rectangle selection. It should be activated again only after the choice-menu is presented again and the "selected rectangle" option is chosen again. The MATLAB equivalent to what I need is the command rbbox http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/rbbox.html It can be activated on demand, in a norma "linear" program and not just in event-driven GUI. Is there a way to get the same functionality from matplotlib ? Thanks Eli |
|
From: P.R. <rom...@ho...> - 2009-08-13 01:55:24
|
This has probably been asked before, so I apologize... Is it possible to improve the smoothness/interpolation used in contourf? I know that the interpolation can be set for imshow(pcolor?), but I couldn't see how to set it for contourf. Right now, contourf is producing some relatively jagged output for my dataset, and I'd like to try to smoothen it out, without resorting to using pcolor/imshow... Please help, Thanks, P.Romero |
|
From: per f. <per...@gm...> - 2009-08-13 01:46:06
|
hi all, thank you for your replies. my original message wasn't detailed enough. what i am looking for is a hexbin plot, where points are binned into hexagons and then hexagons are plotted in size proportional to the points in the bin. i think the links provided are very relevant for this, but one thing i cannot information on is: how can i make an automatic legend for such plots, where hex bins of varying sizes are shown to tell the viewer how many points fall into each bin size? to make this clear, i am looking for something like this: http://r-spatial.sourceforge.net/gallery/fig/fig12.png where instead of bubbles, we have hexbins, and the legend on the right gives a mapping from differently sized hex bins to the number of points in that hexbin. any help on this would be greatly appreciated. thanks. On Wed, Aug 5, 2009 at 12:36 PM, John Hunter<jd...@gm...> wrote: > On Wed, Aug 5, 2009 at 10:25 AM, Ryan May<rm...@gm...> wrote: > >>> is there a way to do this in matplotlib? thanks for your help. >> >> Not to be rude, but is there any reason you didn't look for pyplot.hexbin >> before sending the email? :) > > Continuing in the non-rude vein :-) See these examples:: > > http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo.html > http://matplotlib.sourceforge.net/examples/pylab_examples/hexbin_demo2.html > > and this doc string:: > > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hexbin > > Have fun! > JDH > |
|
From: Tom V. <to...@so...> - 2009-08-12 20:04:18
|
Great. That worked. Thanks! -Tom On Thu, Jul 16, 2009 at 11:23, Jae-Joon Lee<lee...@gm...> wrote: > One work around is to call > > self.figure.subplots_adjust() > > after geometry changed. After this call, the twinx-ed axes will have > the same axes position as the original one. > > Another option is to use mpl_toolkits.axes_grid > (http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#parasiteaxes). > But the previous solution seems to be much easier for you. > Regards, > > -JJ > > > On Thu, Jul 16, 2009 at 1:16 PM, Tom Vaughan<to...@so...> wrote: >> On Tue, Jun 2, 2009 at 07:33, John Hunter<jd...@gm...> wrote: >>> On Tue, Jun 2, 2009 at 9:03 AM, Tom Vaughan <to...@so...> wrote: >>>> Is it possible to add subplots to a figure if I don't know in advance >>>> how many subplots I need to add? >>>> >>>> What I do now is I call add_subplot like add_subplot(i, 1, i) where i >>>> is 1 initially, and just increases by 1 on each call. This almost >>>> works. Except the first plot takes up the whole figure, the second >>>> plot is placed on top of the bottom half of the first plot, etc. Is >>>> there a way to "resize" the plots when a subplot is added? Or how >>>> would I "re-plot" the previous subplots? >>> >>> See the Axes.change_geometry command >>> >>> http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.SubplotBase.change_geometry >> >> twinx() does not return an axes that contains the change_geometry >> method. How then can I do the equivalent on this axes? Calling twinx() >> again on the original axes after change_geometry() has been called >> does not do the trick. Thanks. >> >> -Tom >> >> ------------------------------------------------------------------------------ >> Enter the BlackBerry Developer Challenge >> This is your chance to win up to $100,000 in prizes! For a limited time, >> vendors submitting new applications to BlackBerry App World(TM) will have >> the opportunity to enter the BlackBerry Developer Challenge. See full prize >> details at: http://p.sf.net/sfu/Challenge >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > -- Website: www.software6.net E-mail/Google Talk: tom (at) software6 (dot) net Mobile: +1 (310) 751-0187 |