[Matplotlib-users] legend: axespad, pad, handlelen, labelsep - without effect
Hi, please open the legend_demo3: http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/legend_demo3.py 1. add this line: pylab.rc('legend', axespad=0.0, pad=0.0, handlelen=0.0, labelsep=0.0) 2. add this line: pylab.rc('legend', axespad=10.0, pad=10.0, handlelen=10.0, labelsep=10.0) Why all these parameters have no effect? -- View this message in context: http://www.nabble.com/legend%3A-axespad%2C-pad%2C-handlelen%2C-labelsep---without-effect-tp21087472p21087472.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mathtext acting weird under macosx backend
Can you please provide a screenshot of what you are seeing? I don't run Mac OS-X myself, so have no experience with the Mac OS-X-specific backend... however, it appears to be drawing regular text with native APIs (ATSUI etc.) and mathtext using matplotlib's freetype backend and blitting an image. If done correctly, there is no reason why one should be significantly lower quality than the other, but it is an obvious source of *difference*, particularly if font size is being handled differently in each case. I would suggest to Michiel de Hoon (author of Mac OS-X backend), to implement a full interface to mathtext for his backend (as PDF does, for instance) and do all glyph rendering with ATSUI, or the opposite -- do all glyph rendering by blitting freetype-rendered glyphs -- but not both. I have some concerns about the use of ATSUI, which, while arguably the better text system, will give different results than the Agg backends and cause cross-platform differences between plots, which is something in general we like to avoid. Cheers, Mike Zane Selvans wrote: First, *thank you* to whoever did the Mac OS X backend. It's much faster and smoother, and seems to behave much more reasonably all around. As in, show() actually does what it says it's supposed to do, and the figures don't have to be re-sized to draw themselves! However, there seems to be some kind of strangeness with using mathtext. When an axis label, tick label, title, or other text has any mathtext embedded within it, the font that the entire text object is rendered in changes, becoming larger, and often fuzzier (in an anti-aliased kind of way). On the plus (though confusing) side, the ticklabels that are being output by the basemap toolkit are now the same size as all my normal ticklabels, even though they appear to contain a mathtext character (the ^\circ for the degrees symbol), whereas previously, all the basemap ticklabels were coming out larger than the rest of my ticklabels, and I didn't seem to be able to alter them in the normal text object manipulation ways. I'm running on: Matplotlib SVN: v6677 Mac OS 10.5.6 macosx backend python 2.5.1 ipython 0.9.1 After I noticed this the first time, I quit out of the interpreter, and deleted the font cache from my .matplotlib directory, restarted, and the problem persisted. Any suggestions? I don't have any of the alternate tex rendering options set in my rcfile, just using plain mathtext. -- Zane Selvans Amateur Earthling z...@ideotrope.org mailto:z...@ideotrope.org 303/815-6866 http://zaneselvans.org PGP Key: 55E0815F -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend: axespad, pad, handlelen, labelsep - without effect
The legend class has been reimplemented recently and the name of some keyword arguments (and their meaning) has been changed. Those parameters you're using are deprecated ones. It is supposed to show you some warnings if deprecated parameters are used, so what you see is a bug. I'll take a look. I also noticed that the documentaion of the pylab.legend is outdated. Take a look at http://matplotlib.sourceforge.net/api/artist_api.html#module-matplotlib.legend These are lists of deprecated parameteres pad = None, # deprecated; use borderpad labelsep = None, # deprecated; use labelspacing handlelen = None, # deprecated; use handlelength handletextsep = None, # deprecated; use handletextpad axespad = None, # deprecated; use borderaxespad So, pylab.rc('legend', borderaxespad=0.0, borderpad=0.0, handlelength=0.0, labelspacing=0.0) should work. Thanks, -JJ On Fri, Dec 19, 2008 at 3:25 AM, Lebostein lebost...@gmx.de wrote: Hi, please open the legend_demo3: http://matplotlib.sourceforge.net/plot_directive/mpl_examples/pylab_examples/legend_demo3.py 1. add this line: pylab.rc('legend', axespad=0.0, pad=0.0, handlelen=0.0, labelsep=0.0) 2. add this line: pylab.rc('legend', axespad=10.0, pad=10.0, handlelen=10.0, labelsep=10.0) Why all these parameters have no effect? In this two cases I see the same plot... -- View this message in context: http://www.nabble.com/legend%3A-axespad%2C-pad%2C-handlelen%2C-labelsep---without-effect-tp21087472p21087472.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend: axespad, pad, handlelen, labelsep - without effect
On Fri, Dec 19, 2008 at 8:36 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote: The legend class has been reimplemented recently and the name of some keyword arguments (and their meaning) has been changed. Those parameters you're using are deprecated ones. It is supposed to show you some warnings if deprecated parameters are used, so what you see is a bug. I'll take a look. I also noticed that the documentaion of the pylab.legend is outdated. Take a look at Jae-Joon, I don't think these changes ever made it into doc/api/api_changes.rst. Could you update that file in the branch, and I'll push it out the web site. Thanks, JDH -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence
Hi, we got this Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148 Citing: the following python code creates a histogram with an x-axis range of 0.1 min to 0.3 max (based on the mins and maxes of the x rather than bin). the bins should be used to size the axis since the user specified that he wanted to see those specific bins (even though they are empty). note that the 'range=' option would be a potential solution, but it is ignored when bin is a sequence (presumably because the range would be chosen based on bin's limits, but this isn't so). from pylab import * x = [0.18,0.22,0.19] bin = [0,0.1,0.2,0.3,0.4,0.5] hist(x,bin) show() i believe that the x-axis ranges should instead be based on the mins and maxes of bin when it is a sequence. please forward this report upstream or let me know if you believe that it belongs there. thank you for your consideration I tested that this applies to 0.98.3. Is this a bug? Thanks, Ondrej -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence
Hello Ondrej, On Fri, Dec 19, 2008 at 18:18, Ondrej Certik ond...@certik.cz wrote: we got this Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148 ... I tested that this applies to 0.98.3. Is this a bug? This is fixed in the latest release (0.98.4 or in 0.98.5); I'm working on uploading it Debian, together with John and Michael (and all dev team), to have a feasable release. Cheers, -- Sandro Tosi (aka morph, Morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence
On Fri, Dec 19, 2008 at 6:34 PM, Sandro Tosi mo...@debian.org wrote: Hello Ondrej, On Fri, Dec 19, 2008 at 18:18, Ondrej Certik ond...@certik.cz wrote: we got this Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503148 ... I tested that this applies to 0.98.3. Is this a bug? This is fixed in the latest release (0.98.4 or in 0.98.5); I'm working on uploading it Debian, together with John and Michael (and all dev team), to have a feasable release. Ah, I didn't know you are on the mpl dev team as well. That's great. Ondrej -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence
On Fri, Dec 19, 2008 at 18:47, Ondrej Certik ond...@certik.cz wrote: On Fri, Dec 19, 2008 at 6:34 PM, Sandro Tosi mo...@debian.org wrote: This is fixed in the latest release (0.98.4 or in 0.98.5); I'm working on uploading it Debian, together with John and Michael (and all dev team), to have a feasable release. Ah, I didn't know you are on the mpl dev team as well. That's great. Oh no no: I bother them for something, and they (to force me to silence) release a fix :D Cheers, -- Sandro Tosi (aka morph, Morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] requesting for testing, os x installers
OK: Downloaded latest (Friday, Dec 19: 1200 Pacific Time) egg and mpkg from sourceforge: egg: * cleared out all previous installs and cleaned out easy_install.pth file. * easy_install matplotlib-0.98.5.2-py2.5.egg Whoo hoo! all works great! * cleared it all out again... * Installed the mpkg Whoo Hoo! another success! One note on the mpkg -- it's called: Matplotlib-0.98.5.2-py2.5-macosx10.5.mpkg but it seems to work fine on 10.4 as well as 10.5 -- perhaps a re-naming is in order to save some confusion. Mac OS-C 10.4.11 Dual G5 PPC - python.org Python 2.5.2 Thanks for everyone's work getting this put together. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend: axespad, pad, handlelen, labelsep - without effect
John, I updated api_chages.rst (but you'd better check my english). I also made a few changes so that a warning is issued when deprecated parameters are used in rc file. I deleted deprecated parameters in lib/matplotlib/rcsetup.py and also from lib/matplotlib/mpl-data/matplotlib.conf.template. I did my own test and it worked well for me, and I hope it does not cause any problem. Regards, -JJ On Fri, Dec 19, 2008 at 9:44 AM, John Hunter jdh2...@gmail.com wrote: On Fri, Dec 19, 2008 at 8:36 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote: The legend class has been reimplemented recently and the name of some keyword arguments (and their meaning) has been changed. Those parameters you're using are deprecated ones. It is supposed to show you some warnings if deprecated parameters are used, so what you see is a bug. I'll take a look. I also noticed that the documentaion of the pylab.legend is outdated. Take a look at Jae-Joon, I don't think these changes ever made it into doc/api/api_changes.rst. Could you update that file in the branch, and I'll push it out the web site. Thanks, JDH -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] FancyArrowPatch without annotate
On Wed, Dec 17, 2008 at 1:19 PM, Ken Schutte kts.li...@gmail.com wrote: It might be nice if eventually there were extra styles, e.g. -|, |-| for single lines with solid arrowheads This is now added in the trunk. -JJ -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] No such attribute error with PDF output
Given the following matplotlib program: ## import numpy as np import matplotlib.pyplot as plt x = np.arange(3) width = 0.35 hdfs = (292.97, 304.49, 305.47) bfs = (614.57, 706.02, 847.44) plt.subplot(111) hdfs_rects = plt.bar(x, hdfs, width, color='b') bfs_rects = plt.bar(x + width, bfs, width, color='g', hatch='/') plt.xticks(x + width, ('100 ls ops', '100 touch ops', '100 0k copy ops')) plt.ylabel('Time (sec)') plt.title('Metadata Performance') plt.legend((hdfs_rects[0], bfs_rects[0]), ('HDFS', 'BoomFS'), loc='upper right') plt.ylim([0, 1200]) plt.savefig('metadata_throughput.pdf') ## I see the following error using matplotlib 0.95.1: Traceback (most recent call last): File metadata_throughput.py, line 21, in module plt.savefig('metadata_throughput.pdf') File /opt/local/lib/python2.5/site-packages/matplotlib/pyplot.py, line 345, in savefig return fig.savefig(*args, **kwargs) File /opt/local/lib/python2.5/site-packages/matplotlib/figure.py, line 990, in savefig self.canvas.print_figure(*args, **kwargs) File /opt/local/lib/python2.5/site-packages/matplotlib/backend_bases.py, line 1419, in print_figure **kwargs) File /opt/local/lib/python2.5/site-packages/matplotlib/backend_bases.py, line 1313, in print_pdf return pdf.print_pdf(*args, **kwargs) File /opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_pdf.py, line 1883, in print_pdf self.figure.draw(renderer) File /opt/local/lib/python2.5/site-packages/matplotlib/figure.py, line 772, in draw for a in self.axes: a.draw(renderer) File /opt/local/lib/python2.5/site-packages/matplotlib/axes.py, line 1601, in draw a.draw(renderer) File /opt/local/lib/python2.5/site-packages/matplotlib/patches.py, line 301, in draw renderer.draw_path(gc, tpath, affine, rgbFace) File /opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_pdf.py, line 1248, in draw_path self.check_gc(gc, rgbFace) File /opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_pdf.py, line 1203, in check_gc delta = self.gc.delta(gc) File /opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_pdf.py, line 1813, in delta cmds.extend(cmd(self, *theirs)) File /opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_pdf.py, line 1725, in hatch_cmd name = self.file.hatchPattern(lst) File /opt/local/lib/python2.5/site-packages/matplotlib/backends/backend_pdf.py, line 945, in hatchPattern return pattern[0] AttributeError: Name instance has no attribute '__getitem__' If I change the savefig() call to emit EPS or PNG instead, e.g: plt.savefig('metadata_throughput.eps') The program works fine, and I get the output I'd expect. Does anyone have any suggestions about what's going wrong here? Thanks in advance, Neil -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] No such attribute error with PDF output
On Sat, Dec 20, 2008 at 1:32 AM, Neil Conway n...@cs.berkeley.edu wrote: I see the following error using matplotlib 0.95.1: Sorry: that should be 0.98.5.1. Neil -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users