Re: [Matplotlib-users] Installing Matplotlib
Compiling some packages as fat binaries is a bit tricky. For some reason the double arch flag is messing it up. Are you set up using gcc 3.x or 4.x? If I recall correctly there has been some discussion of problems building matplotlib on the pythonmac-sig list, you might want to try looking in the archives over there. For that matter, is there a reason you don't want to use the binary on sourceforge? The python 2.5 version that's posted for 0.98.1 is dual architecture. David On 27-Jul-08, at 7:44 PM, Ari Ehrmann wrote: Hey all, I've been having a lot of trouble installing matplotlib. I'm using a macbook, on version 10.5.4 of Mac OS, intel processor (if that's important). I've installed both numpy and scipy without problems, but when I type this command to install matplotlib: CFLAGS=-Os -arch i386 -arch ppc LDFLAGS=-Os -arch i386 -arch ppc python setup.py build I get this output: = = = = = = == BUILDING MATPLOTLIB matplotlib: 0.98.3 python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.2.0.dev5513 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to import gtk in your build/install environment Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: no [Edit setup.cfg to suppress the above messages] = = = = = = == running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc - build/ lib.macosx-10.3-fat-2.5/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf - build/ lib.macosx-10.3-fat-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.ft2font' extension g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk - g -bundle -undefined dynamic_lookup -Os -arch i386 -arch ppc -Os - arch i386 -arch ppc build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3- fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/ cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/ IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/ cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib - lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/ matplotlib/ft2font.so ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc+ +.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++. 6.dylib, file is not of required architecture for architecture i386 collect2: ld returned 1 exit status ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc+ +.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++. 6.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/S0/S0i2z-OAEtG1ZHpis54obU++ +TM/-Tmp-//ccfhpaN5.out (No such file or directory) error: command 'g++' failed with exit status 1 Has anyone had this problem or know what's even going here? Any help would be greatly appreciated. Thanks, Ari - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest
Re: [Matplotlib-users] Installing Matplotlib
Hi, While others have mentioned the dual architecture problem, I'm going to completely divert your question and just point you to these two install notes for os x ... I think the last time I compiled matplotlib from source, I followed this .. it worked quite flawlessly on my MBP: http://ipython.scipy.org/moin/Py4Science/InstallationOSX Hopefully that will get you up and running, but if creating a universal binary is important to you, you can try looking here: http://ipython.scipy.org/moin/MatplotlibOSXBuildNotes HTH, -steve On Jul 27, 2008, at 7:44 PM, Ari Ehrmann wrote: Hey all, I've been having a lot of trouble installing matplotlib. I'm using a macbook, on version 10.5.4 of Mac OS, intel processor (if that's important). I've installed both numpy and scipy without problems, but when I type this command to install matplotlib: CFLAGS=-Os -arch i386 -arch ppc LDFLAGS=-Os -arch i386 -arch ppc python setup.py build I get this output: = = = = = = == BUILDING MATPLOTLIB matplotlib: 0.98.3 python: 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.2.0.dev5513 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to import gtk in your build/install environment Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: no [Edit setup.cfg to suppress the above messages] = = = = = = == running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc - build/ lib.macosx-10.3-fat-2.5/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf - build/ lib.macosx-10.3-fat-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.ft2font' extension g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk - g -bundle -undefined dynamic_lookup -Os -arch i386 -arch ppc -Os - arch i386 -arch ppc build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3- fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/ cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/ IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/ cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib - lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/ matplotlib/ft2font.so ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc+ +.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++. 6.dylib, file is not of required architecture for architecture i386 collect2: ld returned 1 exit status ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc+ +.dylib, file is not of required architecture ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libstdc++. 6.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/S0/S0i2z-OAEtG1ZHpis54obU++ +TM/-Tmp-//ccfhpaN5.out (No such file or directory) error: command 'g++' failed with exit status 1 Has anyone had this problem or know what's even going here? Any help would be greatly appreciated. Thanks, Ari - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.Net email is sponsored by the Moblin
[Matplotlib-users] An updated matplotlib user's guide
Is it only me or is the user's guide linked to from http://matplotlib.sourceforge.net/ (http://matplotlib.sourceforge.net/users_guide_0.98.1.pdf) quite old ? The new user's guide seems to be available from http://matplotlib.sourceforge.net/doc/html/index.html -- View this message in context: http://www.nabble.com/An-updated-matplotlib-user%27s-guide-tp18695659p18695659.html Sent from the matplotlib - users mailing list archive at Nabble.com. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] upgrade problems
I am having problems plotting anything using version 0.98.1 on Linux Debian 4. But 0.91.4 works fine. When I try to plot something I get this error on the console: Traceback (most recent call last): File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py, line 331, in expose_event self._render_figure(self._pixmap, w, h) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py, line 75, in _render_figure FigureCanvasAgg.draw(self) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 357, in draw self.renderer = self.get_renderer() File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 368, in get_renderer self.renderer = RendererAgg(w, h, self.figure.dpi) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 116, in __init__ self.draw_polygon = self._renderer.draw_polygon AttributeError: draw_polygon And here is the configuration info from when I installed from src: BUILDING MATPLOTLIB matplotlib: 0.98.1 python: 2.4.4 (#2, Apr 15 2008, 23:43:20) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.1.0 freetype2: 9.10.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.15beta5 Tkinter: Tkinter: 39220, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.8.1 * WxAgg extension not required for wxPython = 2.8 Gtk+: gtk+: 2.8.20, glib: 2.12.4, pygtk: 2.8.6, pygobject: [pre-pygobject] Qt: Qt: 3.3.6, PyQt: 3.16 Qt4: no Cairo: 1.2.0 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: present, version unknown pytz: 2006p OPTIONAL USETEX DEPENDENCIES dvipng: 1.9 ghostscript: 8.15.3 latex: 3.141592 pdftops: 3.00 EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: no I am guessing that I am either missing a library or need an updated version. Does anyone have any ideas? Thanks, -Ben - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Colormap cluttering?
Hello, I would like to have a cluttering functionality to colorbar. http://en.wikipedia.org/wiki/Clutter_(radar) Before writing it, I would like to know if there is a way to doing it with matplotlib. What I mean by cluttering is: You've got a colormap associated with a graphic where value goes from 0 to 255 for example. Assigning a classical colormap (for example cm.jet) 0 value will be blue and 255 one will be red. What I need is a low clutter and max clutter, if I set low clutter to 10 and ax cluter to 250 then: Blue will be for value from 0 to 10 Then the colormap do his job from 10 to 250 and finally From 250 to 255 colr will be set to max one = red. Is it ever done in matplotlib, if not what could be the strategy here.? I was thinking of set_over/set_under but seems not be exactly what I need because I want to recreate the colormap from 10 to 250 with N segments. (moreover I don't understand how you set the over/under value.) Laurent - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] upgrade problems
Ben Axelrod wrote: I am having problems plotting anything using version 0.98.1 on Linux Debian 4. But 0.91.4 works fine. If you are compiling from source, the problem could be that setup.py does not clean out the destination directory. For example, if you are installing in /usr/local/lib/python2.5/site-packages then you should first do rm -r /usr/local/lib/python2.5/site-packages/matplotlib* before installing another version. Eric When I try to plot something I get this error on the console: Traceback (most recent call last): File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py, line 331, in expose_event self._render_figure(self._pixmap, w, h) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py, line 75, in _render_figure FigureCanvasAgg.draw(self) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 357, in draw self.renderer = self.get_renderer() File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 368, in get_renderer self.renderer = RendererAgg(w, h, self.figure.dpi) File /usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py, line 116, in __init__ self.draw_polygon = self._renderer.draw_polygon AttributeError: draw_polygon And here is the configuration info from when I installed from src: BUILDING MATPLOTLIB matplotlib: 0.98.1 python: 2.4.4 (#2, Apr 15 2008, 23:43:20) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.1.0 freetype2: 9.10.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.15beta5 Tkinter: Tkinter: 39220, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.8.1 * WxAgg extension not required for wxPython = 2.8 Gtk+: gtk+: 2.8.20, glib: 2.12.4, pygtk: 2.8.6, pygobject: [pre-pygobject] Qt: Qt: 3.3.6, PyQt: 3.16 Qt4: no Cairo: 1.2.0 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: present, version unknown pytz: 2006p OPTIONAL USETEX DEPENDENCIES dvipng: 1.9 ghostscript: 8.15.3 latex: 3.141592 pdftops: 3.00 EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: no I am guessing that I am either missing a library or need an updated version. Does anyone have any ideas? Thanks, -Ben - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Colormap cluttering?
Laurent Dufrechou wrote: Hello, I would like to have a cluttering functionality to colorbar. http://en.wikipedia.org/wiki/Clutter_(radar) Before writing it, I would like to know if there is a way to doing it with matplotlib. What I mean by cluttering is: You’ve got a colormap associated with a graphic where value goes from 0 to 255 for example. Assigning a classical colormap (for example cm.jet) 0 value will be blue and 255 one will be red. What I need is a low clutter and max clutter, if I set low clutter to 10 and ax cluter to 250 then: Blue will be for value from 0 to 10 Then the colormap do his job from 10 to 250 and finally From 250 to 255 colr will be set to max one = red. Is it ever done in matplotlib, if not what could be the strategy here…? I was thinking of set_over/set_under but seems not be exactly what I need because I want to recreate the colormap from 10 to 250 with N segments. (moreover I don’t understand how you set the over/under value…) Dear Laurent, if I understand you correctly, set vmin=10 and vmax=250 and it will do what you want. -Andrew - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Colormap cluttering?
Laurent Dufrechou wrote: Hello, I would like to have a cluttering functionality to colorbar. http://en.wikipedia.org/wiki/Clutter_(radar) Before writing it, I would like to know if there is a way to doing it with matplotlib. What I mean by cluttering is: You’ve got a colormap associated with a graphic where value goes from 0 to 255 for example. Assigning a classical colormap (for example cm.jet) 0 value will be blue and 255 one will be red. What I need is a low clutter and max clutter, if I set low clutter to 10 and ax cluter to 250 then: Blue will be for value from 0 to 10 Then the colormap do his job from 10 to 250 and finally From 250 to 255 colr will be set to max one = red. Is it ever done in matplotlib, if not what could be the strategy here…? I was thinking of set_over/set_under but seems not be exactly what I need because I want to recreate the colormap from 10 to 250 with N segments. (moreover I don’t understand how you set the over/under value…) If you don't really care how many colors are in the map, then for your 0-255 example, try this: import numpy as np import matplotlib.pyplot as plt fakedata = np.random.rand(10,20) * 255.0 cmap = plt.cm.jet norm = plt.Normalize(vmin=100, vmax=150) plt.imshow(fakedata, cmap=cmap, norm=norm, interpolation=nearest) plt.colorbar(extend=both) plt.show() I made the colored range small to emphasize what you call the cluttering effect. We are taking advantage of the default, which is that the over and under values are the top and bottom ends of the colormap. If you want other colors for the ends, then after defining your cmap, use, e.g.: cmap.set_under('w') cmap.set_over('k') If you want to use a smaller number of colors in your colormap, then you need to make the colormap this way, for example: from matplotlib.colors import LinearSegmentedColormap from matplotlib._cm import _jet_data cmap = LinearSegmentedColormap(yourname, _jet_data, N=10) (I should add a helper function to make this more obvious and straightforward.) Eric - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users