Re: [matplotlib-devel] Inches?
This is much worse than I thought. The "inch" unit is used in many places in matplotlib. In particular in `figure` and `savefig`. Please, please consider allowing other units. Let me emphasise this once more: in Europe, and, I believe in most places around the world, one NEVER uses inches. Neither in engineering nor, i think, in typography. For most people "inch" is basically an unusual measure of how big screens are. I'm not kidding. Same for dpi, it's a specific measurement of a resolution but nobody thinks of it as a number of pixels per inches. I have nothing against an internal use of inches inside matplotlib but please consider allowing other units for all kinds of interfaces with the user! The best choice in my opinion would be to have a unit preference in the .matplotlibrc file. This unit could be, say, `inch` or `cm` (or mm). Then any length would be expressed using this unit of length. That seems simple enough, doesn't it? How difficult would it be to implement this? As I said before, I'm willing to help for this. cheers, == Olivier On 29/10/2007, Christopher Barker <[EMAIL PROTECTED]> wrote: > > Eric Firing wrote: > > Somewhere along the line, it may make sense to support the metric system > > better in mpl. > > It seems to me that the "right" way to do this is to use some sort of > "array-with_units" class. Then what MPL would except was a "length", and > the user would specify what they want. i.e: > > figure(figsize = units.inches((8.5,11)) > > rather than: > > figure(figsize = (8.5, 11), units=inches) > > Though this does make for more typing. With the later way, a system > default for units could be used more easily. > > I really want a unit class like this for other stuff anyway. > > -- just thinking in email > > -Chris > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R(206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [EMAIL PROTECTED] > > - > 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-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > - 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-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] OS X Leopard install, snag
I have a new intel powerbook running OS X 10.5 (leopard) which I upgraded via DVD from a factory installed 10.4. I decided to take detailed notes on every step of configuring the box as a development machine for scientific python, figuring it would be useful to others. The install of ipython, numpy and scipy went really well (only one snag in scipy following the wiki, which I updated and is noted in my notes below). But the main problem, sadly, is a strange problem I've hit trying to compile matplotlib. My compile is dying with a mysterious warning about PPC (how did that get in to the compiler flags?) with some strange hybrid of 10.4 and 10.3 stuff in the gcc command. If I manually paste in the g++ command below and remove the -arch ppc part, it compiles fine, so this is the source of my problems. I don't know if this is a feature or a bug (universal binary support?) but if someone could advise me what or where is going wrong and how to fix it, that would be great. Here is the shorted build output with the compiler command and error: BUILDING MATPLOTLIB matplotlib: 0.90.1 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.0.4.dev4380 freetype2: found, but unknown version (no pkg-config) OPTIONAL DEPENDENCIES Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.3.0 * WxAgg extension not required for wxPython >= 2.8 Qt: no Qt4: no Cairo: no libpng: found, but unknown version (no pkg-config) [Edit setup.cfg to suppress the above messages] running build running build_py creating build creating build/lib.macosx-10.3-fat-2.5 copying lib/pylab.py -> build/lib.macosx-10.3-fat-2.5 creating build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/__init__.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/_cm.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/_mathtext_data.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/_pylab_helpers.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/afm.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/agg.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/art3d.py -> build/lib.macosx-10.3-fat-2.5/matplotlib copying lib/matplotlib/artist.py -> build/lib.macosx-10.3-fat-2.5/matplotlib ..snip lots of copying running build_ext building 'matplotlib.ft2font' extension C compiler: gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 creating build/temp.macosx-10.3-fat-2.5 creating build/temp.macosx-10.3-fat-2.5/src creating build/temp.macosx-10.3-fat-2.5/CXX compile options: '-I/usr/local/include -I/usr/include -I. -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c' gcc: CXX/cxxextensions.c In file included from /usr/include/math.h:26, from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:200, from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57, from ./CXX/WrapPython.h:47, from CXX/cxxextensions.c:38: /usr/include/architecture/ppc/math.h:675: warning: conflicting types for built-in function 'scalb' gcc: CXX/cxx_extensions.cxx gcc: src/ft2font.cpp gcc: CXX/IndirectPythonInterface.cxx gcc: src/mplutils.cpp gcc: CXX/cxxsupport.cxx g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup 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 -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/libfreetype.dylib, file is not of required architecture ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib, missing required architecture ppc in file ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib, missing required architecture ppc in file for architecture ppc collect2: ld returned 1 exit status lipo: can
Re: [matplotlib-devel] OS X Leopard install, snag
John Hunter <[EMAIL PROTECTED]> writes: > ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.1.dylib, > missing required architecture ppc in file for architecture ppc > collect2: ld returned 1 exit status Just a guess: Apple's Python is configured to compile everything as universal, but you have installed a non-universal gcc in /usr/local, perhaps as a result of installing some version of gfortran. -- Jouni - 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-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] OS X Leopard install, snag
On 11/4/07, Jouni K Seppänen <[EMAIL PROTECTED]> wrote: > Just a guess: Apple's Python is configured to compile everything as universal, > but you have installed a non-universal gcc in /usr/local, perhaps as a result > of installing some version of gfortran. Possibly, but 'which gcc' points to the /usr/bin apple version, and the gfortran I installed was fortran only (not the whole gcc suite) and is in /usr/local/ Macintosh:~ jdhunter$ which gcc /usr/bin/gcc Macintosh:~ jdhunter$ ls -ld /usr/bin/gcc lrwxr-xr-x 1 root wheel 7 Nov 3 18:00 /usr/bin/gcc -> gcc-4.0 Macintosh:~ jdhunter$ ls -ld /usr/bin/gcc-4.0 -rwxr-xr-x 1 root wheel 93072 Sep 23 17:37 /usr/bin/gcc-4.0 Macintosh:~ jdhunter$ ls -ld /usr/local/bin/g* -rwxr-xr-x 1 root wheel 160 Mar 22 2007 /usr/local/bin/genaxmodule -rwxr-xr-x@ 1 root wheel 318168 Oct 31 08:27 /usr/local/bin/gfortran mpl should not be invoking gfortran, so I am not sure where the problem is creeping in. JDH JDH - 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-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] OS X Leopard install, snag
John Hunter <[EMAIL PROTECTED]> writes: > > Just a guess: Apple's Python is configured to compile everything as > > universal, but you have installed a non-universal gcc in /usr/local, > > perhaps as a result of installing some version of gfortran. > > Possibly, but 'which gcc' points to the /usr/bin apple version, and > the gfortran I installed was fortran only (not the whole gcc suite) > and is in /usr/local/ You have -L/usr/local/lib in the compile flags, and ld is finding a libgcc_s.10.4.dylib in /usr/local: > ld: warning in > /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib, > missing required architecture ppc in file -- Jouni - 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-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] OS X Leopard install, snag
John Hunter wrote: > On 11/4/07, Jouni K Seppänen <[EMAIL PROTECTED]> wrote: > >> Just a guess: Apple's Python is configured to compile everything as >> universal, >> but you have installed a non-universal gcc in /usr/local, perhaps as a >> result >> of installing some version of gfortran. > > Possibly, but 'which gcc' points to the /usr/bin apple version, and > the gfortran I installed was fortran only (not the whole gcc suite) > and is in /usr/local/ > > Macintosh:~ jdhunter$ which gcc > /usr/bin/gcc > Macintosh:~ jdhunter$ ls -ld /usr/bin/gcc > lrwxr-xr-x 1 root wheel 7 Nov 3 18:00 /usr/bin/gcc -> gcc-4.0 > Macintosh:~ jdhunter$ ls -ld /usr/bin/gcc-4.0 > -rwxr-xr-x 1 root wheel 93072 Sep 23 17:37 /usr/bin/gcc-4.0 > Macintosh:~ jdhunter$ ls -ld /usr/local/bin/g* > -rwxr-xr-x 1 root wheel 160 Mar 22 2007 /usr/local/bin/genaxmodule > -rwxr-xr-x@ 1 root wheel 318168 Oct 31 08:27 /usr/local/bin/gfortran > > mpl should not be invoking gfortran, so I am not sure where the > problem is creeping in. Are you using the gfortran from hpc.sf.net? I don't recommend it anymore. I use the binary from http://r.research.att.com/tools/. It is universal. That should help. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco - This SF.net email is sponsored by: 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-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel