[Matplotlib-users] Another Gnuplot style question
Okay, I am another gnuplot user trying to migrate over to matplotlib. I like what I see, but there are a couple things that are very easy to do in Gnuplot that I can't figure out how to do with matplotlib. I have a file with 3 columns of data called data.txt that looks like: 0. 1. 1.0 0.0634 1.0655 1.1353 0.1269 1.1353 1.28899916094 0.1903 1.2097 1.46345358199 0.2538 1.2889 1.6615188369 0.3173 1.3734 1.88639043926 ... I can plot this data, 2 versus 1 and 3 versus 1, very easily on the same plot, with a legend, with log y values, and only for the xrange between 2 and 3 with gnuplot: set log y set xrange[2:3] plot 'data.txt' u 1:2 w l t 'apples', 'data.txt' u 1:3 w l t 'oranges' Now, how do I do that same thing with matplotlob? Ie: 1. Both graphs overlayed on the same plot. 2. Semilogy. (log y values), 3. Only ploy for x in the range 2-3. 4. Legend for the two graphs on same plot. I have spent time looking through the documentation but I can't find anyway to do this is any straightforward way. plotfile() looks promising, but I can't seem to make it do the above. Thanks in advance. Joseph Smidt -- Joseph Smidt Physics and Astronomy 4129 Frederick Reines Hall Irvine, CA 92697-4575 Office: 949-824-3269 -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Font size and savefig
On Tue, Apr 28, 2009 at 11:09 PM, John Hunter wrote: > If you want the relative fontsizes in the figure window and saved figure to > agree, pass the same "dpi" to the figure command and savefig command. John, I thought the font size (which is specified in points) is independent of dpi, i.e., font size in "pixel" actually scales with the dpi. I think it should be filed as a bug if the relative font size depends on the dpi. Anyhow, I just did a quick test and the (relative) font size does not seem to vary with dpi. Thomas, What version of mpl are you using? With the mpl from the svn trunk, I don't see any significant change as you described. The WxAgg figure and the png output are actually drawn by an identical backend, so there should be no significant difference. There can be some subtle difference due to different dpi, but I don't see a difference as large as 30%. Can you post a some sample images? i.e., a screenshot of WxAgg figure and the png output. I can see that the text in pdf output occupies a bit larger area than png (when usetex=False), but, to me, this seems to be due to different amount of kernings (it seems that no kerning is applied for pdf text) instead of different font size. So, can you first check if the difference goes away when you use same dpi as John suggested? And if that is the case, can you try the latest svn and check if the relative font size still depends on the dpi? Regards, -JJ -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Font size and savefig
On Tue, Apr 28, 2009 at 9:52 PM, Thomas Robitaille < thomas.robitai...@gmail.com> wrote: > Hi, > > I am using the savefig method to save plots - however, I am finding > that the font size is systematically larger in the saved images than > in the WxAgg window. It seems that text is ~30% larger in PNG and PDF > files compared to the WxAgg display (relative to the axes box size). > This can be a little frustrating, as in some cases it can lead to > label overlap in the PNG file, when the displayed version looked fine. > The following script produces a PNG and a PDF file in which the font > size is ~30% larger than in the WxAgg display. > If you want the relative fontsizes in the figure window and saved figure to agree, pass the same "dpi" to the figure command and savefig command. JDH -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] overriding the save button
On Tue, Apr 28, 2009 at 10:01 PM, Thomas Robitaille < thomas.robitai...@gmail.com> wrote: > Hi John, > > Thanks for your help! > > I'm not sure how I should go about overriding the existing method. Say I > have the following custom savefig(): > > def savefig(self, evt): >print "Hello world" > > and a figure() instance fig, how do I actually tell > fig.canvas.manager.frame.toolbar.save to actually point to my custom > savefig? w/o having anything to test handy, the first thing to try is:: fig.canvas.manager.frame.toolbar.save = mysavefg where mysavefig is the function you define. JDH -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] overriding the save button
Hi John, Thanks for your help! I'm not sure how I should go about overriding the existing method. Say I have the following custom savefig(): def savefig(self, evt): print "Hello world" and a figure() instance fig, how do I actually tell fig.canvas.manager.frame.toolbar.save to actually point to my custom savefig? Thanks! Thomas On 28 Apr 2009, at 11:57, John Hunter wrote: > > > On Tue, Apr 28, 2009 at 8:21 AM, Thomas Robitaille > > wrote: > Hi, > > I was wondering if it is possible to override the 'save' button in > wxAgg so that once a filename has been specified in the dialog, a > custom function is run instead of the default savefig? Maybe this > would require too much hacking? > > > You could probably override the > matplotlib.backends.backend_wx.NavigationToolbar2.save function. If > you are using pylab/pyplot, this function is accessible as > > In [3]: fig.canvas.manager.frame.toolbar.save > Out[3]:>> > > and has the signature:: > > def save(self, evt): > > where evt is the GUI event that generated the callback (can safely > be ignored). > > If you are embedding mpl in wx directly, you can create your own > toolbar as in the embedding_in_wx* examples at > > http://matplotlib.sourceforge.net/examples/user_interfaces/ > index.html > > JDH -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] xlabel vertical positioning
Thanks! I could not find any documentation relating to this, so I was wondering whether it would be better to go with a well-documented function such as text or figtext? What would be best to use? Thomas On 28 Apr 2009, at 22:27, Yong-Duk Jin wrote: > You can use 'LABELPAD' to adjust label position. > e.g. > > import pylab > hAxes = pylab.axes() > pylab.xlabel('test') > hAxes.xaxis.LABELPAD = 0 > pylab.show() > > -- > Yong-Duk Jin > > On Tuesday 28 April 2009 14:08:50 Thomas Robitaille wrote: >> Hi, >> >> This is probably a simple question, but what is the best way to >> control the vertical positioning of the x-axis label? I tried: >> >> import matplotlib >> matplotlib.use('Agg') >> import matplotlib.pyplot as mpl >> >> fig = mpl.figure() >> ax = fig.add_subplot(111) >> ax.set_xlabel("Hello",position=(0.5,-0.2)) >> fig.savefig('test.png') >> >> But this doesn't work. Strangely, changing the first position element >> does shift the label left and right, but changing the second does not >> move the label vertically. >> >> I'm using matplotlib 0.98.5.2 >> >> Thanks for any advice! >> >> Thomas >> >> >> --- >> --- Register Now & Save for Velocity, the Web Performance & >> Operations >> Conference from O'Reilly Media. Velocity features a full day of >> expert-led, hands-on workshops and two days of sessions from industry >> leaders in dedicated Performance & Operations tracks. Use code >> vel09scf >> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf >> ___ >> Matplotlib-users mailing list >> Matplotlib-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > -- > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code > vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Font size and savefig
Hi, I am using the savefig method to save plots - however, I am finding that the font size is systematically larger in the saved images than in the WxAgg window. It seems that text is ~30% larger in PNG and PDF files compared to the WxAgg display (relative to the axes box size). This can be a little frustrating, as in some cases it can lead to label overlap in the PNG file, when the displayed version looked fine. The following script produces a PNG and a PDF file in which the font size is ~30% larger than in the WxAgg display. --- from matplotlib.font_manager import FontProperties import matplotlib.pyplot as mpl fig = mpl.figure() ax = fig.add_subplot(111) font = FontProperties() font.set_size('small') for tick in ax.get_xticklabels(): tick.set_fontproperties(font) for tick in ax.get_yticklabels(): tick.set_fontproperties(font) ax.set_xlabel("Hello") ax.set_ylabel("World") fig.canvas.draw() fig.savefig('test.png') fig.savefig('test.pdf') -- Is there a way to ensure that the font sizes are as close as possible in the files to what is displayed? Thanks, Thomas -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] xlabel vertical positioning
You can use 'LABELPAD' to adjust label position. e.g. import pylab hAxes = pylab.axes() pylab.xlabel('test') hAxes.xaxis.LABELPAD = 0 pylab.show() -- Yong-Duk Jin On Tuesday 28 April 2009 14:08:50 Thomas Robitaille wrote: > Hi, > > This is probably a simple question, but what is the best way to > control the vertical positioning of the x-axis label? I tried: > > import matplotlib > matplotlib.use('Agg') > import matplotlib.pyplot as mpl > > fig = mpl.figure() > ax = fig.add_subplot(111) > ax.set_xlabel("Hello",position=(0.5,-0.2)) > fig.savefig('test.png') > > But this doesn't work. Strangely, changing the first position element > does shift the label left and right, but changing the second does not > move the label vertically. > > I'm using matplotlib 0.98.5.2 > > Thanks for any advice! > > Thomas > > > --- >--- Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] First public release of APLpy
We are pleased to announce the first public beta release of APLpy, a python module that makes it easy to interactively produce publication-quality plots of astronomical images in FITS format. More details are available at http://aplpy.sourceforge.net/ >From the front page you can sign up to the mailing list and/or the Twitter feed to be kept up-to-date on future releases. About APLpy === APLpy (pronounced 'apple pie') can be used to: * Interactively or non-interactively produce publication-quality plots; * Show grayscale, colorscale, and 3-color RGB images; * Overlay any number of contour and marker sets; * Dynamically hide, show, and remove contour and marker layers; * Overlay coordinate grids; * Customize the appearance of labels and ticks; * Use LaTeX to typeset labels; * Pan, zoom, and save any view as a full publication-quality plot; * Save plots as EPS, PS, PDF, SVG, or PNG files; Noting that APLpy is still in beta development, you may encounter bugs and/or missing features. If this is the case, please let us know either by emailing us at astropyt...@gmail.com, or by leaving a bug report or feature request in the forums at: http://apps.sourceforge.net/phpbb/aplpy Cheers, Eli Bressert and Thomas Robitaille -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] overriding the save button
On Tue, Apr 28, 2009 at 8:21 AM, Thomas Robitaille < thomas.robitai...@gmail.com> wrote: > Hi, > > I was wondering if it is possible to override the 'save' button in > wxAgg so that once a filename has been specified in the dialog, a > custom function is run instead of the default savefig? Maybe this > would require too much hacking? You could probably override the matplotlib.backends.backend_wx.NavigationToolbar2.save function. If you are using pylab/pyplot, this function is accessible as In [3]: fig.canvas.manager.frame.toolbar.save Out[3]: >> and has the signature:: def save(self, evt): where evt is the GUI event that generated the callback (can safely be ignored). If you are embedding mpl in wx directly, you can create your own toolbar as in the embedding_in_wx* examples at http://matplotlib.sourceforge.net/examples/user_interfaces/index.html JDH -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
On Tue, Apr 28, 2009 at 9:51 AM, Jouni K. Seppänen wrote: > Bala subramanian writes: > > > Meanwhile i would like to know. Suppose if i install the latest mpl that > i > > just downloaded, will it overwrite the mpl version 0.98.1 previously > > installed with yum ? If not, when i give ipython -pylab, which version > will > > be loaded, I mean which version would be my default. > The yum version will be installed into something like /usr/lib/python2.5/site-packages/ and the version you install yourself will be put (by default) into /usr/local/lib/python2.5/site-packages/ (you can control this with the --prefix option to "python setup.py install"). If the /use/local version is in your PYTHONPATH before the /usr/lib version, you will get the newer version. You can check this by doing >>> import matplotlib >>> print matplotlib.__version__ >>> print matplotlib.__file__ JDH -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
Bala subramanian writes: > Meanwhile i would like to know. Suppose if i install the latest mpl that i > just downloaded, will it overwrite the mpl version 0.98.1 previously > installed with yum ? If not, when i give ipython -pylab, which version will > be loaded, I mean which version would be my default. That will depend on how Python is configured in Fedora (I have no idea) and what command-line options you use when you install matplotlib. See http://docs.python.org/install/ for the details. -- Jouni K. Seppänen http://www.iki.fi/jks -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
On Tue, Apr 28, 2009 at 15:26, Bala subramanian wrote: > Hi, > I think freetype is already installed in Fedora10. When i search yum as I said freetype2 *headers*, those files needed for development, not runtime support. Install the according packages for your distribution. -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
Hi, Thank you. I will install the headers and try again. Meanwhile i would like to know. Suppose if i install the latest mpl that i just downloaded, will it overwrite the mpl version 0.98.1 previously installed with yum ? If not, when i give ipython -pylab, which version will be loaded, I mean which version would be my default. Bala On Tue, Apr 28, 2009 at 3:32 PM, Sandro Tosi wrote: > On Tue, Apr 28, 2009 at 15:26, Bala subramanian > wrote: > > Hi, > > I think freetype is already installed in Fedora10. When i search yum as > > I said freetype2 *headers*, those files needed for development, not > runtime support. Install the according packages for your distribution. > > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
Bala subramanian writes: > I think freetype is already installed in Fedora10. When i search yum as > follows, yum says freetype is installed already. You probably need to install a package named freetype-devel (or something like that) to get the freetype headers you need for compiling matplotlib. -- Jouni K. Seppänen http://www.iki.fi/jks -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
Hi, I think freetype is already installed in Fedora10. When i search yum as follows, yum says freetype is installed already. *[r...@ramana cbala]# yum info freetype* Loaded plugins: refresh-packagekit Installed Packages Name : freetype Arch : i386 Version: 2.3.7 Release: 1.fc10 Size : 704 k Repo : installed Summary: A free and portable font rendering engine URL: http://www.freetype.org License: FTL or GPLv2+ Description: The FreeType engine is a free and portable font rendering engine, developed to provide advanced font support for a variety of : platforms and environments. FreeType is a library which can open and manages font files as well as efficiently load, hint and : render individual glyphs. FreeType is not a font server or a complete text-rendering library. Bala On Tue, Apr 28, 2009 at 3:10 PM, Sandro Tosi wrote: > On Tue, Apr 28, 2009 at 14:46, Bala subramanian > wrote: > > [r...@ramana matplotlib-0.98.5.2]# python setup.py build > > In file included from src/ft2font.cpp:1: > > src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared > > src/ft2font.h:31: error: ‘FT_Int’ has not been declared > > src/ft2font.h:31: error: ‘FT_Int’ has not been declared > > you're probably missing freetype2 headers. Please install all the > needed development packages required to build mpl. Check the > matplotlib documentation about building from source or the packages > used in building the Debian packages (for example). > > Regards, > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] overriding the save button
Hi, I was wondering if it is possible to override the 'save' button in wxAgg so that once a filename has been specified in the dialog, a custom function is run instead of the default savefig? Maybe this would require too much hacking? Thanks for any advice, Thomas -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation issue
On Tue, Apr 28, 2009 at 14:46, Bala subramanian wrote: > [r...@ramana matplotlib-0.98.5.2]# python setup.py build > In file included from src/ft2font.cpp:1: > src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared > src/ft2font.h:31: error: ‘FT_Int’ has not been declared > src/ft2font.h:31: error: ‘FT_Int’ has not been declared you're probably missing freetype2 headers. Please install all the needed development packages required to build mpl. Check the matplotlib documentation about building from source or the packages used in building the Debian packages (for example). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] xlabel vertical positioning
Hi Jouni, Thanks for your help! Following what you suggested, I've decided to use ax.text(0.5,-0.13,xlabel,transform =ax.transAxes,ha='center',va='center') Thanks, Thomas On 28 Apr 2009, at 01:39, Jouni K. Seppänen wrote: > Thomas Robitaille writes: > >> This is probably a simple question, but what is the best way to >> control the vertical positioning of the x-axis label? > > Matplotlib tries to set the vertical position automatically based on > how > tall the tick labels are - see how e.g. the commands > > setp(getp(gca(), 'xticklabels'), fontsize=2) > setp(getp(gca(), 'xticklabels'), fontsize=10) > setp(getp(gca(), 'xticklabels'), fontsize=20) > > affect the position. If you're not happy with that, I think your best > bet is to use figtext instead of xlabel, and perhaps file a bug in the > matplotlib tracker, explaining how the current positioning is > insufficient for your needs. > > -- > Jouni K. Seppänen > http://www.iki.fi/jks > > > -- > Register Now & Save for Velocity, the Web Performance & Operations > Conference from O'Reilly Media. Velocity features a full day of > expert-led, hands-on workshops and two days of sessions from industry > leaders in dedicated Performance & Operations tracks. Use code > vel09scf > and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] installation issue
Friends, I installed matplotlib in Fedora10 using yum which installed the version 0.98.1 .I could nt upgrade matplotlib using yum. Hence i downloaded the source and tried to install but i am getting the following error. Kindly write me what is going wrong. [r...@ramana matplotlib-0.98.5.2]# python setup.py build In file included from src/ft2font.cpp:1: src/ft2font.h:31: error: ‘FT_Bitmap’ has not been declared src/ft2font.h:31: error: ‘FT_Int’ has not been declared src/ft2font.h:31: error: ‘FT_Int’ has not been declared src/ft2font.h:77: error: expected ‘,’ or ‘...’ before ‘&’ token src/ft2font.h:77: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:83: error: expected ‘,’ or ‘...’ before ‘&’ token src/ft2font.h:83: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:122: error: ‘FT_Face’ does not name a type src/ft2font.h:123: error: ‘FT_Matrix’ does not name a type src/ft2font.h:124: error: ‘FT_Vector’ does not name a type src/ft2font.h:125: error: ‘FT_Error’ does not name a type src/ft2font.h:126: error: ‘FT_Glyph’ was not declared in this scope src/ft2font.h:126: error: template argument 1 is invalid src/ft2font.h:126: error: template argument 2 is invalid src/ft2font.h:127: error: ‘FT_Vector’ was not declared in this scope src/ft2font.h:127: error: template argument 1 is invalid src/ft2font.h:127: error: template argument 2 is invalid src/ft2font.h:133: error: ‘FT_BBox’ does not name a type src/ft2font.cpp:46: error: ‘FT_Library’ does not name a type src/ft2font.cpp:97: error: variable or field ‘draw_bitmap’ declared void src/ft2font.cpp:97: error: ‘FT_Bitmap’ was not declared in this scope src/ft2font.cpp:97: error: ‘bitmap’ was not declared in this scope src/ft2font.cpp:98: error: ‘FT_Int’ was not declared in this scope src/ft2font.cpp:99: error: ‘FT_Int’ was not declared in this scope /usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958: warning: ‘int _import_array()’ defined but not used error: command 'gcc' failed with exit status 1 Bala -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] warining with ipython
Hi, I was nt running any script of my own. This warning came when i was working on matplotlib-pyplot tutorials (simple plot and multiple line plots). Bala On Mon, Apr 27, 2009 at 10:42 PM, Sandro Tosi wrote: > On Mon, Apr 27, 2009 at 15:18, Bala subramanian > wrote: > > Hi, > > > > Version informations > > Python 2.5.2 > > IPython 0.8.4 > > matplotlib 0.98.1 > > this is a rather old version, you might want to try to upgrade to > 0.98.5.2 or a near release. > > > backend GTKAgg > > Running on Fedora10 > > could you please provide a simple script (along with configuration > files that applies to your executions) to replicate the issue? I can > speculate there some GUI mixture, but with code in front it's easier > :) > > Cheers, > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi > -- Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users