Re: [Matplotlib-users] Fwd: Matplotlib backend issue
On Jul 20, 2013, at 9:09 AM, Michiel de Hoon mjldeh...@yahoo.com wrote: The MacOSX backend itself does not use X11. So I would suggest to check which modules get loaded when you import pyplot, and see which one of those causes X11 to open. Thanks. How do I check which modules get loaded? When I import pyplot a window pops up that explains that X11 is no longer part of the Mac OS X distribution and the python shell exits to the prompt. Also are there anything I need to do to make MacOSX available to matplotlib. I have installed XCode, but I notice that there is no longer a /Developer directory at the root level (all developer code resources are not part of XCode application). Could this be causing matplotlib to not find the MacOSX environment? Or am I missing a path or keyword in my bash environment perhaps? Cheers Tommy -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Matplotlib backend issue
On Jul 20, 2013, at 11:19 AM, Michiel de Hoon mjldeh...@yahoo.com wrote: Hi Tommy, Look inside the pyplot.py module. I don't have the code in front of me now, but I guess it's a module that loads a bunch of other modules, and one of those wants to use X11. This should not depend on whether the developers‘ tools are present. -michiel Ok, so with a long list of print statements I have tracked it down to the statement import matplotlib._png as _png in image.py. So there seems to be a bad binding in the _png.so file. Is there a way to figure out which bindings this file has? -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Fwd: Matplotlib backend issue
I just installed matplotlib on a new MacBook Pro ActivePython 2.7.2.5 (ActiveState Software Inc.) based on Python 2.7.2 (default, Jun 24 2011, 12:20:15) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.7.1' import matplotlib matplotlib.__version__ '1.2.1' matplotlib.matplotlib_fname() '/Users/tgrav/.matplotlib/matplotlibrc' That works fine. However, when I try to do import matplotlib.pyplot as plt it tries to open X11, which I have not installed and would like to try to avoid. The matplotlibrc file has backend : MacOSX Anyone know why it is still trying to open X11 and how I can avoid that? -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fwd: Matplotlib backend issue
On Jul 19, 2013, at 4:49 PM, Benjamin Root ben.r...@ou.edu wrote: What does print matplotlib.get_backend() say? 'MacOSX' -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] cmap normalization question
Hi, I have been looking around but can't find what I want. I have two arrays, one with numbers from 0.02 to 0.20 and the other from 0.03 to 0.50. I am trying to plot them together with other arrays in a scatterplot where these two are the color term plt.scatter(x1,y1,c=myarr1,cmap=plt.get_cmap(gist_heat)) plt.scatter(x2,y2,c=myarr2,cmap=plt.get_cmap(gist_heat)) but it seems that each instance of the plot command rescales the array such that myarr1.max() and myarr2.max() are both with, which means that the two color scales are out of sync. Is there a way to force the two plots to respect the values in the array have the cmap go from 0 to 1, not from myarr1.min() to myarr1.max()? Cheers Tommy -- Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World#153; now supports Android#153; Apps for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 64bit installer
Is there a 64bit installer of matplotlib for mac os x available? Cheers Tommy -- Free Software Download: Index, Search Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Axis line width and label problem
I have two questions: 1. Is there a way to increase the line width of the axes? I have figured out how to do it with the tick marks, but not the axes themselves. 2. When adding a label to plot (xlabel and ylabel) the label will be cropped if the font is large. Is there a way to rescale the plot so that the size of the axis is adjusted to allow for the larger font size? If not, how do I increase the buffer zone outside the plot? Cheers Tommy -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Compile error
I am trying to compile matplotlib for ActiveState 2.7.0.1 - 64bit on mac os x. I have installed numpy 1.4.1 and scipy 0.8.0 from source. Compiling matplotlib using sudo make -f make.osx fetch deps mpl_build mpl_install works fine, but sudo python setup.py build yields the error below. Anyone know how to fix this problem? Cheers Tommy basedirlist is: [] BUILDING MATPLOTLIB matplotlib: 1.0.0 python: 2.7 (r27:82500, Jul 4 2010, 13:58:56) [GCC 4.2.1 (Apple Inc. build 5664)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.4.1 freetype2: found, but unknown version (no pkg-config) * WARNING: Could not find 'freetype2' headers in any * of '.', './freetype2'. OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) * Could not find 'libpng' headers in any of '.' Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to import gtk in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide adding pytz OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: 8.63 latex: no [Edit setup.cfg to suppress the above messages] pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo'] running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc - build/lib.macosx-10.5-intel-2.7/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf - build/lib.macosx-10.5-intel-2.7/matplotlib/mpl-data running build_ext building 'matplotlib.ft2font' extension gcc -fno-strict-aliasing -fPIC -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.5.sdk/ -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I. -I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/ft2font.cpp -o build/temp.macosx-10.5-intel-2.7/src/ft2font.o cc1plus: warning: command line option -Wstrict-prototypes is valid for C/ObjC but not for C++ In file included from src/ft2font.cpp:1: src/ft2font.h:14:22: error: ft2build.h: No such file or directory src/ft2font.h:15:10: error: #include expects FILENAME or FILENAME src/ft2font.h:16:10: error: #include expects FILENAME or FILENAME src/ft2font.h:17:10: error: #include expects FILENAME or FILENAME src/ft2font.h:18:10: error: #include expects FILENAME or FILENAME src/ft2font.h:19:10: error: #include expects FILENAME or FILENAME In file included from src/ft2font.cpp:1: src/ft2font.h:33: error: ‘FT_Bitmap’ has not been declared src/ft2font.h:33: error: ‘FT_Int’ has not been declared src/ft2font.h:33: error: ‘FT_Int’ has not been declared src/ft2font.h:89: error: expected ‘,’ or ‘...’ before ‘’ token src/ft2font.h:89: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:95: error: expected ‘,’ or ‘...’ before ‘’ token src/ft2font.h:95: error: ISO C++ forbids declaration of ‘FT_Face’ with no type src/ft2font.h:137: error: ‘FT_Face’ does not name a type src/ft2font.h:138: error: ‘FT_Matrix’ does not name a type src/ft2font.h:139: error: ‘FT_Vector’ does not name a type src/ft2font.h:140: error: ‘FT_Error’ does not name a type src/ft2font.h:141: error: ‘FT_Glyph’ was not declared in this scope src/ft2font.h:141: error: template argument 1 is invalid src/ft2font.h:141: error: template argument 2 is invalid src/ft2font.h:142: error: ‘FT_Vector’ was not declared in this scope src/ft2font.h:142: error: template argument 1 is invalid src/ft2font.h:142: error: template argument 2 is invalid src/ft2font.h:148: error: ‘FT_BBox’ does not name a type src/ft2font.cpp:45:
Re: [Matplotlib-users] Compile error
Sorry for the badly formatted email with broken threading (I realized that my matplotlib-user subscription was held due to my email bouncing earlier in the month. Re: [Matplotlib-users] Compile error From: Michael Droettboom md...@st... - 2010-07-20 17:17 It looks as if you do not have the freetype development headers installed. Mike Where should the freeetype headers be? I thought they were installed when calling make with the dependencies being fetched? Tommy -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] ANN: matplotlib-0.99.3
On Jun 1, 2010, at 9:34 AM, Alan G Isaac wrote: PS Btw, it gets said often but once more won't hurt: Matplotlib is wonderful! I just wanted to second this. Having suffered many years with super mongo, matplotlib (and python in general) has made my work so much easier. Tommy Grav ++ Associate Researcher @ Dept. of Physics and Astronomy Johns Hopkins University ++ tg...@pha.jhu.edu (410) 516-7683 http://web.mac.com/tgrav/Astronomy/Welcome.html ++ -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] AxesGrid question
Thanks, I downloaded and installed 0.99rc1 and that worked beautifully. Might be good to put this explicitly on the webpages as it is very confusing. Tommy On Aug 1, 2009, at 9:27 AM, Jae-Joon Lee wrote: The axes_grid toolkit is recently added to the matplotlib, and you need to have development version of matplotlib. You may try the matplotlib 0.99rc1 released a few days ago http://www.nabble.com/matplotlib-0.99.0-rc1-%3A-call-for-testing-td24760373.html or you may try to install from the svn http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn -JJ On Fri, Jul 31, 2009 at 10:39 PM, Tommy Gravtg...@mac.com wrote: i am trying to use the example at http://matplotlib.sourceforge.net/examples/axes_grid/simple_axesgrid.html but axes_grid is not in mpl_toolkits for the standard matplotlib build. Where can I get the axes_grid tools? Cheers Tommy -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] AxesGrid question
i am trying to use the example at http://matplotlib.sourceforge.net/examples/axes_grid/simple_axesgrid.html but axes_grid is not in mpl_toolkits for the standard matplotlib build. Where can I get the axes_grid tools? Cheers Tommy -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting large images
I am trying to use imshow to plot some semi-large fits images. Here is the code: from math import * import numpy as np from matplotlib import pyplot as plt from matplotlib import cm as cm import pyfits cat = /Volumes/Sweden/PS1SC/Data/PS20090603-3/MD09/skycell.092/ fname = o4985g0263o.warp.MD09.skycell.092 hdu = pyfits.open(cat+fname+.fits) print hdu.info() img = hdu[1].data.astype(int) plt.figure(figsize=[12,12]) plt.imshow(img,cmap=cm.cool) plt.savefig(test.png) Which gives the result: Filename: /Volumes/Sweden/PS1SC/Data/PS20090603-3/MD09/skycell.092/ o4985g0263o.warp.MD09.skycell.092.fits No.Name Type Cards Dimensions Format 0PRIMARY PrimaryHDU 6 ()int16 1CompImageHDU 101 (6000, 6000) float32 None Python(23117,0xa04f2720) malloc: *** mmap(size=115200) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Traceback (most recent call last): File quick_look.py, line 16, in module plt.savefig(test.png) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/pyplot.py, line 345, in savefig return fig.savefig(*args, **kwargs) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/figure.py, line 990, in savefig self.canvas.print_figure(*args, **kwargs) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/backend_bases.py, line 1419, in print_figure **kwargs) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/backends/backend_agg.py, line 323, in print_png FigureCanvasAgg.draw(self) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/backends/backend_agg.py, line 279, in draw self.figure.draw(self.renderer) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/figure.py, line 772, in draw for a in self.axes: a.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/axes.py, line 1545, in draw im.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/image.py, line 233, in draw im = self.make_image(renderer.get_image_magnification()) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/image.py, line 180, in make_image x = self.to_rgba(self._A, self._alpha) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/cm.py, line 79, in to_rgba x = self.cmap(x, alpha=alpha, bytes=bytes) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/colors.py, line 501, in __call__ rgba = np.empty(shape=xa.shape+(4,), dtype=lut.dtype) MemoryError I found the earlier thread of http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg11216.html but that didn't seem to produce any fixes or good explanations. I am on a Mac Pro Intel machine running 10.5.7 and [Heimdall:tgrav ~/Work/myCode/Python/pyPS1SC] python ActivePython 2.5.4.3 (ActiveState Software Inc.) based on Python 2.5.4 (r254:67916, Jan 20 2009, 14:11:42) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.3.0rc2' import pyfits pyfits.__version__ '2.1.1dev462' import matplotlib matplotlib.__version__ '0.98.5.2' Cheers Tommy -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting large images
That is what I was assuming, but it still seems a little odd that matplotlib generates that large of a memory footprint. Loading the fits file into the program using pyfits, with the code only uses 19MB of real memory and 600MB of virtual memory (strangly adding the line img = hdu[1].data, increases this to 208MB/800MB). Displaying images of various sizes I get these numbers from Activity Monitor Size Real Mem Virtual 3k x 3k 0.68GB1.57GB 4k x 4k 0.92GB1.80GB 5k x 5k 1.20GB2.10GB 5.5k x 5.5k 1.38GB2.28GB And the limit seems to be somewhere just above 5.5k by 5.5k (darn :( ) Cheers Tommy On Jun 30, 2009, at 7:27 PM, Perry Greenfield wrote: Because the image is so large, and matplotlib carries out various operations on the image (scaling, resampling, etc), it uses a lot of memory. This is one area where a specialized display program will be more efficient. If you need to use matplotlib, decide whether you really only want to display a subsection, or only need a lower resolution version (e.g., boxcar smooth and subsample) before displaying. I've found that image sizes well over 1kx1k can take some time to display, and those that are much larger can cause you to run out of memory. At least, that's what I think is happening. Perry On Jun 30, 2009, at 7:20 PM, Tommy Grav wrote: I am trying to use imshow to plot some semi-large fits images. Here is the code: from math import * import numpy as np from matplotlib import pyplot as plt from matplotlib import cm as cm import pyfits cat = /Volumes/Sweden/PS1SC/Data/PS20090603-3/MD09/skycell.092/ fname = o4985g0263o.warp.MD09.skycell.092 hdu = pyfits.open(cat+fname+.fits) print hdu.info() img = hdu[1].data.astype(int) plt.figure(figsize=[12,12]) plt.imshow(img,cmap=cm.cool) plt.savefig(test.png) Which gives the result: Filename: /Volumes/Sweden/PS1SC/Data/PS20090603-3/MD09/skycell.092/ o4985g0263o.warp.MD09.skycell.092.fits No.Name Type Cards Dimensions Format 0PRIMARY PrimaryHDU 6 ()int16 1CompImageHDU 101 (6000, 6000) float32 None Python(23117,0xa04f2720) malloc: *** mmap(size=115200) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Traceback (most recent call last): File quick_look.py, line 16, in module plt.savefig(test.png) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/pyplot.py, line 345, in savefig return fig.savefig(*args, **kwargs) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/figure.py, line 990, in savefig self.canvas.print_figure(*args, **kwargs) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/backend_bases.py, line 1419, in print_figure **kwargs) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/backends/backend_agg.py, line 323, in print_png FigureCanvasAgg.draw(self) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/backends/backend_agg.py, line 279, in draw self.figure.draw(self.renderer) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/figure.py, line 772, in draw for a in self.axes: a.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/axes.py, line 1545, in draw im.draw(renderer) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/image.py, line 233, in draw im = self.make_image(renderer.get_image_magnification()) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/image.py, line 180, in make_image x = self.to_rgba(self._A, self._alpha) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/cm.py, line 79, in to_rgba x = self.cmap(x, alpha=alpha, bytes=bytes) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/colors.py, line 501, in __call__ rgba = np.empty(shape=xa.shape+(4,), dtype=lut.dtype) MemoryError I found the earlier thread of http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg11216.html but that didn't seem to produce any fixes or good explanations. I am on a Mac Pro Intel machine running 10.5.7 and [Heimdall:tgrav ~/Work/myCode/Python/pyPS1SC] python ActivePython 2.5.4.3 (ActiveState Software Inc.) based on Python 2.5.4 (r254:67916, Jan 20 2009, 14:11:42) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type help, copyright, credits or license for more information. import numpy numpy.__version__
[Matplotlib-users] easy_install and eggs
I downloaded the egg for 0.98 from the matplotlib webpages, and I am trying to install it with easy_install ./matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg Processing matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg removing '/Library/Python/2.5/site-packages/matplotlib-0.98.0-py2.5- macosx-10.3-fat.egg' (and everything under it) creating /Library/Python/2.5/site-packages/matplotlib-0.98.0-py2.5- macosx-10.3-fat.egg Extracting matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg to /Library/ Python/2.5/site-packages Removing matplotlib 0.91.2 from easy-install.pth file Adding matplotlib 0.98.0 to easy-install.pth file Installed /Library/Python/2.5/site-packages/matplotlib-0.98.0-py2.5- macosx-10.3-fat.egg Processing dependencies for matplotlib==0.98.0 Searching for matplotlib==0.98.0 Reading http://cheeseshop.python.org/pypi/matplotlib/ Reading http://cheeseshop.python.org/pypi/matplotlib/0.98.0 Reading http://matplotlib.sourceforge.net Reading http://cheeseshop.python.org/pypi/matplotlib/0.91.3 No local packages or download links found for matplotlib==0.98.0 error: Could not find suitable distribution for Requirement.parse('matplotlib==0.98.0') [skathi:~/Downloads] tgrav% Why is it trying to download the egg, when it is right there in the directory where I am running easy_install from. I do now see the point some people made on the python list about easy_install. This is an annoying behavior by the software. Cheers Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1
[skathi:~/Work/myCode/pyS3M] tgrav% python ActivePython 2.5.1.1 (ActiveState Software Inc.) based on Python 2.5.1 (r251:54863, May 1 2007, 17:40:00) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.1.0' import pylab Traceback (most recent call last): File stdin, line 1, in module File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/pylab.py, line 1, in module from matplotlib.pylab import * File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/pylab.py, line 206, in module from matplotlib.numerix import npyma as ma File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/numerix/__init__.py, line 166, in module __import__('ma', g, l) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib/numerix/ma/__init__.py, line 16, in module from numpy.core.ma import * ImportError: No module named ma import matplotlib matplotlib.__version__ '0.91.1' - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1
On May 28, 2008, at 2:27 PM, John Hunter wrote: On Wed, May 28, 2008 at 1:21 PM, Eric Firing [EMAIL PROTECTED] wrote: Maybe someone can provide, or has provided, a universal binary of 0.91.2 built against numpy 1.1? Does it need to be built against numpy 1.1? I thought the 1.1 release was binary compatible. If it is, this egg should work: http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg?use_mirror=internap JDH The problem with the egg is that it installs it in /Library/Python/2.5/ site-packages. This is only valid for the standard apple python version. But with easy_install -d /Library/Frameworks/Python.framework/Versions/Current/ lib/python2.5/site-packages matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg I was able to get 0.91.2 on my system :) Thanks Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1
On May 28, 2008, at 2:21 PM, Eric Firing wrote: Building on the Mac seems to be a nightmare. There are various emails and howto writeups (including one of John's) floating around, but I don't know that it has ever all been consolidated into one easy-to- find, easy-to-use set of instructions that will work for just about anyone. Maybe someone can provide, or has provided, a universal binary of 0.91.2 built against numpy 1.1? I seemed to remember that I had similar problems with 0.91.1, but used the super-scipy package to install it. Of course that package is now only for intel macs :( Hopefully someone else can shed some light on the issue. I will play around in the mean time and maybe I will stumble upon something :) Cheers Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Basemap and imshow
Is there a way of using imshow together with a basemap? Cheers Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap and imshow
Thanks for pointing this function out. I thought I had look for it, but must have overlooked it. I am using the test code below, but the array is plotted outside the boundary of the map. Is there a way to avoid this? Cheers Tommy from math import * from matplotlib.toolkits.basemap import Basemap import pylab import numpy rabins = numpy.arange(0.,360.,6) decbins = numpy.arange(-90.,90.,6) map = Basemap(projection=sinu,lat_0=0.,lon_0=180.,rsphere=1.) coverage = numpy.zeros([len(decbins),len(rabins)],int) coverage[0:5,:] = 2 coverage[5:10,:] = 4 map.imshow(coverage,interpolation=nearest,cmap=pylab.cm.hot_r) map.drawmapboundary() pylab.show() On Mar 6, 2008, at 11:10 AM, Jeff Whitaker wrote: Tommy Grav wrote: Is there a way of using imshow together with a basemap? Cheers Tommy Tommy: Use the imshow basemap method, just as you would the pylab version. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1FAX : (303)497-6449 325 BroadwayBoulder, CO, USA 80305-3328 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] basemap and omerc
On Feb 12, 2008, at 8:39 PM, Evan Mason wrote: dl = 2. nx = int((M.xmax - M.xmin) / dl) + 1 ny = int((M.ymax - M.ymin) / dl) + 1 lonr, latr = M.makegrid(nx, ny) plot(lonr, latr, 'c.') show() I think you might be looking for M.plot() rather than plot()?? plot() will just overwrite the basemap in the figure (although that might be possible to fix with some axis-magic, but that is far beyond my knowledge of matplotlib). Cheers Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] title when using subplot
I have a plot that is divided into four subplots. pylab.figure() pylab.subplot(221) pylab.plot(a,b,k-) pylab.subplot(222) pylab.plot(a,b,k-) pylab.subplot(223) pylab.plot(a,b,k-) pylab.subplot(224) pylab.plot(a,b,k-) I would like to add a title to the entire plot, but pylab.title() only applies to the most recent subplot. I have tried pylab.figure() pylab.subplot(111) pylab.title(Title Here) pylab.subplot(221) pylab.plot(a,b,k-) pylab.subplot(222) pylab.plot(a,b,k-) pylab.subplot(223) pylab.plot(a,b,k-) pylab.subplot(224) pylab.plot(a,b,k-) but this does not work as I do not create a plot for the subplot(111) instance. Is there some way of getting the type of title I want easily? Cheers Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Update and replot data at a regular time rate
On Oct 10, 2007, at 12:53 PM, massimo sandal wrote: sidimok ha scritto: I would write down an MPL script that loads a block data, generated on the fly (in a file) by another computing program, at a regular time rate, let's say every 30. The script may have an exit button to stop it, and it might proceed this way: 1. time = time_old 2. Load the data from lines 0 to -1(EOF) 3. Save data length: N = len(data) 4. plot 5. After time_new-time_old = time_step 5a. load data_tmp from lines N to -1 5b. extend data with data_tmp 5c. plot 5d. Go back to step 5, or press Stop button Does anyone have an idea how to encode this purpose? I don't really understand what the problem is. If you don't you know how to wait a definite time between loading the file, have a look at the time module: http://docs.python.org/lib/module-time.html especially time.sleep() m. I would venture a guess that the problem is how to update the plot. I have not investigated this problem, but I have a hard time figuring out how matplotlib deals with updating plots after plot.show() has been called to plot to the screen the first time. Cheers Tommy - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] histogram question
I need to generate a set of histograms, but would like to plot only the skyline of the histogram, and leave out the vertical lines where adjencent bars touch. I have looked at the docs, but nothing jumped out at me as the right keyword for this. Is this possible? and if so, how? Cheers Tommy - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Changing tick labels
I am creating a 2 dimensional histogram that I would like to plot as a contourf plot with matplotlib. I am using numpy to generate the histogram, but when I plot it the tick marks are of course the index of the histogram array. How do I change these tick labels to the value of the bins used to generate the histogram? Cheers Tommy - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Loop plotting question
I have a problem where I need to quickly inspect 20-30 plots. I want to open a plotting window, plot the first plot, then hit return to see the nest plot appear in the same window. Below is my script, but it creates a window that has to be closed before it loops over the rest of the plots. How can I avoid that the first plot has to be closed manually? Cheers Tommy Note: I know confirm() is overkill, but I just ripped it out of a different program to quickly put this script together :) import pylab from optparse import OptionParser parser = OptionParser(version=%prog 0.01a) parser.add_option(-i,--infile, dest=infname, action=store, help=The input file, metavar=INFILE) parser.add_option(-n,--num, dest=n, action=store,type=int, help=number of files, metavar=N) (options,args) = parser.parse_args() def confirm(_prompt=None, _default=False): prompts for yes or no response. Return True for yes and False for no. promptstr = _prompt if (not promptstr): promptstr = Confirm if (_default): prompt = %s [%s]|%s: % (promptstr, y, n) else: prompt = %s [%s]|%s: % (promptstr, n, y) while (True): ans = raw_input(prompt) if (not ans): return _default if ((ans != y) and (ans != Y) and (ans != n) and (ans ! = N)): print please enter again y or n. continue if ((ans == y) or (ans == Y)): return True if ((ans == n) or (ans == N)): return False pylab.figure(figsize=(12,14)) for i in xrange(1,options.n+1): t_list = [] a_list = [] e_list = [] i_list = [] q_list = [] Q_list = [] fname = %s%02i.aei % (options.infname,i) print fname all_lines = open(fname,r).readlines() n=0 for lines in all_lines: if n 3: t_in,a_in,e_in,i_in,peri_in,node_in,M_in,mass = lines.split() t_list.append(float(t_in)) a_list.append(float(a_in)) e_list.append(float(e_in)) i_list.append(float(i_in)) q_list.append(float(float(a_in)*(1. - float(e_in Q_list.append(float(float(a_in)*(1. + float(e_in n+=1 pylab.clf() pylab.subplot(321) pylab.plot(t_list,a_list,'r-') pylab.plot(t_list,Q_list,'b-') pylab.plot(t_list,q_list,'g-') pylab.subplot(322) pylab.plot(t_list,a_list,'r-') pylab.subplot(323) pylab.plot(t_list,Q_list,'b-') pylab.subplot(324) pylab.plot(t_list,q_list,'g-') pylab.subplot(325) pylab.plot(t_list,e_list,'r-') pylab.subplot(326) pylab.plot(t_list,i_list,'r-') #if i == 1: pylab.show() end = confirm(Finished?) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] From list of objects to plotting
I have some code that simplified looks like this: class cKBO(object): def __init__(cls): cls.a = 0. cls.e = 0. lines = open(test.file,r).readlines() nlist = [] for line in lines: obj = cKBO() (a,e) = line.split obj.a = float(a) obj.e = float(e) nlist.append(obj) I would now like to plot a vs e for all the obj objects in nlist. how do I do that? I tried plot(nlist[:].a,nlist[:].e,'ko') show() but that resulted in raceback (most recent call last): File /Users/tgrav/Work/MyCode/Python/MOPS/ckbos.py, line 108, in ? plot(nlist[:].a,nlist[:].e,'ko') AttributeError: 'list' object has no attribute 'a' Which is understandable. But how do I most easily convert a list of class objects into two lists of object variables? Cheers Tommy - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Forcing full value on axis
I have a plot where the x axis ticks are given as 0.1 0.15 0.20 0.025 0.30 0.35 with +3.732e2 given in the lower right of the axis. How can I force the ticks to have 373.3 373.35 and so on? Cheers Tommy - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plotting two histograms
I have two lists that I would like to plot as two separate histograms inside the same plot. However pylab.hist(h1list,26,facecolor='r') pylab.hist(h2list,26,alpha=0.3) pylab.show() seems to plot the two histograms with different x-y limits on the axis. Also how can I force the bins to have the same start and end? Cheers Tommy - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Plotting two histograms
On Apr 6, 2007, at 1:04 PM, Jeff Whitaker wrote: Tommy Grav wrote: I have two lists that I would like to plot as two separate histograms inside the same plot. However pylab.hist(h1list,26,facecolor='r') pylab.hist(h2list,26,alpha=0.3) pylab.show() seems to plot the two histograms with different x-y limits on the axis. Also how can I force the bins to have the same start and end? Cheers Tommy Tommy: Use the 'bins' keyword to pylab.hist (http:// matplotlib.sourceforge.net/matplotlib.pylab.html#-hist). Thanks. I noticed that on my own and for the first time in my python programming history used a list comprehension to generate the bins list :) The histograms are now displayed correctly. Cheers Tommy - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib and py2exe
It is hard to guess what exactly your problem is as you do not provide a code example or the traceback call of your exception. I would venture that you are trying to create a num_array without having Numerix, numpy or numarray imported or installed on your machine. Some more information about your troubles would be needed to really help you out. Cheers Tommy On Mar 31, 2007, at 3:50 PM, Archana Ganesan wrote: Hi all, I have a python application that uses matplotlib.I am trying to compile it into an executable using py2exe. I am encountering No module named num_array problem. I do not know how to resolve this. I notice that matplotlib.numerix is in the included package. Did you encounter this problem. I am very new to this and I have to get it done by tomm. So I am sorry if it is really silly. Thanks, Archana. On 3/31/07, Archana Ganesan [EMAIL PROTECTED] wrote: Hi all, I have a python application that uses matplotlib. I want to compile it into an executable. I tried using py2exe but it returned some error w.rt matplotlib. Cpuld anyone please help me with this? Is there some other way to get it done? Thanks, Archana -- --- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php? page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problem with set_xlim
You have to use set_ylim((0,2)) to set the y limits. Cheers Tommy On Jan 4, 2007, at 11:09 AM, Berthold Höllmann wrote: Considering the following script I would Expect a resulting y range of (1, 2) but I get (1, 3). Is this a bug or a feature. I'm using python 2.5, matplotlib 0.87.7. from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure fig = Figure() canvas = FigureCanvas(fig) ax = fig.add_subplot(111) lines = (ax.plot([1, 2, 3], [1, 2, 3]),) axes = fig.get_axes()[0] axes.set_xlim((0, 2)) axes.set_aspect('auto', adjustable='box') axes.grid(True) canvas.print_figure('out.eps') Kind regards Berthold -- __ Address: G / \ L Germanischer Lloyd phone: +49-40-36149-7374 -++- Vorsetzen 35 P.O.Box 111606 fax : +49-40-36149-7320 \__/ D-20459 HamburgD-20416 Hamburg -- --- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php? page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] ScipySuperpack
I installed the Mac ScipySuperpack (from http://www.scipy.org/Download). However it seems that the version of matplotlib in there is not compatible with their version of numpy [EMAIL PROTECTED] ch2/pbcd - python ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on Python 2.4.3 (#1, Apr 3 2006, 18:07:18) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type help, copyright, credits or license for more information. import numpy import pylab x = range(1,10) y = range(1,10) pylab.plot(x,y) [matplotlib.lines.Line2D instance at 0x2b20210] pylab.show() alloc: invalid block: 0xa08bcd8: a 68 0 Abort [EMAIL PROTECTED] ch2/pbcd - Anyone know how to fix this? Cheers Tommy - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Alloc error
Hi, I am currently running ActivePython 2.4.3 b11, with numpy 1.12881 and matplotlib 0.87.4. Running a code developed before I upgraded using theScipy Superpack for Mac (PowerPc) available at http://www.scipy.org/DownloadI get this error:[EMAIL PROTECTED] Spitzer/Objects - redspit -i Albiorix1v2 -a 8 -z 16pixel size = -2.45 2.45Albiorix1v2_ch1 47.6313694642 50.5503692627alloc: invalid block: 0xa08bcd8: a 68 0Abort[EMAIL PROTECTED] Spitzer/Objects - Anyone know what the deal is? I tried to upgrade to 0.87.6 for matplotlib, butthat of course failed as I am not running Python 2.5 :( CheersTommy[EMAIL PROTECTED]http://homepage.mac.com/tgrav/"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction" -- Albert Einstein - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Alloc error
Hi, I figured out that I could get matplotlib 0.87.6 for python 2.4 and have downloaded this and installed it. It seems to work, except when I try to do thisActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based onPython 2.4.3 (#1, Apr 3 2006, 18:07:18) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwinType "help", "copyright", "credits" or "license" for more information. import numpy import pylabRuntimeError: module compiled against version 102 of C-API but this version of numpy is 100The import of the numpy version of the nxutils module,_nsnxutils, failed. This is is either because numpy wasunavailable when matplotlib was compiled, because a dependency of_nsnxutils could not be satisfied, or because the build flag forthis module was turned off in setup.py. If it appears that_nsnxutils was not built, make sure you have a working copy ofnumpy and then re-install matplotlib. Otherwise, the followingtraceback gives more details:Traceback (most recent call last): File "stdin", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", line 1, in ? from matplotlib.pylab import * File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", line 199, in ? import mlab #so I can override hist, psd, etc... File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mlab.py", line 64, in ? import nxutils File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/nxutils.py", line 17, in ? from matplotlib._ns_nxutils import *ImportError: numpy.core.multiarray failed to import import numpy.core import numpy.core.multiarray import matplotlib My problem is that I have a code: from math import * import numpy from matplotlib import * filename = options.infname + '_ch1' im24 = pyImage.Image() im24.Open(filename) print filename,im24.avg, im24.max figim = figure.figure(figsize=(5,5)) figim._resize = False axsrc24 = figim.add_subplot(111, xlim=(0,200), ylim=(0,200), autoscale_on=False) axsrc24.set_title('Click to zoom') im24.Display(axsrc24)If I use from pylab import * the figim = figure line works, but since import pylab fails thescript fails. If I use from matplotlib import * I get this error:[EMAIL PROTECTED] Spitzer/Objects - redspit -i Albiorix1v2 -a 8 -z 16pixel size = -2.45 2.45Albiorix1v2_ch1 47.6313694642 50.5503692627Traceback (most recent call last): File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/redspit.py", line 95, in ? main() File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/redspit.py", line 50, in main figim = figure.figure(figsize=(5,5))NameError: global name 'figure' is not definedSo I am a little confused as to what is going on CheersTommy[EMAIL PROTECTED]http://homepage.mac.com/tgrav/"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction" -- Albert Einstein - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] x and y pointer positions
In a plot window (using Tkagg). just right of the menu the x and y positions of the pointer is shown when the mouse is in the window. Since I am using small windows this will change the size of the window. Is there a way to setthe format or remove this text?Cheers Tommy[EMAIL PROTECTED]http://homepage.mac.com/tgrav/"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genious -- and a lot of courage -- to move in the opposite direction" -- Albert Einstein - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Event handling for several windows
I have a program that uses matplotlib to plot two images. figim24 = figure(figsize=(5,5)) figim70 = figure(figsize=(5,5)) I want an event loop that will be able to register which of the two figures I mouse click in. When I only had one figure I used figim24.canvas.mpl_connect(button_press_event,clicker) but that obviously only register events in figim24. Can anyone guide me in the right direction for doing this? Cheers Tommy - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users