Re: [Matplotlib-users] plotting numbers on axes in scientific notation
Eric Firing wrote: > Fabrice Silva wrote: >> Le mardi 09 septembre 2008 à 08:26 -0400, Michael Droettboom a écrit : >>> You can use >>> >>> def ticklabel_format(self, **kwargs): >> It did not figure how to use that! >> I've tried in ipython : >> import numpy as np >> t = np.linspace(0,1,1024) >> f = np.sin(10*t)/1e5 >> plot(t,f) >> ax = gca() >> ax.ticklabel_format(style='sci', axis='y') > >ax.yaxis.major.formatter.set_powerlimits((0,0)) > >> show() >> >> but the yticklabels are still in plain notation... >> I've googled, but I still can not find where I am wrong! > > Yes, this is confusing. The problem is that the "scientific" style uses > scientific notation only for sufficiently large or small numbers, with > thresholds determined by the powerlimits parameter. The line I added > above will force scientific notation. > > The ticklabel_format method needs another kwarg to enable setting the > powerlimits. Done in svn 6148. I called the kwarg 'scilimits' to emphasize that it works with the 'sci' style; if there are comments to the effect that I should have called it 'powerlimits' for consistency with the corresponding ScalarFormatter method, I can change it. With the change in svn, instead of the line I added above, your call to ticklabel_format would be: ax.ticklabel_format(style='sci', scilimits=(0,0), axis='y') Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting numbers on axes in scientific notation
Fabrice Silva wrote: > Le mardi 09 septembre 2008 à 08:26 -0400, Michael Droettboom a écrit : >> You can use >> >> def ticklabel_format(self, **kwargs): > It did not figure how to use that! > I've tried in ipython : > import numpy as np > t = np.linspace(0,1,1024) > f = np.sin(10*t)/1e5 > plot(t,f) > ax = gca() > ax.ticklabel_format(style='sci', axis='y') ax.yaxis.major.formatter.set_powerlimits((0,0)) > show() > > but the yticklabels are still in plain notation... > I've googled, but I still can not find where I am wrong! Yes, this is confusing. The problem is that the "scientific" style uses scientific notation only for sufficiently large or small numbers, with thresholds determined by the powerlimits parameter. The line I added above will force scientific notation. The ticklabel_format method needs another kwarg to enable setting the powerlimits. Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] vertical padding in legend
John Hunter wrote: > On Tue, Sep 30, 2008 at 5:07 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: > >> The problem is already well explained by Eric. And my solution is to >> interpret the legend.pad as a fraction of the textsize (pad=0.3 seems >> to work fine in my eyes). Note that this breaks the backward >> compatibility. I personally think the original behavior may have >> produced unsatisfactory results in most of the cases and keeping it as >> a default may not be a good idea. While I hope others come out with an >> elegant solution, I prefer to break the API in this case. > > How about using a new kwarg and raising an exception if the old one is > passed in, with the exception pointing to the new arg? I am a little > uncomfortable silently changing the meaning of the old arg. Done, except that it just raises a warning, and still works with the old kwarg. The new kwarg is "borderpad"; it is used if pad==0, which is the new rc default. I set the default borderpad=0.5. There is still too much other positioning in legend that is based on axes units. I briefly tried to start changing others, again with additional kwargs, and things quickly fell apart. Legend needs considerable reworking to take full advantage of the transforms framework (and maybe other mpl improvements since the original legend) and to put all positioning kwargs and code in sensible units. It is amazing that the present code works as well as it does. The way to make a transition may be via a separate version for a while. There could be a single interface, with a kwarg to choose the version. Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Clear Figure
I guess you need to put draw() after plot() self.canvas.figure.clf() self.canvas.axes.plot([1.,2.,4.]) self.canvas.draw() Let us know if it does not help. -JJ On Sat, Oct 4, 2008 at 7:17 PM, rocha <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I need to clear the Figure after the user has clicked the some button in > PyQt, but when I try to plot the graphics again nothing appear. In > ipython it works, but when I try it inside my application it does not > work. What am I missing? > > Inside my MplCanvas class (actually it is a QWidget - see > embedding_in_qt4.py in matplotlib examples file - user_interface) I have > this code: > > self.fig = Figure(figsize=(self.width, self.height), dpi=dpi) > > And then in my main application I'm trying to do: > > self.canvas.figure.clf() > self.canvas.draw() > self.canvas.axes.plot([1.,2.,4.]) > > and nothing is plotted. The Figure is totally gray. I tried to do the > same thing in embedding_in_qt4.py example, modifying some parts, but it > didn't work too. > > Do you have any suggestions? > > Thanks! > Best regards, > Bernardo M. Rocha > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] formatting figures for publciation
John Hunter wrote: > On Sat, Sep 27, 2008 at 1:04 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > >> Good answer, but there may be one exception. The Matlab function >> description indicates that it can produce eps files with the cmyk color >> space, which is indeed something that publishers tend to want, and >> something that we don't do. Whether Matlab does it well, and whether >> with some reasonable modification to the mpl ps backend we could do at >> least as well, I don't know. > > This is certainly something that would be nice to have. There was > some recent work on agg to support different colorspaces, I think CMYK > was among them, but it hasn't yet been contributed into the mainline > as far as I know. It would take quite a bit of work for us to support > a generic colorspace model, but it would be a nice feature John, Is it still true that we will not be able to take advantage of any agg improvements because of the agg license change? Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] vertical padding in legend
On Tue, Sep 30, 2008 at 5:07 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: > The problem is already well explained by Eric. And my solution is to > interpret the legend.pad as a fraction of the textsize (pad=0.3 seems > to work fine in my eyes). Note that this breaks the backward > compatibility. I personally think the original behavior may have > produced unsatisfactory results in most of the cases and keeping it as > a default may not be a good idea. While I hope others come out with an > elegant solution, I prefer to break the API in this case. How about using a new kwarg and raising an exception if the old one is passed in, with the exception pointing to the new arg? I am a little uncomfortable silently changing the meaning of the old arg. JDH - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Clear Figure
Hi Guys, I need to clear the Figure after the user has clicked the some button in PyQt, but when I try to plot the graphics again nothing appear. In ipython it works, but when I try it inside my application it does not work. What am I missing? Inside my MplCanvas class (actually it is a QWidget - see embedding_in_qt4.py in matplotlib examples file - user_interface) I have this code: self.fig = Figure(figsize=(self.width, self.height), dpi=dpi) And then in my main application I'm trying to do: self.canvas.figure.clf() self.canvas.draw() self.canvas.axes.plot([1.,2.,4.]) and nothing is plotted. The Figure is totally gray. I tried to do the same thing in embedding_in_qt4.py example, modifying some parts, but it didn't work too. Do you have any suggestions? Thanks! Best regards, Bernardo M. Rocha - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting loop refuses to update display on OS X
functions like raw_input blok the mianloop of some gui backends (e.g., gtk) but work fine with some other backend (although Tk is the only backend I know of). So my guess is that you used a different backend with 0.98.1. I guess you have a few options. * try different backend (Tk) with 0.98.3 * use ginput * or try a ginput-like routine that I made sometime ago which works okay with raw_input. http://sourceforge.net/mailarchive/message.php?msg_id=6e8d907b0803101609s7bd8fecaj851a6ecf1ab2a316%40mail.gmail.com IHTH, -JJ On Thu, Oct 2, 2008 at 5:18 PM, Zane Selvans <[EMAIL PROTECTED]> wrote: > I have a Python module that I've written with some pylab plotting > routines in it. One of them loops over a list of objects, generating > some plots based on the data associated with each list member in > turn. It's meant to be an interactive way to step through the list > and see what the things look like. > > I have the loop set up to wait for user input before going on to the > next object, using > > x = raw_input("press return for next fit: ") > > but for some reason, the plot window never updates. I've tried > putting both draw() and show() immediately > before the raw_input() line, and neither works. The plot only seems > to update when I ctrl-C out of the loop, and otherwise, I just get the > spinning beachball when I mouseover the plot. > > I'm using Matplotlib 0.98.3 on OS X (10.5.5) with the built-in python > from Apple I think (2.5.1). I'm calling the plotting routine from > ipython 0.8.3 using the -pylab option. > > The same script previously worked fine under Matplotlib 0.98.1 > > Other plotting routines from the same module seem to work fine - it's > only this plot within a loop that's giving me trouble. > > Any ideas? > > -- > Zane Selvans > Amateur Earthling > [EMAIL PROTECTED] > 303/815-6866 > http://zaneselvans.org > PGP Key: 55E0815F > > > > > > > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Problem in afm.py with 0.98.3
I have a problem with every matplot version since 0.90.1. One of my installed fonts causes afm.py to bail out. I am sure I reported this problem before without reaction. After I installed python 1.6 and a recent numpy 0.90.1 does not work anymore so I tried the latest again, and get the afm error again: > python -i -c "from matplotlib import pylab" /usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/__init__.py:96: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5, os, re, shutil, sys, warnings /usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/pytz/tzinfo.py:5: DeprecationWarning: the sets module is deprecated from sets import Set Found an unknown keyword in AFM header (was MetricsSets) Found an unknown keyword in AFM header (was IsBaseFont) Found an unknown keyword in AFM header (was IsCIDFont) Found an unknown keyword in AFM header (was StartDirection) Found an unknown keyword in AFM header (was EndDirection) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/pylab.py", line 206, in from matplotlib import mpl # pulls in most modules File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/mpl.py", line 2, in from matplotlib import axis File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/axis.py", line 9, in import matplotlib.font_manager as font_manager File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/font_manager.py", line 1129, in _rebuild() File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/font_manager.py", line 1120, in _rebuild fontManager = FontManager() File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/font_manager.py", line 910, in __init__ self.afmdict = createFontDict(self.afmfiles, fontext='afm') File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/font_manager.py", line 521, in createFontDict prop = afmFontProperty(font) File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/font_manager.py", line 420, in afmFontProperty name = font.get_familyname() File "/usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/afm.py", line 440, in get_familyname return self._header['FamilyName'] KeyError: 'FamilyName' >>> import pdb >>> pdb.pm() > /usr/local/lib/python2.6/site-packages/matplotlib-0.98.3-py2.6-linux-i686.egg/matplotlib/afm.py(440)get_familyname() -> return self._header['FamilyName'] (Pdb) print self._header {'Notice': 'Copyright (c) 1999 Ministry of Education, Taipei, Taiwan. All Rights Reserved.', 'Ascender': 880.0, 'FontBBox': [-123, -250, 1000, 880], 'Weight': 'Regular', 'Descender': -250.0, 'CharacterSet': 'Adobe-CNS1-0', 'IsFixedPitch': False, 'FontName': 'MOEKai-Regular', 'StartFontMetrics': 4.0996, 'CapHeight': 880.0, 'Version': '1.000', 'UnderlinePosition': -100, 'Characters': 13699, 'UnderlineThickness': 50, 'ItalicAngle': 0.0, 'StartCharMetrics': 13699} (Pdb) What is there to do? Regards Berthold -- A: Weil es die Lesbarkeit des Textes verschlechtert. F: Warum ist TOFU so schlimm? A: TOFU F: Was ist das größte Ärgernis im Usenet? - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting loop refuses to update display on OS X
I have a Python module that I've written with some pylab plotting routines in it. One of them loops over a list of objects, generating some plots based on the data associated with each list member in turn. It's meant to be an interactive way to step through the list and see what the things look like. I have the loop set up to wait for user input before going on to the next object, using x = raw_input("press return for next fit: ") but for some reason, the plot window never updates. I've tried putting both draw() and show() immediately before the raw_input() line, and neither works. The plot only seems to update when I ctrl-C out of the loop, and otherwise, I just get the spinning beachball when I mouseover the plot. I'm using Matplotlib 0.98.3 on OS X (10.5.5) with the built-in python from Apple I think (2.5.1). I'm calling the plotting routine from ipython 0.8.3 using the -pylab option. The same script previously worked fine under Matplotlib 0.98.1 Other plotting routines from the same module seem to work fine - it's only this plot within a loop that's giving me trouble. Any ideas? -- Zane Selvans Amateur Earthling [EMAIL PROTECTED] 303/815-6866 http://zaneselvans.org PGP Key: 55E0815F - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] upperlimits plot question
Hello, I am making some plots using the upperlimit keyword in the errorbar command as in the examples. The arrows are drawn correctly but I notice that the exact limit point is in the middle of the arrow and not where the arrow starts. Is it any way to improve it and have the beginning of the arrow represent the actual limit measure? Also is there any way to increase the thickness of the arrow? Thanks, Nino -- Antonino Cucchiara PhD candidate Department of Astronomy&Astrophysics Penn State University website: www.astro.psu.edu/~cucchiara/ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting numbers on axes in scientific notation
Le mardi 09 septembre 2008 à 08:26 -0400, Michael Droettboom a écrit : > You can use > > def ticklabel_format(self, **kwargs): It did not figure how to use that! I've tried in ipython : import numpy as np t = np.linspace(0,1,1024) f = np.sin(10*t)/1e5 plot(t,f) ax = gca() ax.ticklabel_format(style='sci', axis='y') show() but the yticklabels are still in plain notation... I've googled, but I still can not find where I am wrong! -- Fabrice Silva <[EMAIL PROTECTED]> LMA UPR CNRS 7051 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Multiple sub-plot goes off the top of the page
Peter: did John's solution fix your problem? DG - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] vertical padding in legend
Hi Jae-Joon, JL> I just had a quick look at this problem. And I'm posting a quick JL> solution in case Christoper haven't dig it yet. My figure looks great with these changes. Thank you very much! -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Citation for Numpy
Dear All, Does anyone know of a citation that I can use for Numpy? Thanks! and all the best, --Buz - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] formatting figures for publciation
> Thanks, but this wasn't quite what I had in mind. the exportfig m - > file trims the size of the white bounding box on the figure, in > addition to saving the image. Is there an easy way to do that with > matplotlib? If you produce pdf, pdfcrop is neat. Best, Martin -- Martin Lüthi [EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] formatting figures for publciation
On Sat, Sep 27, 2008 at 1:04 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > Good answer, but there may be one exception. The Matlab function > description indicates that it can produce eps files with the cmyk color > space, which is indeed something that publishers tend to want, and > something that we don't do. Whether Matlab does it well, and whether > with some reasonable modification to the mpl ps backend we could do at > least as well, I don't know. This is certainly something that would be nice to have. There was some recent work on agg to support different colorspaces, I think CMYK was among them, but it hasn't yet been contributed into the mainline as far as I know. It would take quite a bit of work for us to support a generic colorspace model, but it would be a nice feature JDH - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] formatting figures for publciation
Darren Dale wrote: > On Friday 26 September 2008 18:49:25 Gideon Simpson wrote: >> Is there anything akin to this MATLAB script: >> >> http://www.mathworks.com/company/newsletters/digest/june00/export/ >> >> available for mpl? or some simple set of commands that will >> accomplish the same task? > > matplotlib produces publication quality output, and I think you can reproduce > all the features of this script by simply modifying your rc parameters. Your > on-screen results should look like your eps output, most importantly you need > to set your figure.dpi according to your display size. Aside from that, have > a > look at the default matplotlibrc file for the many options you can customize. Good answer, but there may be one exception. The Matlab function description indicates that it can produce eps files with the cmyk color space, which is indeed something that publishers tend to want, and something that we don't do. Whether Matlab does it well, and whether with some reasonable modification to the mpl ps backend we could do at least as well, I don't know. Eric > > Darren - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] scipy, matplotlib import errors
Thanks. I haven't done this yet, but I think the problem may have been related to my locales setting. Presently all is working after editing /etc/sysconfig/i18n to update LC_CTYPE and other variables. Robert Kern-2 wrote: > > John [H2O] wrote: >> I wonder if I've misunderstood or made a mistake? I renamed a file: >> /usr/lib/python2.5/new.py to /usr/lib/python2.5/new.bak >> >> and everything worked... but now, after logging out and logging back in >> again, I'm getting the problem again? >> >> Perhaps that was the standard libraries module? But I cannot find any >> other >> new.py files? > > /usr/lib/python2.5/new.py is the standard library's module. Leave it > alone. If > you are still having problems and cannot find another new.py module > anywhere, > edit pkg_resources.py to print out new.__file__ just before where the > exception > occurs. > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless > enigma > that is made terrible by our own mad attempt to interpret it as though > it had > an underlying truth." >-- Umberto Eco > > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://www.nabble.com/scipy%2C-matplotlib-import-errors-tp16343711p19701831.html Sent from the matplotlib - users mailing list archive at Nabble.com. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] tcl/tk install problems
Folks, I am trying to install, in a private 'space', 0.98.3 on a linux x86-64 scientific cluster on which I am not the admin. tcl/tk is indeed installed, and I know where they are. matplotlib cannot find them. When running 'python setup.py build', tclConfig.sh and tkConfig.sh are on the path. It seems tcl/tk detection is a persistent issue, from searching the web. My head hurts right now on this, so I hope there's some kind of an answer. Some output: > python setup.py build BUILDING MATPLOTLIB matplotlib: 0.98.3 python: 2.5.2 (r252:60911, Sep 25 2008, 16:58:03) [GCC 4.1.2 20071124 (Red Hat 4.1.2-38)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.1.1 freetype2: 9.10.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.10 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 * Guessing the library and include directories for * Tcl and Tk because the tclConfig.sh and * tkConfig.sh could not be found and/or parsed. Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Qt: no Qt4: no Cairo: no - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] vertical padding in legend
Christopher Brown wrote: > Hi List, > > Attached is a closeup of two legends on a 2-panel figure. The first > legend has 10 plots listed, the second has 1. I have set each legend > identically: loc='upper right', pad=.3, handlelen=.1, handletextsep=.05. > But it seems that while the horizontal padding is the same, the vertical > padding is too large in the first legend, and too small in the second. > The only difference between the two I am aware of is the number of plots > listed (not contained in the axes, but listed in the legends). I'm using > version 0.98.3 on windows. Any ideas? This looks to me like a design flaw: the pad is "fractional" (fraction of legend box size), when logically it should be in something like units of legend text height, or possibly in points. This might be easy enough to change, although for backwards compatibility we would need to use a new kwarg. Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users