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
(20) |
2
(21) |
3
(21) |
4
(14) |
5
(8) |
|
6
(12) |
7
(16) |
8
(27) |
9
(39) |
10
(19) |
11
(12) |
12
(3) |
|
13
(3) |
14
(18) |
15
(14) |
16
(6) |
17
(7) |
18
(19) |
19
(5) |
|
20
(8) |
21
(24) |
22
(42) |
23
(12) |
24
(11) |
25
(16) |
26
(2) |
|
27
(4) |
28
(10) |
|
|
|
|
|
|
From: Stef M. <ste...@gm...> - 2011-02-14 21:19:32
|
After searching for the path in all files in the distro, I found the problem: font caching of Matplotlib After removing C:\Documents and Settings\Administrator\.matplotlib everything works ok. So the remaining question is, is there an elegant way, either in py2exe or in matplotlib, to get arounf this caching problem ? thanks, Stef Mientki On 14-02-2011 21:41, Stef Mientki wrote: > Ran into the same problem, > are there any hints to track down the problem. > > I tried to remove the MatPlotLib from py2exe and added MatPlatlib manual afterwards, > but still it point to the wrong directory. > > thanks, > Stef Mientki > > > On 26-12-2010 15:18, zb wrote: >> Hi. >> >> First of all, I would like to thank the developers of this wonderful package. >> >> I started doing an app and I finally tried to compile it with py2exe. I run into some issues that I posted in the py2exe group here; >> >> http://sourceforge.net/mailarchive/forum.php?thread_name=ienv6p%24b42%241%40dough.gmane.org&forum_name=py2exe-users >> >> To make it work, I ended it up having to use an older version of matplotlib and numpy. I don't know if the developers of matplotlib are aware of these issues and I am posting here just in case they don't know. >> >> When I was trying to use version 1.0, I run into problems with the mpl data directory. The output of py2exe could only find the mpl-data dir at the root /dist of a drive. Then I decided to try a much earlier version of matplotlib, and I run into different set of problems. Finally, I tried matplotlib 0.99.1 and the problems went away (I didn't try version 0.99.3 because its release date was too close to the version 1.0). >> >> I am just trying to make the developers aware of the problems and I hope to use newer versions in the future. >> >> Thanks for your attention >> |
|
From: Christoph G. <cg...@uc...> - 2011-02-14 21:15:12
|
On 2/14/2011 12:41 PM, Stef Mientki wrote: > Ran into the same problem, > are there any hints to track down the problem. > > I tried to remove the MatPlotLib from py2exe and added MatPlatlib manual afterwards, > but still it point to the wrong directory. > > thanks, > Stef Mientki > > > On 26-12-2010 15:18, zb wrote: >> Hi. >> >> First of all, I would like to thank the developers of this wonderful package. >> >> I started doing an app and I finally tried to compile it with py2exe. I run into some issues that I posted in the py2exe group here; >> >> http://sourceforge.net/mailarchive/forum.php?thread_name=ienv6p%24b42%241%40dough.gmane.org&forum_name=py2exe-users >> >> To make it work, I ended it up having to use an older version of matplotlib and numpy. I don't know if the developers of matplotlib are aware of these issues and I am posting here just in case they don't know. >> >> When I was trying to use version 1.0, I run into problems with the mpl data directory. The output of py2exe could only find the mpl-data dir at the root /dist of a drive. Then I decided to try a much earlier version of matplotlib, and I run into different set of problems. Finally, I tried matplotlib 0.99.1 and the problems went away (I didn't try version 0.99.3 because its release date was too close to the version 1.0). >> >> I am just trying to make the developers aware of the problems and I hope to use newer versions in the future. >> >> Thanks for your attention >> > I can not reproduce this problem with matplotlib 1.0.1, PyQt 4.8.3, py2exe-0.6.10dev, Python 2.7.1. The only thing I noticed is that some toolbar icons are not displayed. Christoph |
|
From: Stef M. <ste...@gm...> - 2011-02-14 20:41:47
|
Ran into the same problem, are there any hints to track down the problem. I tried to remove the MatPlotLib from py2exe and added MatPlatlib manual afterwards, but still it point to the wrong directory. thanks, Stef Mientki On 26-12-2010 15:18, zb wrote: > Hi. > > First of all, I would like to thank the developers of this wonderful package. > > I started doing an app and I finally tried to compile it with py2exe. I run into some issues that I posted in the py2exe group here; > > http://sourceforge.net/mailarchive/forum.php?thread_name=ienv6p%24b42%241%40dough.gmane.org&forum_name=py2exe-users > > To make it work, I ended it up having to use an older version of matplotlib and numpy. I don't know if the developers of matplotlib are aware of these issues and I am posting here just in case they don't know. > > When I was trying to use version 1.0, I run into problems with the mpl data directory. The output of py2exe could only find the mpl-data dir at the root /dist of a drive. Then I decided to try a much earlier version of matplotlib, and I run into different set of problems. Finally, I tried matplotlib 0.99.1 and the problems went away (I didn't try version 0.99.3 because its release date was too close to the version 1.0). > > I am just trying to make the developers aware of the problems and I hope to use newer versions in the future. > > Thanks for your attention > |
|
From: Aman T. <ama...@gm...> - 2011-02-14 16:18:14
|
Have you looked into Celery? It is a queuing system with Django ORM support. I don't have any experience with it myself, but I have heard good things about it. -Aman 2011/2/14 wukan <wek...@gm...>: > Hi ,When I use matplotlib to draw 2D graphics in django web site,I encounter > a problem. > when server users use matplotlib to draw graphics simultaneously will > cause website collapse. > when one user use matplotlib to draw graphics will have no problem. > > i suppose matplotlib doesnot support multithreading drawing. > so i put the draw function in a thread . it can't work as before. > > so why matplotlib doesnot support multithreading drawing? > How to solve this problem. > Hope I can receive help from you. > > Regards > > wekay > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: wukan <wek...@gm...> - 2011-02-14 15:39:10
|
Hi ,When I use matplotlib to draw 2D graphics in django web site,I encounter a problem. when server users use matplotlib to draw graphics simultaneously will cause website collapse. when one user use matplotlib to draw graphics will have no problem. i suppose matplotlib doesnot support multithreading drawing. so i put the draw function in a thread . it can't work as before. so why matplotlib doesnot support multithreading drawing? How to solve this problem. Hope I can receive help from you. Regards wekay |
|
From: Ryan M. <rm...@gm...> - 2011-02-14 15:07:20
|
On Mon, Feb 14, 2011 at 8:40 AM, Nils Wagner <nw...@ia...> wrote: > Hi all, > > Is it possible to apply griddata to polar coordinates or > do I need cartesian coordinates ? > > http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata You can keep the data in polar coordinates, you just need to pass in the locations of the points in cartesian coordinates: x = r * cos(theta) y = r * sin(theta) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Rajeev R. <raj...@da...> - 2011-02-14 15:02:39
|
Dear Matplotlib folks, Those of you whose duties include teaching basic stats might be interested in these interactive tutorial files, designed to illustrate basic concepts. Running the code opens up an interactive figure window, using Matplotlib for the GUI and the plots. When you click on a figure to add new points, the statistical tests shown in the figure change accordingly. http://www.dartmouth.edu/~raj/intro-stats.html The code has lots of comments in it, which attempt to explain the concepts as explicitly as possible. No prior knowledge of Python or statistics is assumed. These programs require the SciPy module, in addition to Matplotlib. The tutorials are: - interactive_mean_std_normal_distribution.py - interactive_one_sample_t_test.py - interactive_two_sample_t_test.py - interactive_correlation_plot.py The same webpage also contains Matlab versions of the scripts. Please feel more than free to use any of the code for teaching, if you find it useful. Yours, Rajeev Raizada Research Assistant Professor Neukom Institute for Computational Science Dartmouth College HB 6255 Hanover NH 03755 Tel: 603 646 0175 E.mail: raj...@da... WWW: http://www.dartmouth.edu/~raj |
|
From: Nils W. <nw...@ia...> - 2011-02-14 14:57:26
|
Hi all, Is it possible to apply griddata to polar coordinates or do I need cartesian coordinates ? http://matplotlib.sourceforge.net/api/mlab_api.html#matplotlib.mlab.griddata Nils |
|
From: jules h. <hu...@ha...> - 2011-02-14 12:24:11
|
Feel free to 'save and run', pass along, or ignore.
This was my valentine's day present today.
I hope the bandwidth amuses more than it annoys...
Jules
#----------------------------------
# hohumheart.py
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
# force square figure and square axes looks better for polar, IMO
width, height = mpl.rcParams['figure.figsize']
size = min(width, height)
# make a square figure
fig = plt.figure(figsize=(size, size))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#ffffff')
ax.set_rmax(2.0)
ax.set_xticks([])
ax.set_yticks([])
plt.grid(False)
theta = np.linspace(0,1,100)*np.pi*2
r = 1*(1-np.cos(theta))
ncards = 5
step = 2*np.pi/ncards
for ii in range(ncards):
tr = np.column_stack((theta+ii*step, r))
cpatch = Polygon(tr)
cpatch.set_facecolor('r')
cpatch.set_edgecolor('k')
cpatch.set_alpha(0.5)
ax.add_patch(cpatch)
ax.set_title("I $\heartsuit$ you", fontsize=20)
plt.show()
#-----------------------
|
|
From: Gaël K. <kan...@ho...> - 2011-02-14 10:23:50
|
Hi,
I have some problems to plot a 3d plot_surface (and contour plot) in log scale (y and z or x,y and z).
There is nothink in the help sections of thus plot to plot them in log scale (neither in thus plot code commentary).
I tried to find a solution by myself (many try as "log=True", "xscale='log'", "scale='log'", or "set_xscale('log')"...) but it doesn't work.
I tried to use "LogFormatter" (ticker) but i failed (maybe I am doing something wrong (I am a newbe) but i tried many things).
I try to found a solution on forums and this mailing list and what i found nearest of my problem is this topic:
http://stackoverflow.com/questions/3909794/plotting-mplot3d-axes3d-xyz-surface-plot-with-log-scale
They said this problem had no solution. Is it true? have somebody solved this problem?
An other solution is to plot log(Data) and change ticks with "set_ticks" (for exemple) but it seems to only work with 2D plot. I tried too :(
To be unterstanding easier, this is an exemple of the code to plot in log scale:
import matplotlib.pyplot as plt# (i am under '1.0.0')
import numpy as np
#Data
x = np.logspace(0, 4, 10)
y = np.logspace(0, 4, 10)
Z = np.arange(100).reshape((10,10))
#Min and Max for x,y and Z
minx=np.min(x)
maxx=np.max(x)
miny=np.min(y)
maxy=np.max(y)
minz=np.min(Z)
maxz=np.max(Z)
#figure
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
cset = ax.contour(X, Y, Z, zdir='z', offset=minz)
cset = ax.contour(X, Y, Z, zdir='x', offset=minx)
cset = ax.contour(X, Y, Z, zdir='y', offset=miny)
ax.set_xlabel("X")
ax.set_xlim3d(minx,maxx)
ax.set_ylabel("Y")
ax.set_ylim3d(miny,maxy)
ax.set_zlabel("Z")
ax.set_zlim3d(minz,maxz)
fig.savefig("plot00.png")
Has someone got a solution?
Thanks!
Regards,
Gaël
|
|
From: Stephan M. <zw...@we...> - 2011-02-14 09:11:59
|
That solution might be fine for static plots, but I my case I prefer my solution. My plot is quite interactive so using your solution causes many problems with my code. -- View this message in context: http://old.nabble.com/onpick-on-a-2-y-plot-%28-via-twinx%28%29-%29-seems-to-only-allow-picking-of-second-axes%27s-artists-tp25049128p30919747.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Tom F. <tj...@ca...> - 2011-02-14 05:50:20
|
Hi, I've written a script to roughly emulate the elegant streamline plots found in Mathematica. The code is available at http://www.atm.damtp.cam.ac.uk/people/tjf37/streamplot.py and example plots at http://www.atm.damtp.cam.ac.uk/people/tjf37/streamlines1.png and streamlines2.png. It's a pretty hacky script, but fast and fairly robust. If anyone finds this script useful and has comments/suggestions, I'm happy to do a bit more work. It would also be helpful if anyone has suggestions on a particular issue I had. Currently, to plot variable-width lines (i.e. streamlines2.png) I use a plot command for each line segment which is very slow and nasty. Is there a better way I'm missing? Tom |
|
From: Bartosz T. <b.t...@bi...> - 2011-02-13 22:17:00
|
Hi, I am writting an application in which I update dynamically the state of the figures. When I am done I call the Figure.canvas.draw function to redraw the figure. However, when the window was previously closed by the user the update can be skipped. Is there a way to tell from a figure handle if the figure is shown on screen or not? Currently, I solve this problem with a callback which sets the figure handle to None on figure close event. However, I guess there might be a more direct way of doing that. What would you suggest? Thanks a lot for your help. Bartosz |
|
From: Daniel H. <dh...@gm...> - 2011-02-13 16:29:55
|
I don't know of a colormap like that, but you can build one pretty
easily by just finding the hex codes for the colors you want, and then
doing this:
mycm = matplotlib.colors.LinearSegmentedColormap.from_list("my_new_colormap",["#58c5cc","#5cc0a4","#34842f","#b3de1d"])
matplotlib.cm.register_cmap("my_new_colormap",cmap=mycm)
On Sat, Feb 12, 2011 at 10:02 AM, Alan G Isaac <ai...@am...> wrote:
> Can anyone share a colormap that goes from bright yellow to
> dark blue via green, along the lines of the middle 2/3 of
> gist_rainbow?
> http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps
>
> Thanks,
> Alan Isaac
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Daniel Hyams
dh...@gm...
|
|
From: Ray S. <sp...@MI...> - 2011-02-13 04:00:59
|
Ben, Thanks for the suggestions. I've updated the code accordingly. I tend to use **kwargs because it enforces passing arguments in by keyword, but your point on IDE friendliness is well taken. Someday, we'll move to Python 3 with its support for keyword-only arguments... I've also added a license block releasing the code under the MIT license. If there's a reason it should be released under a different license as well, let me know. Ray On 2/12/2011 1:01 PM, Benjamin Root wrote: > > > On Fri, Feb 11, 2011 at 3:06 PM, Ray Speth <sp...@mi... > <mailto:sp...@mi...>> wrote: > > Hi, > > I wrote a script to generate streamline plots using matplotlib a while > ago, and this post inspired me to finally clean it up a bit. The code is > available at http://web.mit.edu/speth/Public/streamlines.py and you can > see an example of its output at > http://web.mit.edu/speth/Public/streamlines.png > > I'd be happy to have it find a home in matplotlib if it would be useful > to other people there. > > Ray > > > Ray, > > That is absolutely beautiful work there. > > At the very least, I would like to see this added to the gallery or the > cookbook. The code is very nicely commented and documented. Just a few > points that come to mind. > > First, consider the possibility of using asanyarray() instead of > asarray(). The big usecase for asanyarray is the use of masked arrays. > > Second, I am personally against call signatures that are just "**kwargs" > and then popping off the arguments at the beginning of the method. So > long as the default value is not a mutable object, then put those > arguments in the call signature with the default values. It is much > more IDE and documentation-friendly this way. > > Third, I would think that using plt.gca() would be better than > plt.axes() just in case the user is using subplots. gca() will create > an axes if none exists already. > > Lastly, you should do ax.plot() instead of plt.plot() since you have > already retrieved the axes object. This way, in case the axes object > passed in is not the currently active axes, it would still work. > > The difficulty in getting this included into matplotlib proper (and the > same goes to the other thread about streamgraphs) is that these plots > are done in an object oriented rather than procedural approach. > Personally, I would like to see (one day) a refactor of matplotlib where > everything plotable is an object that gets placed into the axes object > (which, itself is a plotable that gets placed in a figure...). While > the current code isn't too far from that concept, the interface is > ultimately procedural. > > @everyone else: > The big reason I see for a future refactor to an object-oriented > approach is that plots are getting more complicated, and we can't just > keep on adding more methods to the axes object. A more object-oriented > approach would allow for complex graphs to be placed into their own > modules, and yet still be treated the same as any other plotting > method. It would also make it easier for others to extend matplotlib's > plotting features. > > Ben Root > |
|
From: Jason G. <jas...@cr...> - 2011-02-12 20:26:31
|
On 2/11/11 3:06 PM, Ray Speth wrote: > Hi, > > I wrote a script to generate streamline plots using matplotlib a while > ago, and this post inspired me to finally clean it up a bit. The code is > available at http://web.mit.edu/speth/Public/streamlines.py and you can > see an example of its output at > http://web.mit.edu/speth/Public/streamlines.png > > I'd be happy to have it find a home in matplotlib if it would be useful > to other people there. Could you put a license statement on the file you posted? Even if it isn't included in matplotlib, I think we would love to include it in Sage. I've wanted to have streamline plots in Sage for a long time, and your plots look great! Thanks, Jason |
|
From: Benjamin R. <ben...@ou...> - 2011-02-12 18:02:19
|
On Fri, Feb 11, 2011 at 3:06 PM, Ray Speth <sp...@mi...> wrote: > Hi, > > I wrote a script to generate streamline plots using matplotlib a while > ago, and this post inspired me to finally clean it up a bit. The code is > available at http://web.mit.edu/speth/Public/streamlines.py and you can > see an example of its output at > http://web.mit.edu/speth/Public/streamlines.png > > I'd be happy to have it find a home in matplotlib if it would be useful > to other people there. > > Ray > > Ray, That is absolutely beautiful work there. At the very least, I would like to see this added to the gallery or the cookbook. The code is very nicely commented and documented. Just a few points that come to mind. First, consider the possibility of using asanyarray() instead of asarray(). The big usecase for asanyarray is the use of masked arrays. Second, I am personally against call signatures that are just "**kwargs" and then popping off the arguments at the beginning of the method. So long as the default value is not a mutable object, then put those arguments in the call signature with the default values. It is much more IDE and documentation-friendly this way. Third, I would think that using plt.gca() would be better than plt.axes() just in case the user is using subplots. gca() will create an axes if none exists already. Lastly, you should do ax.plot() instead of plt.plot() since you have already retrieved the axes object. This way, in case the axes object passed in is not the currently active axes, it would still work. The difficulty in getting this included into matplotlib proper (and the same goes to the other thread about streamgraphs) is that these plots are done in an object oriented rather than procedural approach. Personally, I would like to see (one day) a refactor of matplotlib where everything plotable is an object that gets placed into the axes object (which, itself is a plotable that gets placed in a figure...). While the current code isn't too far from that concept, the interface is ultimately procedural. @everyone else: The big reason I see for a future refactor to an object-oriented approach is that plots are getting more complicated, and we can't just keep on adding more methods to the axes object. A more object-oriented approach would allow for complex graphs to be placed into their own modules, and yet still be treated the same as any other plotting method. It would also make it easier for others to extend matplotlib's plotting features. Ben Root |
|
From: Alan G I. <ai...@am...> - 2011-02-12 15:02:30
|
Can anyone share a colormap that goes from bright yellow to dark blue via green, along the lines of the middle 2/3 of gist_rainbow? http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps Thanks, Alan Isaac |
|
From: Ray S. <sp...@MI...> - 2011-02-11 21:06:14
|
Hi, I wrote a script to generate streamline plots using matplotlib a while ago, and this post inspired me to finally clean it up a bit. The code is available at http://web.mit.edu/speth/Public/streamlines.py and you can see an example of its output at http://web.mit.edu/speth/Public/streamlines.png I'd be happy to have it find a home in matplotlib if it would be useful to other people there. Ray On 02/11/2011 11:10 AM, Gökhan Sever wrote: > Hi, > I see two related requests on: > http://old.nabble.com/matplotlib-to-draw-streamlines--td28008708.html > http://www.mail-archive.com/mat...@li.../msg07267.html > a request filed on > http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723 > <http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723> > Is there any progress on this plot? Or source guides to implement such > functionality in mpl? > PS: The feature request @ > http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse > <http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse> looks > spammed? Anyone works on clearing these? > > -- > Gökhan > > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Jeff W. <js...@fa...> - 2011-02-11 20:16:29
|
On 2/11/11 9:45 AM, Jeff Whitaker wrote: > On 2/11/11 9:10 AM, Gökhan Sever wrote: >> Hi, >> I see two related requests on: >> http://old.nabble.com/matplotlib-to-draw-streamlines--td28008708.html >> http://www.mail-archive.com/mat...@li.../msg07267.html >> a request filed on >> http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723 >> <http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723> >> Is there any progress on this plot? Or source guides to implement such >> functionality in mpl? >> PS: The feature request @ >> http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse >> <http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse> looks >> spammed? Anyone works on clearing these? >> >> -- >> Gökhan > Gökhan: Nobody is working on that as far as I know. An interesting > alternative to streamlines can be found here: > > http://scikits.appspot.com/vectorplot > > -Jeff > > Gökhan: I just added a lic_demo.py example to basemap SVN that shows how to use the vectorplot scikit with basemap (image as http://jswhit.fastmail.fm/lic_demo.png). Is this the sort of thing you were looking for? -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: C M <cmp...@gm...> - 2011-02-11 17:10:34
|
On Thu, Jan 20, 2011 at 4:44 AM, Stephan Markus <zw...@we...> wrote: > > Hello! > > I am also using two axes in a plot and want to be able to pick the lines of > both axes. > So far I used MPL 0.99.3 and a button on my interface to change the z-order > of the axes in order to be able to pick lines of the "active" axes and to > see the correct x/y data in the navigation toolbar. The callback code of my > button is basically the code from othererik. > > Since MPL 1.0.0 I have the problem that lines of the second axes simply > disappear from the plot whenever the plot is redrawn and it's zorder is > higher. This thread, in which I asked a similar question and receive a workable solution from JJ, might be helpful. I am now just automatically moving all my lines over to the highest z-order axis so that whatever is visible is pickable. (But see below for a gotcha) http://old.nabble.com/unable-to-point-pick-2nd-axis-after-upgrade-to-mpl-1.0-td30400311.html On this note, to the developers: This need to take into account the z-order for picking lines has made my development more difficult. I have had a week's delay due to a difficult-to-understand bug in my code in which I prematurely moved the line over to the highest z-order axis, and then tried to format the axis with a custom formatter--causing an error. Simply moving the line only after all formatting is done fixed the bug, but that wasn't obvious for a while. The need to track which lines are on which z-order and to move them only after all formatting/locating has been done on them strikes me as a new "gotcha" that the simpler and more intuitive approach of "if you can see it, you can pick it" didn't have. (I have a somewhat complex case, though, in which there are three possible sorts of axes that could wind up on either the right or left sides). It also seems counter-intuitive that a line can "belong" to an axis from the in Matplotlib and yet for the user it clearly is measured using the other axis. Could "z-order mattering" be toggled? Anyway, my 2 cents. Thanks, Che |
|
From: Jeff W. <js...@fa...> - 2011-02-11 16:45:48
|
On 2/11/11 9:10 AM, Gökhan Sever wrote: > Hi, > I see two related requests on: > http://old.nabble.com/matplotlib-to-draw-streamlines--td28008708.html > http://www.mail-archive.com/mat...@li.../msg07267.html > a request filed on > http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723 > <http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723> > Is there any progress on this plot? Or source guides to implement such > functionality in mpl? > PS: The feature request @ > http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse > <http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse> looks > spammed? Anyone works on clearing these? > > -- > Gökhan Gökhan: Nobody is working on that as far as I know. An interesting alternative to streamlines can be found here: http://scikits.appspot.com/vectorplot -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg |
|
From: Gökhan S. <gok...@gm...> - 2011-02-11 16:10:43
|
Hi, I see two related requests on: http://old.nabble.com/matplotlib-to-draw-streamlines--td28008708.html http://www.mail-archive.com/mat...@li.../msg07267.html a request filed on http://sourceforge.net/tracker/index.php?func=detail&aid=3080981&group_id=80706&atid=560723 Is there any progress on this plot? Or source guides to implement such functionality in mpl? PS: The feature request @ http://sourceforge.net/tracker/?atid=560723&group_id=80706&func=browse looks spammed? Anyone works on clearing these? -- Gökhan |
|
From: Daniel H. <dh...@gm...> - 2011-02-11 13:54:16
|
This is a slightly updated version of the script that uses subplots instead of making you pop two windows, which doesn't seem to work like I wanted it to on all systems. None of the code that does the locating has changed; only the demonstration part. -- Daniel Hyams dh...@gm... |
|
From: Matthew T. <mat...@gm...> - 2011-02-11 12:41:54
|
Hi Ben,
On Thu, Feb 10, 2011 at 5:27 PM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Thu, Feb 10, 2011 at 4:13 PM, Matthew Turk <mat...@gm...> wrote:
>>
>> Hi Ben,
>>
>> On Thu, Feb 10, 2011 at 5:06 PM, Benjamin Root <ben...@ou...> wrote:
>> > On Thu, Feb 10, 2011 at 1:38 PM, Matthew Turk <mat...@gm...>
>> > wrote:
>> >>
>> >> Hi there,
>> >>
>> >> I'm plotting some images in latitude/longitude space. These are
>> >> images generated using the HEALpix method for discretizing the sphere,
>> >> but I have resampled them to a regular grid of phi, theta, and the
>> >> resultant image is contained in a variable img. This is a fully-self
>> >> contained snippet:
>> >>
>> >> import matplotlib.figure
>> >> import matplotlib.backends.backend_agg
>> >> import numpy
>> >> from numpy import pi
>> >>
>> >> img = numpy.random.random((800, 800))
>> >> fig = matplotlib.figure.Figure((10, 4.9))
>> >> ax = fig.add_subplot(1,1,1,projection='mollweide')
>> >> image = ax.imshow(img, extent=(-pi,pi,-pi/2,pi/2), clip_on=False,
>> >> aspect=0.5)
>> >> cb = fig.colorbar(image, orientation='horizontal')
>> >> canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(fig)
>> >> canvas.print_figure("hi.png")
>> >>
>> >> This makes a very nice looking figure, basically as expected: a black
>> >> oval outline for the map projection with the image inside it, the
>> >> lat/lon axes identified, etc. What I'm running into here is that I
>> >> would like to fiddle with the size of the figure, to adjust the
>> >> whitespace and the position of the colorbar and so on, but any
>> >> adjustment to the height of the figure instantiation, for instance:
>> >>
>> >> fig = matplotlib.figure.Figure((10, 4.9))
>> >>
>> >> (and the rest unchanged) results in the black oval, the axes, but the
>> >> image content is completely blank. Is this a bug, or just a subtlety
>> >> I'm missing?
>> >>
>> >> Thanks for any ideas!
>> >>
>> >> Best,
>> >>
>> >> Matt
>> >>
>> >
>> > I am curious, why are you saving the figure using canvas.print_figure()?
>> > How is it different from fig.savefig()? If you, for some reason, must
>> > use
>> > canvas.print_figure(), then it seems like you are creating a new canvas
>> > from
>> > the figure (I don't know, maybe it grabs figure's existing canvas
>> > object?). In other words, you could just simply do:
>> >
>> > fig.savefig("hi.png")
>>
>> Maybe I'm doing something wrong here, but in the example script I gave
>> the figure does not have a canvas object affiliated with it; it's set
>> to None until I execute this operation:
>>
>> canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(fig)
>>
>> At that point, fig.canvas is not None, and is the same canvas that I
>> just created:
>>
>> >>> print fig.canvas
>> None
>> >>> canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(fig)
>> >>> canvas.print_figure("hi.png")
>> >>> fig.canvas
>> <matplotlib.backends.backend_agg.FigureCanvasAgg instance at 0x10263d3b0>
>> >>> canvas is fig.canvas
>> True
>>
>> >
>> > or, if you must use canvas.print_figure(), you could do:
>> >
>> > fig.canvas.print_figure()
>> >
>> > instead of the two lines you have right now.
>> >
>> > See if that makes a difference.
>>
>> Unfortunately it didn't end up making a difference. The image is
>> still printed, with colorbar, with lat/lon lines, but no image in the
>> center of the black oval for the projection.
>>
>> Thanks,
>>
>> Matt
>>
>
> I just figured out why you don't have a canvas object. It is because you
> aren't creating your figure object correctly. Try this:
>
> import matplotlib.pyplot as plt
> import numpy
> from numpy import pi
>
> img = numpy.random.random((800, 800))
> fig = plt.figure(figsize=(10, 4.9))
> ax = fig.add_subplot(1,1,1,projection='mollweide')
> image = ax.imshow(img, extent=(-pi,pi,-pi/2,pi/2), clip_on=False,
> aspect=0.5)
> cb = fig.colorbar(image, orientation='horizontal')
> fig.savefig("hi.png")
>
> Notice that the figure is created through the pyplot's figure() method.
> Because pyplot knows the backend, it is able to assign the correct canvas
> object when making the figure object. This can't be done from the Figure
> constructor alone. Once a proper figure object is made, it can then
> properly call savefig().
>
> See if that helps!
> Ben Root
>
>
This script does work, but it gives exactly the same results as my
original script -- which is that if the figure size is set to (10,5.0)
it will include the image plot inside the black oval for the
projection, but if the figure size is (10,4.9) it will not. I've
placed two images here:
http://imgur.com/CApcml&hc4ES
http://imgur.com/CApcm&hc4ESl
The first image was created with figsize (10,5). The second was with
figsize (10,4.9). The image plot does not appear in the second one,
although its bounding box does. Any ideas?
Thanks!
Matt
|