Re: [Matplotlib-users] matplotlib and cron
Andre, my guess is that there's an attempt made to connect to the (non-existant) X server. You can disable this by forcing a backend that doesn't need the X server. Try import matplotlib matplotlib.use('Agg') before the rest of your script. Andre Wong wrote: Hi I am attempting to generate graphs using matplotlib/pyplot via a cron process. These scripts work perfectly fine when I am logged in and run the scripts on the command line, however they fail to run when they are set up as a cronjob. Even a simplified plotting routine does not work: from matplotlib.pylab import plot from matplotlib.pylab import savefig plot([1,2,3,4]) savefig('test.png') my crontab is configured like this: SHELL= /bin/tcsh 45 8 * * * cd [path to script]; python graphtest.py Thanks in advance, - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Easiest way of drawing a circle?
Hi, I'm using wxpython with matplotlib, I now have a figurecanvas embedded in my program and I can plot stuff using: a = self.fig.gca() a.plot(x,y) But what is the easiest and fastest way to draw a circle? I saw that the artist class has a draw_arc function.. but I don't know how to use the artist class with my figure canvas.. Like I can't do a.draw_arc() for instance ... Can anyone point me in the right direction? Thanks, Soren - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Easiest way of drawing a circle?
Søren Nielsen wrote: Hi, I'm using wxpython with matplotlib, I now have a figurecanvas embedded in my program and I can plot stuff using: a = self.fig.gca() a.plot(x,y) But what is the easiest and fastest way to draw a circle? I saw that the artist class has a draw_arc function.. but I don't know how to use the artist class with my figure canvas.. Like I can't do a.draw_arc() for instance ... Can anyone point me in the right direction? Thanks, Soren from matplotlib.patches import Circle cir = Circle( (0,0), radius=0.5) a.add_patch(cir) Manuel - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] adding a box (domain) on a basemap map
Hi Nicolas, The attached script should illustrate one way to solve your problem. Cheers, Scott Nicolas [EMAIL PROTECTED] 05/07/08 2:25 PM Hi all sorry for posting this question that might have been answered before, but I'm in the urgent need of finding a way to overlay a rectangular box on a basemap map (cylindrical projection) given the latitudes and longitudes of the domain. This is to delineate on a map the domain over which a index has been computed ... any quick answer welcome thanks -- _/\/̄̄\/\_ 33º49'45.24S 18º28'45.60E Dr. Nicolas Fauchereau post-doctoral fellow Oceanography Dept. University of Cape-Town Private Bag. 7701 Rondebosh Tel: 021 650 53 15 South Africa _/\/̄̄\/\_ 33º49'45.24S 18º28'45.60E Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/ bbox_test.py Description: Binary data - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pyplot.plotfile - bug report and extension proposal
Hello all, first of all I want to thank the developers for the plotfile-function. Nevertheless I would like to report a bug of the function and propose addional functionality. I added a patch including the following changes: - circumvent the NameError in the case of len(cols)==1 (N is not defined) - using fig = gcf() instead of fig = figure() to supress opening a new figure and therewith allowing to use the user preferred figure - added keyword argument 'names' to set x/ylabels in the case there are no names in the csv-file - changed the plotfile_demo.py accordingly I would be happy, if this is helpful to others too. regards Matthias Index: lib/matplotlib/pyplot.py === --- lib/matplotlib/pyplot.py (revision 5129) +++ lib/matplotlib/pyplot.py (working copy) @@ -1221,7 +1221,7 @@ return ret def plotfile(fname, cols=(0,), plotfuncs=None, - comments='#', skiprows=0, checkrows=5, delimiter=',', + comments='#', skiprows=0, checkrows=5, delimiter=',', names=None, **kwargs): plot the data in fname @@ -1245,7 +1245,7 @@ plotfuncs dictionary, eg integer column numbers in both or column names in both. -comments, skiprows, checkrows, and delimiter are all passed on to +comments, skiprows, checkrows, delimiter and names are all passed on to matplotlib.mlab.csv2rec to load the data into a record array. See the help there fore more information. @@ -1257,17 +1257,18 @@ plotfile(fname, (0,1,3)) # plot using column names; specify an alternate plot type for volume - plotfile(fname, ('date', 'volume', 'adj_close'), plotfuncs={'volume': 'semilogy'}) + plotfile(fname, ('date', 'volume', 'adj_close'), + plotfuncs={'volume': 'semilogy'}) -fig = figure() +fig = gcf() if len(cols)1: raise ValueError('must have at least one column of data') if plotfuncs is None: plotfuncs = dict() -r = mlab.csv2rec(fname, comments=comments, -skiprows=skiprows, checkrows=checkrows, delimiter=delimiter) +r = mlab.csv2rec(fname, comments=comments, skiprows=skiprows, + checkrows=checkrows, delimiter=delimiter, names=names) def getname_val(identifier): 'return the name and column data for identifier' @@ -1282,7 +1283,7 @@ xname, x = getname_val(cols[0]) if len(cols)==1: -ax1 = fig.add_subplot(N,1,i) +ax1 = gca() funcname = plotfuncs.get(cols[0], 'plot') func = getattr(ax1, funcname) func(x, **kwargs) @@ -1292,11 +1293,10 @@ for i in range(1,N): if i==1: ax = ax1 = fig.add_subplot(N-1,1,i) -ax.grid(True) else: ax = fig.add_subplot(N-1,1,i, sharex=ax1) -ax.grid(True) +ax.grid(True) yname, y = getname_val(cols[i]) Index: examples/plotfile_demo.py === --- examples/plotfile_demo.py (revision 5129) +++ examples/plotfile_demo.py (working copy) @@ -1,22 +1,34 @@ -from pylab import plotfile, show +from pylab import figure, plotfile, show fname = 'data/msft.csv' +fname2 = 'data/some_data.csv' # test 1; use ints +figure(1) plotfile(fname, (0,5,6)) # test 2; use names +figure(2) plotfile(fname, ('date', 'volume', 'adj_close')) # test 3; use semilogy for volume -plotfile(fname, ('date', 'volume', 'adj_close'), plotfuncs={'volume': 'semilogy'}) +figure(3) +plotfile(fname, ('date', 'volume', 'adj_close'), + plotfuncs={'volume': 'semilogy'}) # test 4; use semilogy for volume +figure(4) plotfile(fname, (0,5,6), plotfuncs={5:'semilogy'}) # test 5; use bar for volume +figure(5) plotfile(fname, (0,5,6), plotfuncs={5:'bar'}) +# test 6; labeling, if no names in csv-file +figure(6) +plotfile(fname2, cols=(0,1,2), delimiter=' ', + names=['$x$', '$f(x)=x^2$', '$f(x)=x^3$']) + show() Index: examples/data/some_data.csv === --- examples/data/some_data.csv (revision 0) +++ examples/data/some_data.csv (revision 0) @@ -0,0 +1,11 @@ + 0 00 + 1 11 + 2 48 + 3 9 27 + 4 16 64 + 5 25 125 + 6 36 216 + 7 49 343 + 8 64 512 + 9 81 729 +10 100 1000 Property changes on: examples/data/some_data.csv ___ Name: svn:executable + * - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list
Re: [Matplotlib-users] LateX Legend
On Thursday 08 May 2008 5:13:20 am Yves Revaz wrote: Dear List, How is it possible to write legend text with LateX fonts ? Even with rc('text', usetex=True) the legend created with the command legend do not appear with LateX fonts. I try something like : pt.legend(('$\rm{total baryons}$')) but the \rm is badly interpreted :-( . Does this work better? pt.legend((r'$\rm{total baryons}$')) - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Square brackets in mathtext (version 0.91.2)
It's a bug in 0.91.2. This has been fixed on the maintenance branch (if you're comfortable using SVN), or we do plan to release a bugfix 0.91.3 release soon. Cheers, Mike Maxim Fedorovsky wrote: Dear all, The following TeX expression did not produce any error message with matplotlib versions 0.87.3 - 0.90.2 : r'$Wavenumber,\ [\ cm^{-1}\ ]$' The following error is produced with version 0.91.2 : class 'matplotlib.pyparsing.ParseFatalException': Expected end of math '$' $Wavenumber,\ [\ cm^{-1}\ ]$ (at char 0), (line:1, col:1) The problem comes about because of the square brackets. Could everyone please explain me how to handle this situation (without placing the brackets outside of '$$') ? Thanks in advance, Dr. Maxim Fedorovsky. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
It looks like matplotlib was built for a different version of iconv than what you have on your machine. This may be a scisoft packaging problem, you may want to bring this question to their attention. Perhaps the version of OSX that scisoft was built on/for is different than what you're running it on. ImportError: dlopen(/scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so, 2): Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so Reason: Incompatible library version: _backend_gdk.so requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Cheers, Mike Antonino Cucchiara wrote: Hi Mike, I re-install the astronomy scisoft package and now the segmentation fault is not anymore present when I import matplotlib.mathtext. But when I import pylab I have the following error. I think it's something related with my backend choise. I tried to change all the GUI possibilities in my matplotlibrc file but the error is still present. I attached the gdb python output (I don't know if it helps) and the output of my import pylab command Michael Droettboom wrote: We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
Is there anything I can do to update it by myself in the meanwhile? Thanks, Nino Michael Droettboom wrote: It looks like matplotlib was built for a different version of iconv than what you have on your machine. This may be a scisoft packaging problem, you may want to bring this question to their attention. Perhaps the version of OSX that scisoft was built on/for is different than what you're running it on. ImportError: dlopen(/scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so, 2): Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so Reason: Incompatible library version: _backend_gdk.so requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Cheers, Mike Antonino Cucchiara wrote: Hi Mike, I re-install the astronomy scisoft package and now the segmentation fault is not anymore present when I import matplotlib.mathtext. But when I import pylab I have the following error. I think it's something related with my backend choise. I tried to change all the GUI possibilities in my matplotlibrc file but the error is still present. I attached the gdb python output (I don't know if it helps) and the output of my import pylab command Michael Droettboom wrote: We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Antonino Cucchiara PhD candidate Department of AstronomyAstrophysics Penn State University website: www.astro.psu.edu/~cucchiara/ - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
You could try rebuilding matplotlib yourself. There are some OS-X directions here: http://www.astro.washington.edu/owen/BuildingMatplotlibForMac.html This may mean, however, that it won't play nice with other parts of scisoft. But this really is a matter of how and where scisoft was built (which I don't know) and where you're running it. Cheers, Mike Antonino Cucchiara wrote: Is there anything I can do to update it by myself in the meanwhile? Thanks, Nino Michael Droettboom wrote: It looks like matplotlib was built for a different version of iconv than what you have on your machine. This may be a scisoft packaging problem, you may want to bring this question to their attention. Perhaps the version of OSX that scisoft was built on/for is different than what you're running it on. ImportError: dlopen(/scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so, 2): Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so Reason: Incompatible library version: _backend_gdk.so requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Cheers, Mike Antonino Cucchiara wrote: Hi Mike, I re-install the astronomy scisoft package and now the segmentation fault is not anymore present when I import matplotlib.mathtext. But when I import pylab I have the following error. I think it's something related with my backend choise. I tried to change all the GUI possibilities in my matplotlibrc file but the error is still present. I attached the gdb python output (I don't know if it helps) and the output of my import pylab command Michael Droettboom wrote: We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Possible to disable wxAgg's smoothing of an image?
Hi, I have a displayed an image with imshow() under wxPython, and it looks great with the WxAgg figure canvas.. but sometimes I want to actually see pixels when I zoom.. and not just a nice smoothed image. Is it possible to disable the smoothing? The way it is now, I will never see square pixels no matter how close i zoom in.. Also, if I want to use matplotlib.patches on a canvas where I can actually see individual pixels, is it possible to only draw on the available pixels showing, and not just make a nice high resolution line that is plotted on top of my image? Thanks, Soren - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
Hi Mike, I re-install the astronomy scisoft package and now the segmentation fault is not anymore present when I import matplotlib.mathtext. But when I import pylab I have the following error. I think it's something related with my backend choise. I tried to change all the GUI possibilities in my matplotlibrc file but the error is still present. I attached the gdb python output (I don't know if it helps) and the output of my import pylab command Michael Droettboom wrote: We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Antonino Cucchiara PhD candidate Department of AstronomyAstrophysics Penn State University website: www.astro.psu.edu/~cucchiara/ gdb.out Description: Binary data Python 2.5.1 (r251:54863, Sep 20 2007, 12:35:05) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type help, copyright, credits or license for more information. import pylab Traceback (most recent call last): File stdin, line 1, in module File /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pylab.py, line 1, in module from matplotlib.pylab import * File /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/pylab.py, line 292, in module from matplotlib.pyplot import * File /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/pyplot.py, line 37, in module new_figure_manager, draw_if_interactive, show = pylab_setup() File /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/__init__.py, line 24, in pylab_setup globals(),locals(),[backend_name]) File /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py, line 21, in module from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK File /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_gdk.py, line 29, in module from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array ImportError: dlopen(/scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so, 2): Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so Reason: Incompatible library version: _backend_gdk.so requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
Thanks, I just had to replace the /usr/lib/libiconv.2.dylib with the one I have in /sw/lib/ directory . Now the GTK, GTKAgg backend work. Nino Michael Droettboom wrote: You could try rebuilding matplotlib yourself. There are some OS-X directions here: http://www.astro.washington.edu/owen/BuildingMatplotlibForMac.html This may mean, however, that it won't play nice with other parts of scisoft. But this really is a matter of how and where scisoft was built (which I don't know) and where you're running it. Cheers, Mike Antonino Cucchiara wrote: Is there anything I can do to update it by myself in the meanwhile? Thanks, Nino Michael Droettboom wrote: It looks like matplotlib was built for a different version of iconv than what you have on your machine. This may be a scisoft packaging problem, you may want to bring this question to their attention. Perhaps the version of OSX that scisoft was built on/for is different than what you're running it on. ImportError: dlopen(/scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so, 2): Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so Reason: Incompatible library version: _backend_gdk.so requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Cheers, Mike Antonino Cucchiara wrote: Hi Mike, I re-install the astronomy scisoft package and now the segmentation fault is not anymore present when I import matplotlib.mathtext. But when I import pylab I have the following error. I think it's something related with my backend choise. I tried to change all the GUI possibilities in my matplotlibrc file but the error is still present. I attached the gdb python output (I don't know if it helps) and the output of my import pylab command Michael Droettboom wrote: We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Antonino Cucchiara PhD candidate Department of AstronomyAstrophysics Penn State University website: www.astro.psu.edu/~cucchiara/ - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Possible to disable wxAgg's smoothing of an image?
You can pass an interpolation parameter to imshow, or set a default in image.interpolation in your matplotlibrc. From the imshow docstring: * interpolation is one of: 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'blackman' if interpolation is None, default to rc image.interpolation. See also th the filternorm and filterrad parameters 'nearest' is the one you want if you want to see sharp square pixels. Søren Nielsen wrote: Also, if I want to use matplotlib.patches on a canvas where I can actually see individual pixels, is it possible to only draw on the available pixels showing, and not just make a nice high resolution line that is plotted on top of my image? I'm not sure I understand the question. You mean to draw a line using large pixels, rather than as a vector? I don't think there's an easy way on that one -- but maybe someone else here can think of a creative way to do it. Cheers, Mike Thanks, Soren - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Square brackets in mathtext (version 0.91.2)
Thanks a lot for the help) I have noticed that \angstrom is not anymore supported in 0.91. With best regards, Maxim Fedorovsky. Forgot to mention -- you could also apply this patch to your local copy of mathtext.py http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_91_maint/lib/matplotlib/mathtext.py?r1=4816r2=4854 Michael Droettboom wrote: It's a bug in 0.91.2. This has been fixed on the maintenance branch (if you're comfortable using SVN), or we do plan to release a bugfix 0.91.3 release soon. Cheers, Mike Maxim Fedorovsky wrote: Dear all, The following TeX expression did not produce any error message with matplotlib versions 0.87.3 - 0.90.2 : r'$Wavenumber,\ [\ cm^{-1}\ ]$' The following error is produced with version 0.91.2 : class 'matplotlib.pyparsing.ParseFatalException': Expected end of math '$' $Wavenumber,\ [\ cm^{-1}\ ]$ (at char 0), (line:1, col:1) The problem comes about because of the square brackets. Could everyone please explain me how to handle this situation (without placing the brackets outside of '$$') ? Thanks in advance, Dr. Maxim Fedorovsky. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] segmentation fault with pylab
Great. You may still want to let the scisoft guys know about this so others won't hit up against it. Cheers, Mike Antonino Cucchiara wrote: Thanks, I just had to replace the /usr/lib/libiconv.2.dylib with the one I have in /sw/lib/ directory . Now the GTK, GTKAgg backend work. Nino Michael Droettboom wrote: You could try rebuilding matplotlib yourself. There are some OS-X directions here: http://www.astro.washington.edu/owen/BuildingMatplotlibForMac.html This may mean, however, that it won't play nice with other parts of scisoft. But this really is a matter of how and where scisoft was built (which I don't know) and where you're running it. Cheers, Mike Antonino Cucchiara wrote: Is there anything I can do to update it by myself in the meanwhile? Thanks, Nino Michael Droettboom wrote: It looks like matplotlib was built for a different version of iconv than what you have on your machine. This may be a scisoft packaging problem, you may want to bring this question to their attention. Perhaps the version of OSX that scisoft was built on/for is different than what you're running it on. ImportError: dlopen(/scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so, 2): Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /scisoft/i386/library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/_backend_gdk.so Reason: Incompatible library version: _backend_gdk.so requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0 Cheers, Mike Antonino Cucchiara wrote: Hi Mike, I re-install the astronomy scisoft package and now the segmentation fault is not anymore present when I import matplotlib.mathtext. But when I import pylab I have the following error. I think it's something related with my backend choise. I tried to change all the GUI possibilities in my matplotlibrc file but the error is still present. I attached the gdb python output (I don't know if it helps) and the output of my import pylab command Michael Droettboom wrote: We need some more information. Can you set verbose.level to debug-annoying in your ~/.matplotlib/matplotlibrc file? Also, if you have the development tools (XCode) installed on your mac, can you run python in gdb? gdb python GNU gdb Red Hat Linux (6.3.0.0-1.153.el4_6.2rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-redhat-linux-gnu...Using host libthread_db library /lib/tls/libthread_db.so.1. (gdb) run -c import pylab ... and send us the output... Cheers, Mike Antonino Cucchiara wrote: Hello, I am experiencing a problem recently on my Mac OsX. When I try to import mathplotlib.mathtext or pylab I received a segmentation fault error. It wasn't like that before, and I recently update my matplotlib and scipy via fink. It worked fine few weeks ago. I hope someone can help me. Thanks, Nino - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Square brackets in mathtext (version 0.91.2)
You can use \AA for angstrom (to conform to the (La)TeX standard). Cheers, Mike Maxim Fedorovsky wrote: Thanks a lot for the help) I have noticed that \angstrom is not anymore supported in 0.91. With best regards, Maxim Fedorovsky. Forgot to mention -- you could also apply this patch to your local copy of mathtext.py http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v0_91_maint/lib/matplotlib/mathtext.py?r1=4816r2=4854 Michael Droettboom wrote: It's a bug in 0.91.2. This has been fixed on the maintenance branch (if you're comfortable using SVN), or we do plan to release a bugfix 0.91.3 release soon. Cheers, Mike Maxim Fedorovsky wrote: Dear all, The following TeX expression did not produce any error message with matplotlib versions 0.87.3 - 0.90.2 : r'$Wavenumber,\ [\ cm^{-1}\ ]$' The following error is produced with version 0.91.2 : class 'matplotlib.pyparsing.ParseFatalException': Expected end of math '$' $Wavenumber,\ [\ cm^{-1}\ ]$ (at char 0), (line:1, col:1) The problem comes about because of the square brackets. Could everyone please explain me how to handle this situation (without placing the brackets outside of '$$') ? Thanks in advance, Dr. Maxim Fedorovsky. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Type 3 fonts
Hi List, I recently subjected some figures to an online 'quality analysis' done by a journal I am submitting a paper to. The analysis stated that my figures (created with mpl's pdf backend, and using whatever default fonts are used) used type 3 fonts, and that I should use type 1 whenever possible. I figured Arial would be a safer bet, but that also drew complaints. I have read a little bit online about the difference between types 1 and 3, but I can't find a description of which font is which type. So what font should I use? -- Chris - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to handle different Figures, created from different instances
Hallo, I'm quite new to matplotlib and have a problem, I was searching a solution for the whole day :( The thing is, I want to show different Figures at different states of my main application. So it is not possible for me, to perform the standard procedure, that may looks like: code figure(1) plot(bla) figure(2) plot(bla2) show() /code I have a method, in a class, that should be responsible for drawing a Figure and its content; looks like that: code def drawFigure(self, el): figure(self.__figure) title(self.__headline) plot( el.getXValues(), el.getYValues(),str(el.getColor())+ str(el.getLineStyle())+str(el.getMarkerStyle()) ) show() /code This method exists in several instances of that class, that are created at different times Let I run it this way, the 1st Figure window appears. When this method is called a 2nd time, not 'Figure 2' appears, a window named 'Tk' appears. It is safe that the figure(f) method gets a uniquie number at every time the method is called. I also tried to let all this run in separate threads, using python Threads, but there was no success. Please, can anybody tell me, if there is a solution, to call the show() method more than one time,while my main script is running? The reason why I want to have it this way is, that between different states, some time is elapsing. In this time the user shall have the possibility to watch the figures, and zoom and pan and so on. When the next state is reached, the next Figure window shall appear, while the others are kept on the screen. Thanks, very much. Regards, Thomas -- View this message in context: http://www.nabble.com/How-to-handle-different-Figures%2C-created-from-different-instances-tp17127297p17127297.html Sent from the matplotlib - users mailing list archive at Nabble.com. - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Toolbar in QT
Hi, First I want to thanks for this amazing Matplotlib. It's fantastic! My newbie question is how I can show the (zoom, pan, etc) toolbar in embedding_in_qt.py example? I have noticed that in animation_blit_qt.py the toolbar is available, but it seems to be done in a different way. Appreciate your help! Thank you, /Ben - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Type 3 fonts
Christopher Brown [EMAIL PROTECTED] writes: I have read a little bit online about the difference between types 1 and 3, but I can't find a description of which font is which type. So what font should I use? Try setting the pdf.fonttype parameter in your matplotlibrc file to 42 and see if the resulting file passes validation. Matplotlib currently only uses TrueType fonts, which can be embedded in either Type 3 or Type 42 format. I seem to recall there was some problem with the Type 42 format so Type 3 was made the default; Michael Droettboom probably remembers it better. If you really need to use Type 1 fonts as opposed to TrueType, there actually is some limited support for them in the pdf backend, currently used only by the dviread approach to using LaTeX. You could try setting text.usetex to True - if it works out for you, you should see Type 1 TeX fonts in the output. If not, it will probably take a little hacking to smuggle a Type 1 font (a pfa or pfb file) past the front end, but the pdf backend should then embed it. -- Jouni K. Seppänen http://www.iki.fi/jks - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Type 3 fonts
Christopher Brown [EMAIL PROTECTED] writes: I have read a little bit online about the difference between types 1 and 3, but I can't find a description of which font is which type. So what font should I use? Try setting the pdf.fonttype parameter in your matplotlibrc file to 42 and see if the resulting file passes validation. Matplotlib currently only uses TrueType fonts, which can be embedded in either Type 3 or Type 42 format. I seem to recall there was some problem with the Type 42 format so Type 3 was made the default; Michael Droettboom probably remembers it better. If you really need to use Type 1 fonts as opposed to TrueType, there actually is some limited support for them in the pdf backend, currently used only by the dviread approach to using LaTeX. You could try setting text.usetex to True - if it works out for you, you should see Type 1 TeX fonts in the output. If not, it will probably take a little hacking to smuggle a Type 1 font (a pfa or pfb file) past the front end, but the pdf backend should then embed it. -- Jouni K. Seppänen http://www.iki.fi/jks - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Possible to disable wxAgg's smoothing of an image?
On Thu, May 8, 2008 at 3:52 PM, Michael Droettboom [EMAIL PROTECTED] wrote: You can pass an interpolation parameter to imshow, or set a default in image.interpolation in your matplotlibrc. From the imshow docstring: * interpolation is one of: 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'blackman' if interpolation is None, default to rc image.interpolation. See also th the filternorm and filterrad parameters 'nearest' is the one you want if you want to see sharp square pixels. Thanks mike, thats exactly what I needed :) Søren Nielsen wrote: Also, if I want to use matplotlib.patches on a canvas where I can actually see individual pixels, is it possible to only draw on the available pixels showing, and not just make a nice high resolution line that is plotted on top of my image? I'm not sure I understand the question. You mean to draw a line using large pixels, rather than as a vector? I don't think there's an easy way on that one -- but maybe someone else here can think of a creative way to do it. Yes you understod it correctly, I guess I could figure out what pixels are involved in a line or a circle for instance, and then do a scatter plot on those pixels to form the shape.. but it sounds really computationally heavy.. and I need something that works fast, (the user should be able to mask a circle in an image using the pixels available in the image) Also the circle should be shown as it is created (like choosing a center and moving the mouse enlarges the circle). Maybe someone tried this? masking stuff in an image seems like a fairly common thing :) Thanks for the help! Soren Cheers, Mike Thanks, Soren - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ 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 - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Rotating an axes
Can someone tell me if there is a way to rotate an axes instance? I have, figure(1) ax1 = axes([0.0, 0.0, 1.0, 1.0], axisbg='0.95') ax2 = axes([0.2, 0.1, 0.6, 0.8], axisbg='white') and I would like to rotate ax2 30 degrees. It would look something like the attached file. -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo attachment: rotate.png- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Toolbar in QT
The toolbar is just a widget so you can do that the same way you show any other widget in Qt. Something along the lines of: - build a widget - add a layout - add the figure widget to the layout - add the toolbar to the layout - connect them together (I forget exactly how but backend_qt.py has all the code that does this) From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Behnam Kamrani Sent: Thursday, May 08, 2008 11:19 AM To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] Toolbar in QT Hi, First I want to thanks for this amazing Matplotlib. It's fantastic! My newbie question is how I can show the (zoom, pan, etc) toolbar in embedding_in_qt.py example? I have noticed that in animation_blit_qt.py the toolbar is available, but it seems to be done in a different way. Appreciate your help! Thank you, /Ben - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Type 3 fonts
Hi Jouni, JKS Try setting the pdf.fonttype parameter in your matplotlibrc file to JKS 42 and see if the resulting file passes validation. Matplotlib This produces a good-looking pdf. Unfortunately, It'll be a few weeks before I can test it with the online figure check program, since the that manuscript is already submitted and I can no longer update the figures (for now). Once I can try again, I'll let you know. -- Chris - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] axes scale factor not showing
Hi, When matplotlib uses an axis multiplier, as in x-axis in the script below, the scale factor is not positioned properly on the figure as is shown in the attached picture. The 'x1e+30' in the bottom right corner is clipped unless I enlarge the window. import Numeric, gtk import matplotlib matplotlib.use('GTK') import matplotlib.figure, matplotlib.axes, matplotlib.backends.backend_gtk # data values = Numeric.array([-1e30, -1e30, 0,1,2,3,4,5,6,7,8,9], 'd') # figure figsize=(6,3) figure = matplotlib.figure.Figure(figsize=figsize) canvas = matplotlib.backends.backend_gtk.FigureCanvasGTK(figure) axes = matplotlib.axes.Subplot(figure, 111) figure.add_axes(axes) axes.hist(values, bins=10) axes.set_title('X-scale multiplier is hidden', fontsize=10) # window to display window = gtk.Window() window.connect('destroy', gtk.main_quit) window.add(canvas) window.show_all() gtk.main() I can use the axes position to work I guess but that seems rather unsatisfactory as I'll have to figure out when it's being displayed or not, font sizing and spacing blah blah blah. Is there an easier way around this (or a fix?)? I'm using v0.90.0 Thanks Tim inline: noscale.png- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users