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}
(151) 
_{Aug}

_{Sep}

_{Oct}

_{Nov}

_{Dec}

S  M  T  W  T  F  S 


1
(16) 
2
(22) 
3
(28) 
4
(17) 
5
(17) 
6
(7) 
7

8
(15) 
9
(28) 
10
(26) 
11
(28) 
12
(19) 
13
(5) 
14
(3) 
15
(21) 
16
(28) 
17
(11) 
18
(18) 
19
(6) 
20
(5) 
21
(18) 
22
(11) 
23
(22) 
24
(28) 
25
(17) 
26
(17) 
27
(7) 
28
(16) 
29
(24) 
30
(25) 
31
(14) 



From: Friedrich Romstedt <friedrichromstedt@gm...>  20100318 22:14:06

2010/3/18 Ciarán Mooney <general.mooney@...>: > value = (log(x)/log(largest))*255 Just two thoughts: 1) I doubt the statement cited above is not correct, as it may also yield negative values as soon as 0 < x < 1. In fact, you are calculating log_{largest}(x). This crosses zero for x = 1. What I deem correct instead, is a linear mapping of the log space (logmin, log(largest)) onto (0, 1). There logmin may be negative. 2) When matplotlib does the job, maybe use: axes = fig.add_axes([0, 0, 1, 1]) axes.imshow(...) This lets the axes fill the whole figure space, without margins. You can also turn off the ticks if you want. Friedrich 
From: Friedrich Romstedt <friedrichromstedt@gm...>  20100318 22:01:18

2010/3/4 Timo Heine <timo.heine@...>: > Basically what I want to do is to draw a horizontal line with relative y > coordinates and absolute xmin and xmax coordinate. Then I could draw a > line when a bit is high and have it always in plot area even when zooming > etc. Like axhline(...) but with relative y and absolute x > coordinates. I found a better solution candidate now, but I don't know whether it works: import matplotlib.transforms import matplotlib.lines <create Axes instance by calling fig.add_axes() or fig.add_subplot()> trans = matplotlib.transforms.blended_transform_factory(axes.transData, axes.transAxes) line = matplotlib.lines.Line2D([xmin, xmax], [yrel, yrel], transform = trans, <whatever like color = 'r'>) line.y_isdata = False axes.add_line(line) The code is taken from axes.py:Axes.axhline() with some alterations. Friedrich 
From: Gökhan Sever <gokhansever@gm...>  20100318 20:26:40

On Thu, Mar 18, 2010 at 7:01 AM, Philippe Crave <philippe.crave@...>wrote: > Hello, > > the following will display a figure with a plot. the figure will embed > the classic toolbar. > > import matplotlib.pyplot as plt > import numpy as np > x=np.arange(0, 1, 0.1) > fig = plt.figure() > ax = fig.add_subplot(111) > ax.plot(x) > plt.show() > > from there, is it possible to add new buttons to the toolbar ? with > new fonction ? > or do I have to embed everythong in wxPython, GTK or others ? > > thank you, > Philippe > Hi Pierre Raybaut a nice extension for what you are asking. You will need to use Qt4Agg backend to use it. The code is at http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/backends/qt4_editor/ He doesn't seem like planning to add more onto this extension ( http://code.google.com/p/spyderlib/issues/detail?id=136) This said, his code is easy to read and you should easily be able to extend it according to your need.  Gökhan 
From: Sven Duscha <duscha@as...>  20100318 20:23:11

I tried to follow the instructions given on http://blog.hyperjeff.net/?p=160 and modified the make.osx accordingly to compile matplotlib on OS X 10.6.2 (Snow Leopard). But after executing sudo make f make.osx fetch deps mpl_build mpl_install I get the following error message: I had compiled and installed tar from source, so it could be that my tar is missing a binding, but otherwise I could do "tar xfz <file.tar.gz>" on gzip files. zlib and bunzip2 are also installed on my system. If I do a "cat make.osx  grep tar" to find the possible location of the error in the makefile, I only get: rm rf zlib${ZLIBVERSION}.tar.gz libpng${PNGVERSION}.tar.bz2 \ freetype${FREETYPEVERSION}.tar.bz2 bdist_mpkg${BDISTMPKGVERSION}.tar.gz \ ${PYTHON} c 'import urllib; urllib.urlretrieve("http://www.zlib.net/zlib${ZLIBVERSION}.tar.gz";, "zlib${ZLIBVERSION}.tar.gz")' &&\ ${PYTHON} c 'import urllib; urllib.urlretrieve("http://internap.dl.sourceforge.net/sourceforge/libpng/libpng${PNGVERSION}.tar.bz2";, "libpng${PNGVERSION}.tar.bz2")' &&\ ${PYTHON} c 'import urllib; urllib.urlretrieve("http://download.savannah.gnu.org/releases/freetype/freetype${FREETYPEVERSION}.tar.bz2";, "freetype${FREETYPEVERSION}.tar.bz2")' tar xvfz zlib${ZLIBVERSION}.tar.gz &&\ tar xvfj libpng${PNGVERSION}.tar.bz2 tar xvfj freetype${FREETYPEVERSION}.tar.bz2 &&\ which doesn't give me any hint, since all this formats should be support. Did anyone encounter this problem? 
From: <tomislav_maric@gm...>  20100318 19:41:58

Thanks, adding the axes ([0,0,1,1]) helped! :) I'll just be careful so that my calculation domain is from 0  1 in x and y direction, this is something I have to do anyway. This will definitely work! Thanks again, Tomislav  Original Message  From: Friedrich Romstedt Sent: 03/17/10 07:18 PM To: tomislav_maric@... Subject: Re: [Matplotlibusers] figure: centering data and plot.svg borders Maybe: from matplotlib import pyplot as plt figureOne = plt.figure() axesOne = figureOne.add_axes([0, 0, 1, 1]) axesOne.plot([1, 1], [2, 2]) axesOne.plot([2, 2], [1, 1]) axesOne.set_xlim((3, 3)) axesOne.set_ylim((3, 3)) figureOne.set_figwidth(2) figureOne.set_figheight(2) plt.savefig("Friedrich.png") Friedrich 
From: David <ldl08@gm...>  20100318 19:34:38

Dear Mike, dear list, thanks for the continued help! Here are my 'news': On 18/03/10 22:22, Michael Droettboom wrote: >> import matplotlib >> matplotlib.use('GtkCairo') >> >> Incidentally, if I uncomment those two lines, then the (Western) font >> of my graph actually changes. > I'm completely stumped by this. Just now I couldn't reproduce this. However, the fonts in the png and eps are quite different. When I run my dea.py with the attached matplotlibrc, then I get both a png and an eps, however, the Chinese is still not rendered (see attachments) I noticed the following in the ~rc: cairo.format : png # png, ps, pdf, svg But having it in or out makes no difference. I > do see in the matplotlibrc that you attached that the "TkAgg" backend is > being specified, not "GtkCairo". I changed this now. > > I am able to get the Cairo backend to work just fine using matplotlib > 0.99.0. What version of cairo and pycairo do you have installed? pythoncairo: 1.8.61ubuntu1 In [15]: cairo.version Out[15]: '1.8.6' I wasn't able to find pycairo on my system (even after installing pythoncairodev). I belive pycairo and pythoncairo are in fact the same thing. Google found this: "Just for your info if your interested in programming with cairo on ubuntu. I wanted to add svg, ps and pdf support to cairo (the ubuntu packages don't support these cairo render backends yet.)" https://wiki.ubuntu.com/CairoPythonUbuntu Could this be the reason for my troubles (under Ubuntu)? >>>> ps.fonttype=42 >>>> pdf.fonttype=42 >> >> I haven taken those out again, because I got an error message. > The error message may be related to using '=' rather than a ':'. In any > case, these settings don't affect by the Cairo backend so should have no > effect. I changed the = for a colon, yielding a nasty message: david@...:~/Documents/PhD/Dissertation/LaTeX/figures$ python dea.py /usr/lib/pymodules/python2.6/matplotlib/__init__.py:653: UserWarning: Duplicate key in file "/etc/matplotlibrc", line #329 warnings.warn('Duplicate key in file "%s", line #%d'%(fname,cnt)) Hopefully we will get to the bottom of this! I am sorry to bother you with all this  and appreciate your efforts! Greeting from Beijing, David 
From: Chloe Lewis <chlewis@be...>  20100318 18:30:05

Oh, nice. I've been flagging particularly usefullooking answers on the matplotlib mailing list for a while; I have four or five hundred marked. I don't want to do all the cleanup to make them an inoculant for a new site, but perhaps they would be useful for people to do a few each or throw in their own favorites? modulo concerns over attribution, etc Chloe On Mar 18, 2010, at 18 Mar, 10:20 AM, Gökhan Sever wrote: > Hello, > > Please tolerate my impatience for being the first announcing the new > discussion platform :) and my crossposting over the lists. > > The new site is beating at ask.scipy.org . David WardeFarley is > moving the questions from the oldsite at advice.mechanicalkern.com > (announced at SciPy09 by Robert Kern) > > We welcome you to join the discussions there. I have kickedoff the > new questions chain by http://ask.scipy.org/en/topic/11whatisyourfavoritenumpyfeature > (Also crossposted at http://stackoverflow.com/questions/2471872/whatisyourfavoritenumpyfeature > to pull more attention to ask.scipy) > > Please share your questions and comments, and have fun with your > discussions. > >  > Gökhan >  > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and finetune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intelswdev_______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers Chloe Lewis Graduate student, Amundson Lab Ecosystem Sciences 137 Mulford Hall Berkeley, CA 947203114 http://nature.berkeley.edu/~chlewis 
From:  <random.seed@we...>  20100318 17:42:46

Hello, I am trying to plot multiple intersecting lines from a given array. In order to visualize the amount of crossing points I am setting a certain alpha. However the crossings do not get darker as I expected. That is what I tried:: import numpy as np import matplotlib.pyplot as plt x = np.random.randn(1000) y = np.random.randn(1000) plt.plot(x, y, alpha=.2, lw=1) plt.show() What is the right way to do it? Thanks & cheers, Moritz 
From: Gökhan Sever <gokhansever@gm...>  20100318 17:20:59

Hello, Please tolerate my impatience for being the first announcing the new discussion platform :) and my crossposting over the lists. The new site is beating at ask.scipy.org . David WardeFarley is moving the questions from the oldsite at advice.mechanicalkern.com (announced at SciPy09 by Robert Kern) We welcome you to join the discussions there. I have kickedoff the new questions chain by http://ask.scipy.org/en/topic/11whatisyourfavoritenumpyfeature (Also crossposted at http://stackoverflow.com/questions/2471872/whatisyourfavoritenumpyfeatureto pull more attention to ask.scipy) Please share your questions and comments, and have fun with your discussions.  Gökhan 
From: Ciarán Mooney <general.mooney@go...>  20100318 15:10:28

Hi, I am trying to create an image from an array using PIL, numpy and a colourmap from matplotlib. I got the colourmap by using ipython and the following code colourmap = [] for i in xrange(256): r,g,b,a = cm.jet(i) r = int(round((r * 255),0)) g = int(round((g * 255),0)) b = int(round((b* 255),0)) colourmap.append((r,g,b)) The following is used to plot an array: def array2image(array, scale="log", filename="tmp"): # create image of the correct size new_image = Image.new("RGB", array.shape) # scan through a matrix and use Image.putdata() to put it in. x_size, y_size = array.shape largest = array.max() a_list = array.ravel() new_list = [] for x in a_list: if x == 0: new_list.append((0,0,0)) else: value = (log(x)/log(largest))*255 value = int(round(value,0)) value = blues_colourmap[value] #print value new_list.append(value) new_image.putdata(new_list) new_image.save(filename+".bmp") The image that is outputted is certainly correct for the data, however it is just no where near as "pretty" as the image you get from using plt.imshow(am_array) I'd like to get something that looks the same. I don't think the problems are because of the colourmap but rather because of my log scaling. Could someone please explain how matplotlib scales the image to make it look so nice? Regards, Ciarán 
From: Armin Moser <armin.moser@st...>  20100318 15:07:13

Hi, you can create your supporting points on a regular r, phi grid and transform them then to cartesian coordinates: from mpl_toolkits.mplot3d import Axes3D import matplotlib import numpy as np from matplotlib import cm from matplotlib import pyplot as plt step = 0.04 maxval = 1.0 fig = plt.figure() ax = Axes3D(fig) # create supporting points in polar coordinates r = np.linspace(0,1.25,50) p = np.linspace(0,2*np.pi,50) R,P = np.meshgrid(r,p) # transform them to cartesian system X,Y = R*np.cos(P),R*np.sin(P) Z = ((R**2  1)**2) ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) ax.set_zlim3d(0, 1) ax.set_xlabel(r'$\phi_\mathrm{real}$') ax.set_ylabel(r'$\phi_\mathrm{im}$') ax.set_zlabel(r'$V(\phi)$') ax.set_xticks([]) plt.show() hth Armin klukas schrieb: > I'm guessing this is currently impossible with the current mplot3d > functionality, but I was wondering if there was any way I could generate a > 3d graph with r, phi, z coordinates rather than x, y, z? > > The point is that I want to make a figure that looks like the following: > http://upload.wikimedia.org/wikipedia/commons/7/7b/Mexican_hat_potential_polar.svg > > Using the x, y, z system, I end up with something that has long tails like > this: > http://upload.wikimedia.org/wikipedia/commons/4/44/Mecanismo_de_Higgs_PH.png > > If I try to artificially cut off the data beyond some radius, I end up with > jagged edges that are not at all visually appealing. > > I would appreciate any crazy ideas you can come up with. > > Thanks, > Jeff > > P.S. Code to produce the ugly jaggedness is included below: > >  > from mpl_toolkits.mplot3d import Axes3D > import matplotlib > import numpy as np > from matplotlib import cm > from matplotlib import pyplot as plt > > step = 0.04 > maxval = 1.0 > fig = plt.figure() > ax = Axes3D(fig) > X = np.arange(maxval, maxval, step) > Y = np.arange(maxval, maxval, step) > X, Y = np.meshgrid(X, Y) > R = np.sqrt(X**2 + Y**2) > Z = ((R**2  1)**2) * (R < 1.25) > ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) > ax.set_zlim3d(0, 1) > #plt.setp(ax.get_xticklabels(), visible=False) > ax.set_xlabel(r'$\phi_\mathrm{real}$') > ax.set_ylabel(r'$\phi_\mathrm{im}$') > ax.set_zlabel(r'$V(\phi)$') > ax.set_xticks([]) > plt.show() >  Armin Moser Institute of Solid State Physics Graz University of Technology Petersgasse 16 8010 Graz Austria Tel.: 0043 316 873 8477 
From: Jeff Klukas <klukas@wi...>  20100318 15:00:34

The code below works perfectly. I think this should be included as an mplot3d codex. I'll look into what's required to submit a new example to the documentation. Thanks Armin!  Jeff Klukas, Research Assistant, Physics  University of Wisconsin  Madison  jeff.klukas@...  jeffyklukas@...  jeffklukas@...  http://www.hep.wisc.edu/~jklukas/ On Thu, Mar 18, 2010 at 9:42 AM, Armin Moser <armin.moser@...> wrote: > Hi, > > you can create your supporting points on a regular r, phi grid and > transform them then to cartesian coordinates: > > from mpl_toolkits.mplot3d import Axes3D > import matplotlib > import numpy as np > from matplotlib import cm > from matplotlib import pyplot as plt > step = 0.04 > maxval = 1.0 > fig = plt.figure() > ax = Axes3D(fig) > > # create supporting points in polar coordinates > r = np.linspace(0,1.25,50) > p = np.linspace(0,2*np.pi,50) > R,P = np.meshgrid(r,p) > # transform them to cartesian system > X,Y = R*np.cos(P),R*np.sin(P) > > Z = ((R**2  1)**2) > ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) > ax.set_zlim3d(0, 1) > ax.set_xlabel(r'$\phi_\mathrm{real}$') > ax.set_ylabel(r'$\phi_\mathrm{im}$') > ax.set_zlabel(r'$V(\phi)$') > ax.set_xticks([]) > plt.show() > > hth > Armin > > > klukas schrieb: >> I'm guessing this is currently impossible with the current mplot3d >> functionality, but I was wondering if there was any way I could generate a >> 3d graph with r, phi, z coordinates rather than x, y, z? >> >> The point is that I want to make a figure that looks like the following: >> http://upload.wikimedia.org/wikipedia/commons/7/7b/Mexican_hat_potential_polar.svg >> >> Using the x, y, z system, I end up with something that has long tails like >> this: >> http://upload.wikimedia.org/wikipedia/commons/4/44/Mecanismo_de_Higgs_PH.png >> >> If I try to artificially cut off the data beyond some radius, I end up with >> jagged edges that are not at all visually appealing. >> >> I would appreciate any crazy ideas you can come up with. >> >> Thanks, >> Jeff >> >> P.S. Code to produce the ugly jaggedness is included below: >> >>  >> from mpl_toolkits.mplot3d import Axes3D >> import matplotlib >> import numpy as np >> from matplotlib import cm >> from matplotlib import pyplot as plt >> >> step = 0.04 >> maxval = 1.0 >> fig = plt.figure() >> ax = Axes3D(fig) >> X = np.arange(maxval, maxval, step) >> Y = np.arange(maxval, maxval, step) >> X, Y = np.meshgrid(X, Y) >> R = np.sqrt(X**2 + Y**2) >> Z = ((R**2  1)**2) * (R < 1.25) >> ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) >> ax.set_zlim3d(0, 1) >> #plt.setp(ax.get_xticklabels(), visible=False) >> ax.set_xlabel(r'$\phi_\mathrm{real}$') >> ax.set_ylabel(r'$\phi_\mathrm{im}$') >> ax.set_zlabel(r'$V(\phi)$') >> ax.set_xticks([]) >> plt.show() >> > > >  > Armin Moser > Institute of Solid State Physics > Graz University of Technology > Petersgasse 16 > 8010 Graz > Austria > Tel.: 0043 316 873 8477 > 
From: Michael Droettboom <mdroe@st...>  20100318 14:23:03

David wrote: > Dear Michael, > > On 17/03/10 20:34, Michael Droettboom wrote: > >>> I have tried >>> >>> import matplotlib >>> matplotlib.use('GtkCairo') >>> >>> as you suggested, but they had no effect whatsoever. Even the error >>> output is the same. >> I'm surprised that isn't having any effect. The Cairo backend should not >> be running any code in backend_ps.py  where the source of the error >> is. If you put "backend: GtkCairo" in your matplotlibrc, does that work? > > No, in fact, after adding that line to matplotlibrc the CJK isn't even > rendered in the png anymore! * > > My error message has changed: > > In [1]: run dea.py > /usr/lib/pymodules/python2.6/matplotlib/backends/backend_gtk.py:614: > DeprecationWarning: Use the new widget gtk.Tooltip > self.tooltips = gtk.Tooltips() This is just a warning, and a benign one. It is not an exception as before. > > (this with "backend: GtkCairo" in matplotlibrc and the following two > lines in my dea.py: > > import matplotlib > matplotlib.use('GtkCairo') > > Incidentally, if I uncomment those two lines, then the (Western) font > of my graph actually changes. I'm completely stumped by this. The font rendering does look slightly different in the Cairo backend vs. the Agg backends, but I wouldn't expect major differences  the font choice itself should be the same. I do see in the matplotlibrc that you attached that the "TkAgg" backend is being specified, not "GtkCairo". I am able to get the Cairo backend to work just fine using matplotlib 0.99.0. What version of cairo and pycairo do you have installed? > >> What version of matplotlib are you running? > > In [2]: matplotlib.__version__ > Out[2]: '0.99.0' > >>> Note: in line 327 and 328 of the matplotlibrc I have added >>> >>> ps.fonttype=42 >>> pdf.fonttype=42 > > I haven taken those out again, because I got an error message. The error message may be related to using '=' rather than a ':'. In any case, these settings don't affect by the Cairo backend so should have no effect. I think this is just a problem related to configuration. Once you get the Cairo backend selected (and confirm that is the case), then hopefully all will work. Mike > > I continue to be at a loss! > > David > > * I had the same problem yesterday, I solved it by reinstalling a > backup of matplotlibrc. Weird. > > >>> >>> whereas I have uncommented >>> >>> pdf.fonttype : 3 >>> >>> Any ideas? I would most welcome any hint and suggestion! >> I don't think these settings will resolve the problem  either font >> type (42 or 3) still expects glyph names. >> >> Mike >>> >>> >>> >>> >>> On 17/03/10 04:15, Michael Droettboom wrote: >>>> The font you are using (SimHei) does not have any glyph names  these >>>> are used in the Postscript backend to refer to glyphs outside of the >>>> ASCII range. More specifically, it looks like it has at least one >>>> invalid glyph name (glyph names can only contain ASCII characters)  >>>> loading it in FontForge complains about this. I haven't come across >>>> such >>>> a font before, but maybe that's common in CJK fonts. I don't know. I'm >>>> looking through the spec to find a way that glyphs can be referenced >>>> without a name, but I'm not finding one. Note, the PDF backend has the >>>> same issue. >>>> >>>> Do you have the same problem if you remove "SimHei" from the >>>> font.sansserif list and thus use "Adobe Song Std" instead? (I was >>>> able >>>> to find an online download of SimHei to test with, but not Adobe Song >>>> Std). >>>> >>>> As a workaround, the Cairo backend seems to handle this font just >>>> fine. >>>> You can add >>>> >>>> import matplotlib >>>> matplotlib.use('GtkCairo') >>>> >>>> to the top of your script. >>>> >>>> Mike >>>> >>>> David wrote: >>>>> Hello everybody, >>>>> >>>>> I have a final problem with my graph. As a last step I produce an >>>>> *.eps file that I use in conjunction with LaTeX. >>>>> >>>>> Here is the last part of my code: >>>>> >>>>> # plt.title('Title') >>>>> xlab = plt.xlabel(u'输入 1') >>>>> #xlab.set_position((0.2, 0.1)) >>>>> ylab = plt.ylabel(u'输入 2') >>>>> plt.grid(True) >>>>> plt.subplots_adjust(bottom=0.2) >>>>> plt.show() >>>>> plt.savefig('dea.eps') >>>>> >>>>> >>>>> plt.show() produces the correct output, >>>>> >>>>> but >>>>> >>>>> plt.savefig('dea.eps') produces an error (the error message is >>>>> attached). >>>>> >>>>> The error is clearly linked to the Chinese, as it runs through if I >>>>> take the Chinese out of the code. >>>>> Also, plt.savefig('dea.png') works fine. >>>>> >>>>> Could anyone indicate where I would have to look for the mistake? The >>>>> matplotlibrc should be fine, but I am not sure. >>>>> >>>>> Your help would be greatly appreciated! >>>>> >>>>> Many thanks, >>>>> >>>>> David >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>  >>>>> >>>>> >>>>> >>>>>  >>>>> >>>>> >>>>> >>>>> Download Intel® Parallel Studio Eval >>>>> Try the new software tools for yourself. Speed compiling, find bugs >>>>> proactively, and finetune applications for parallel performance. >>>>> See why Intel Parallel Studio got high marks during beta. >>>>> http://p.sf.net/sfu/intelswdev >>>>>  >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Matplotlibusers mailing list >>>>> Matplotlibusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/matplotlibusers >>>> >>> >>> >>>  >>> >>> >> >  Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA 
From: Ben Axelrod <BAxelrod@co...>  20100318 14:17:39

I don't see a reason why this can't be implemented. It is probably pretty simple to change the surface plot code to use a polar grid instead of a rectangular grid. Of course this won't change the look of the rectangular axes, but maybe that is not a problem. I invite you to take a shot at implementing this. You will find the mplot3d code pretty straightforward. (And a lot smaller than you might expect). Ben Original Message From: klukas [mailto:klukas@...] Sent: Wednesday, March 17, 2010 4:34 PM To: matplotlibusers@... Subject: [Matplotlibusers] Polar 3D plot? I'm guessing this is currently impossible with the current mplot3d functionality, but I was wondering if there was any way I could generate a 3d graph with r, phi, z coordinates rather than x, y, z? The point is that I want to make a figure that looks like the following: http://upload.wikimedia.org/wikipedia/commons/7/7b/Mexican_hat_potential_polar.svg Using the x, y, z system, I end up with something that has long tails like this: http://upload.wikimedia.org/wikipedia/commons/4/44/Mecanismo_de_Higgs_PH.png If I try to artificially cut off the data beyond some radius, I end up with jagged edges that are not at all visually appealing. I would appreciate any crazy ideas you can come up with. Thanks, Jeff P.S. Code to produce the ugly jaggedness is included below:  from mpl_toolkits.mplot3d import Axes3D import matplotlib import numpy as np from matplotlib import cm from matplotlib import pyplot as plt step = 0.04 maxval = 1.0 fig = plt.figure() ax = Axes3D(fig) X = np.arange(maxval, maxval, step) Y = np.arange(maxval, maxval, step) X, Y = np.meshgrid(X, Y) R = np.sqrt(X**2 + Y**2) Z = ((R**2  1)**2) * (R < 1.25) ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) ax.set_zlim3d(0, 1) #plt.setp(ax.get_xticklabels(), visible=False) ax.set_xlabel(r'$\phi_\mathrm{real}$') ax.set_ylabel(r'$\phi_\mathrm{im}$') ax.set_zlabel(r'$V(\phi)$') ax.set_xticks([]) plt.show()  View this message in context: http://old.nabble.com/Polar3Dplottp27937798p27937798.html Sent from the matplotlib  users mailing list archive at Nabble.com.  Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and finetune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intelswdev _______________________________________________ Matplotlibusers mailing list Matplotlibusers@... https://lists.sourceforge.net/lists/listinfo/matplotlibusers 
From: Philippe Crave <philippe.crave@gm...>  20100318 12:01:15

Hello, the following will display a figure with a plot. the figure will embed the classic toolbar. import matplotlib.pyplot as plt import numpy as np x=np.arange(0, 1, 0.1) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(x) plt.show() from there, is it possible to add new buttons to the toolbar ? with new fonction ? or do I have to embed everythong in wxPython, GTK or others ? thank you, Philippe 
From: Werner F. Bruhin <werner.bruhin@fr...>  20100318 08:04:23

Looking at set_ticks_position doc it says that "default" will reset ticks to be on both sides and labels on left, and set_label_position only allows for left or right. Is there any way to have ticks and ticks labels on both left and right? Werner 
From: Gökhan Sever <gokhansever@gm...>  20100318 03:21:05

On Wed, Mar 17, 2010 at 9:29 PM, Vincent Davis <vincent@...>wrote: > I am doing a fairly basic plot plot(ydata) but would like to condition the > marker on another array, for example if I have ydata and markerdata then for > markerdata > 0 use use a '+' and for markerdata <0 use a '' and for > markerdata = 0 '.' > > How do I do this? > This is my solution. The main idea is based on using numpy array masking. import numpy as np import matplotlib.pyplot as plt x = np.arange(100) a = np.arange(50,50) plt.plot(x[a>0], a[a>0], "+") plt.plot(x[a==0], a[a==0], ".") plt.plot(x[a<0], a[a<0], "") plt.show()  Gökhan 
From: Vincent Davis <vincent@vi...>  20100318 02:58:07

I am doing a fairly basic plot plot(ydata) but would like to condition the marker on another array, for example if I have ydata and markerdata then for markerdata > 0 use use a '+' and for markerdata <0 use a '' and for markerdata = 0 '.' How do I do this? *Vincent Davis 7203013003 * vincent@... my blog <http://vincentdavis.net>;  LinkedIn<http://www.linkedin.com/in/vincentdavis>; 