You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(33) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(7) |
Feb
(44) |
Mar
(51) |
Apr
(43) |
May
(43) |
Jun
(36) |
Jul
(61) |
Aug
(44) |
Sep
(25) |
Oct
(82) |
Nov
(97) |
Dec
(47) |
2005 |
Jan
(77) |
Feb
(143) |
Mar
(42) |
Apr
(31) |
May
(93) |
Jun
(93) |
Jul
(35) |
Aug
(78) |
Sep
(56) |
Oct
(44) |
Nov
(72) |
Dec
(75) |
2006 |
Jan
(116) |
Feb
(99) |
Mar
(181) |
Apr
(171) |
May
(112) |
Jun
(86) |
Jul
(91) |
Aug
(111) |
Sep
(77) |
Oct
(72) |
Nov
(57) |
Dec
(51) |
2007 |
Jan
(64) |
Feb
(116) |
Mar
(70) |
Apr
(74) |
May
(53) |
Jun
(40) |
Jul
(519) |
Aug
(151) |
Sep
(132) |
Oct
(74) |
Nov
(282) |
Dec
(190) |
2008 |
Jan
(141) |
Feb
(67) |
Mar
(69) |
Apr
(96) |
May
(227) |
Jun
(404) |
Jul
(399) |
Aug
(96) |
Sep
(120) |
Oct
(205) |
Nov
(126) |
Dec
(261) |
2009 |
Jan
(136) |
Feb
(136) |
Mar
(119) |
Apr
(124) |
May
(155) |
Jun
(98) |
Jul
(136) |
Aug
(292) |
Sep
(174) |
Oct
(126) |
Nov
(126) |
Dec
(79) |
2010 |
Jan
(109) |
Feb
(83) |
Mar
(139) |
Apr
(91) |
May
(79) |
Jun
(164) |
Jul
(184) |
Aug
(146) |
Sep
(163) |
Oct
(128) |
Nov
(70) |
Dec
(73) |
2011 |
Jan
(235) |
Feb
(165) |
Mar
(147) |
Apr
(86) |
May
(74) |
Jun
(118) |
Jul
(65) |
Aug
(75) |
Sep
(162) |
Oct
(94) |
Nov
(48) |
Dec
(44) |
2012 |
Jan
(49) |
Feb
(40) |
Mar
(88) |
Apr
(35) |
May
(52) |
Jun
(69) |
Jul
(90) |
Aug
(123) |
Sep
(112) |
Oct
(120) |
Nov
(105) |
Dec
(116) |
2013 |
Jan
(76) |
Feb
(26) |
Mar
(78) |
Apr
(43) |
May
(61) |
Jun
(53) |
Jul
(147) |
Aug
(85) |
Sep
(83) |
Oct
(122) |
Nov
(18) |
Dec
(27) |
2014 |
Jan
(58) |
Feb
(25) |
Mar
(49) |
Apr
(17) |
May
(29) |
Jun
(39) |
Jul
(53) |
Aug
(52) |
Sep
(35) |
Oct
(47) |
Nov
(110) |
Dec
(27) |
2015 |
Jan
(50) |
Feb
(93) |
Mar
(96) |
Apr
(30) |
May
(55) |
Jun
(83) |
Jul
(44) |
Aug
(8) |
Sep
(5) |
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(8) |
2
(3) |
3
(3) |
4
(11) |
5
(1) |
6
(10) |
7
(1) |
8
(24) |
9
(4) |
10
(2) |
11
(3) |
12
(1) |
13
(4) |
14
(2) |
15
(6) |
16
|
17
(9) |
18
(12) |
19
(4) |
20
(4) |
21
(6) |
22
(10) |
23
(17) |
24
(2) |
25
|
26
|
27
(1) |
28
(17) |
29
(4) |
30
(5) |
|
|
|
From: Chris <ce...@gm...> - 2009-09-30 16:37:05
|
Chris <ceball@...> writes: > > Hi, > > I posted this same message to matplotlib-users a couple of days ago, but now I > realize that this list is the more appropriate place. > > I'm having trouble building matplotlib 0.99.1.1 (transcript below). > > I'm using copies of Python (2.5.1) and Tcl/Tk (8.5.5) that I have > built myself, and that are apparently working fine. I can use this > exact procedure to build 0.91.4 without any problems. > > Any suggestions would be greatly appreciated - thanks! > > Chris > > $ cd matplotlib-0.99.1.1 > $ env PREFIX=/a/b/ LD_LIBRARY_PATH=/a/b/lib /a/b/bin/python setup.py build I'm not sure what changed in matplotlib between 0.91.4 and 0.99.1.1, but the procedure below seems to work for me: $ tar -xzf matplotlib-0.99.1.1.tar.gz $ cd matplotlib-0.99.1.1/ $ rm setup.cfg $ /a/b/bin/python setup.py build_ext -L$/a/b/lib/ $ env PREFIX=/a/b/ LD_LIBRARY_PATH=/a/b/lib /a/b/bin/python setup.py build Chris |
From: Jouni K. S. <jk...@ik...> - 2009-09-30 14:35:55
|
Michael Oevermann <mic...@tu...> writes: > is there a way to use patterns instead of colors for pie and bar > charts and for filling in general? It would be very useful to have > this feature for printing (and publishing) in black and white or > greyscale. Yes: http://matplotlib.sourceforge.net/examples/pylab_examples/hatch_demo.html -- Jouni K. Seppänen http://www.iki.fi/jks |
From: Michael O. <mic...@tu...> - 2009-09-30 14:28:39
|
Hi, is there a way to use patterns instead of colors for pie and bar charts and for filling in general? It would be very useful to have this feature for printing (and publishing) in black and white or greyscale. Best regards Michael |
From: Chris <ce...@gm...> - 2009-09-30 08:53:54
|
Hi, I posted this same message to matplotlib-users a couple of days ago, but now I realize that this list is the more appropriate place. I'm having trouble building matplotlib 0.99.1.1 (transcript below). I'm using copies of Python (2.5.1) and Tcl/Tk (8.5.5) that I have built myself, and that are apparently working fine. I can use this exact procedure to build 0.91.4 without any problems. Any suggestions would be greatly appreciated - thanks! Chris $ cd matplotlib-0.99.1.1 $ env PREFIX=/a/b/ LD_LIBRARY_PATH=/a/b/lib /a/b/bin/python setup.py build ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.99.1.1 python: 2.5.1 (r251:54863, Feb 5 2009, 13:11:08) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.2.1 freetype2: 9.10.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.10 Tkinter: Tkinter: 50704, Tk: 8.5, Tcl: 8.5 Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: no 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: 1.5 ghostscript: 8.15.2 latex: 3.141592 pdftops: 3.00 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_too\ lkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matp\ lotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz\ ', 'dateutil', 'dateutil/zoneinfo'] running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-i686-2.5/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-i686-2.5/matplotlib/mpl-data running build_ext building 'matplotlib.backends._tkagg' extension g++ -pthread -shared build/temp.linux-i686-2.5/src/agg_py_transforms.o build/temp.linux-i686-2.5/src/_tkagg.o build/temp.\ linux-i686-2.5/CXX/cxx_extensions.o build/temp.linux-i686-2.5/CXX/cxxsupport.o build/temp.linux-i686-2.5/CXX/IndirectPyth\ onInterface.o build/temp.linux-i686-2.5/CXX/cxxextensions.o -L/usr/lib -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/lib6\ 4 -L/usr/local/lib -L/usr/lib -L/usr/lib64 -ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o build/lib.linux-i\ 686-2.5/matplotlib/backends/_tkagg.so /usr/bin/ld: cannot find -ltk8.5 collect2: ld returned 1 exit status error: command 'g++' failed with exit status 1 make: *** [matplotlib] Error 1 $ ls /a/b/lib/*tk* lib/libtk8.5.so lib/libtkstub8.5.a lib/tkConfig.sh ... |
From: William S. <ws...@gm...> - 2009-09-30 04:18:11
|
On Tue, Sep 29, 2009 at 3:07 PM, Barry Scott <ba...@ba...> wrote: > > On 28 Sep 2009, at 17:27, William Stein wrote: > >> On Mon, Sep 28, 2009 at 9:14 AM, John Hunter <jd...@gm...> wrote: >>> >>> On Mon, Sep 28, 2009 at 10:48 AM, William Stein <ws...@gm...> wrote: >>>> >>>> If you could just try running your matplotlib build on >>>> bsd.math.washington.edu and reporting about whether or not it works, >>>> that would be very helpful, since it will indicate whether the problem >>>> is somehow in Sage or in pyCXX or Matplotlib itself or something else. >>> >>> I was able to build into a mostly clean environment (rebuild all deps >>> zlip, freetype, png) using my OSX make file in, but I had to update >>> the MACOSX_DEPLOYMENT_TARGET to 10.6 (I've committed this to svn >>> HEAD). >>> >>> >>> PREFIX=~/devtest make -f make.osx fetch deps mpl_build mpl_install >>> >>> But even simple tests are failing with:: >>> >>> jdh2358@bsd:~> LD_LIBRARY_PATH=~/devtest/lib/ >>> PYTHONPATH=~/devtest/lib/python2.6/site-packages/ /usr/bin/python -c >>> 'import matplotlib; matplotlib.use("Agg"); from matplotlib.pyplot >>> import *; plot([1,2,3]); savefig("test")' >>> Traceback (most recent call last): >>> File "<string>", line 1, in <module> >>> File >>> "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/pyplot.py", >>> line 7, in <module> >>> from matplotlib.figure import Figure, figaspect >>> File >>> "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/figure.py", >>> line 16, in <module> >>> import artist >>> File >>> "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/artist.py", >>> line 6, in <module> >>> from transforms import Bbox, IdentityTransform, TransformedBbox, >>> TransformedPath >>> File >>> "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/transforms.py", >>> line 34, in <module> >>> from matplotlib._path import affine_transform >>> ImportError: >>> /Users/jdh2358/devtest/lib/python2.6/site-packages/matplotlib/_path.so: >>> no appropriate 64-bit architecture (see "man python" for running in >>> 32-bit mode) > > This error has nothing to do the PyCXX isn't it a build problem not crating > a fat binary with -arch x86_64 for _path.so. Use lipo -info to see what is > inside _path.so. > >>> >>> I'm attaching my build output in case anyone sees anything that might >>> be triggering this 32bit/64bit problem (see attached for full output). >>> I did not rebuild numpy and this may be the problem since the failure >>> is in the _path module. I'll give that a try next >> >> I think it's definitely an issue with PyCXX. I installed the latest >> version of PyCXX and tried their test example program, and got the >> dreaded "Abort trap": > > >> >> bash-3.2$ python >> Python 2.6.2 (r262:71600, Sep 27 2009, 13:41:53) >> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >>>>> >>>>> import CXX.example >> >> CXX is installed. >> The support files you need are in the PYTHON/etc/CXX directory. >> The include files are in the distutils include path already. >> Just refer to them as "CXX/CXX_Objects.h", etc. >> >> range object created 0x1003140b0 >> range object destroyed 0x1003140b0 >>>>> >>>>> CXX.example.test() >> >> Example Test starting >> Trying to convert a NULL to an Py::Int >> Abort trap > >> bash-3.2$ pwd >> >> /Users/was/build/sage-4.1.2.alpha4/spkg/build/matplotlib/trunk/matplotlib/pycxx-6.1.1/Demo/Python2 >> >> ---- >> >> Note that installing PyCXX and their test program was not easy. I >> watched their "python setup.py install" fail repeatedly, then I would >> copy missing files where they should go, and iterate (about 6 times > > I never use the setup.py - I keep trying to delete it from the kits but have > users want > it and contribute fixes. > > I do not recommend installing PyCXX into a system for a couple of reasons. > > On one system you may well end up using more then one version of PyCXX. > For example one older version of maintenance and a newer version for new > development. > > YOu may have more then one project using PyCXX that need compiler options > that conflict. If you install PyCXX into the system the object code will be > wrong > so some projects. > > Your experience is convincing me to delete setup.py to avoid this in future. > > However the tests do all work on 10.6. You will need a new make file to use > Apple's python 2.6.1. The PyCXX 6.1.1 kit does not have one to do this. > > > > > Save it to the top of the PyCXX files, where all the other make files are. > > Then you can build and run all tests with: > > $ make -f example_mac_apple_py26.mak clean test > > All the tests will pass without error. > > Attached is the log of the build and test on Mac OS X 10.6.1 I ran just now > to confirm this. > > > > > > I suspect that the PyCXX that you installed with setup.py is not correct. > I suggest you delete it from out of the system and point directly to the > headers and C and C++ files you need out of a exploded tarball. > > This is what I do for PySVN for example. > >> >> >> I've cc'd the PyCXX maintainer Barry Scott. Barry, do you have access >> to an OS X 10.6 install, since it seems PyCXX is broken there? If >> not, I can give you an account on a machine at University of >> Washington. PyCXX is the single component of Sage >> (http://sagemath.org) that is holding us back from finishing the OS X >> 10.6 port. >> >> -- William > > Let me know how else I can help. Thanks for all your ideas. Inspired by your remarks I tried again and the first thing I attempted was to take matplotlib's build lines for building ft2font (which uses PyCXX) and just paste them into my console instead of letting them be built under setup.py. Amazingly enough doing that completely fixes all the problems. That suggests there is something amis with the environment that Python's distutils and matplotlib create when building ft2font + pyCXX. My solution for Sage for now will be to rerun those lines explicitly when building Sage on OS X 10.6, and hope for John Hunter to be able to replicate the problem and come up with something better in the next few weeks (or I'll come back to it later). William |
From: Barry S. <ba...@ba...> - 2009-09-29 22:07:18
|
On 28 Sep 2009, at 17:27, William Stein wrote: > On Mon, Sep 28, 2009 at 9:14 AM, John Hunter <jd...@gm...> > wrote: >> On Mon, Sep 28, 2009 at 10:48 AM, William Stein <ws...@gm...> >> wrote: >>> If you could just try running your matplotlib build on >>> bsd.math.washington.edu and reporting about whether or not it works, >>> that would be very helpful, since it will indicate whether the >>> problem >>> is somehow in Sage or in pyCXX or Matplotlib itself or something >>> else. >> >> I was able to build into a mostly clean environment (rebuild all deps >> zlip, freetype, png) using my OSX make file in, but I had to update >> the MACOSX_DEPLOYMENT_TARGET to 10.6 (I've committed this to svn >> HEAD). >> >> >> PREFIX=~/devtest make -f make.osx fetch deps mpl_build mpl_install >> >> But even simple tests are failing with:: >> >> jdh2358@bsd:~> LD_LIBRARY_PATH=~/devtest/lib/ >> PYTHONPATH=~/devtest/lib/python2.6/site-packages/ /usr/bin/python -c >> 'import matplotlib; matplotlib.use("Agg"); from matplotlib.pyplot >> import *; plot([1,2,3]); savefig("test")' >> Traceback (most recent call last): >> File "<string>", line 1, in <module> >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ >> matplotlib/pyplot.py", >> line 7, in <module> >> from matplotlib.figure import Figure, figaspect >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ >> matplotlib/figure.py", >> line 16, in <module> >> import artist >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ >> matplotlib/artist.py", >> line 6, in <module> >> from transforms import Bbox, IdentityTransform, TransformedBbox, >> TransformedPath >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ >> matplotlib/transforms.py", >> line 34, in <module> >> from matplotlib._path import affine_transform >> ImportError: /Users/jdh2358/devtest/lib/python2.6/site-packages/ >> matplotlib/_path.so: >> no appropriate 64-bit architecture (see "man python" for running in >> 32-bit mode) This error has nothing to do the PyCXX isn't it a build problem not crating a fat binary with -arch x86_64 for _path.so. Use lipo -info to see what is inside _path.so. >> >> I'm attaching my build output in case anyone sees anything that might >> be triggering this 32bit/64bit problem (see attached for full >> output). >> I did not rebuild numpy and this may be the problem since the failure >> is in the _path module. I'll give that a try next > > I think it's definitely an issue with PyCXX. I installed the latest > version of PyCXX and tried their test example program, and got the > dreaded "Abort trap": > > bash-3.2$ python > Python 2.6.2 (r262:71600, Sep 27 2009, 13:41:53) > [GCC 4.2.1 (Apple Inc. build 5646)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import CXX.example > CXX is installed. > The support files you need are in the PYTHON/etc/CXX directory. > The include files are in the distutils include path already. > Just refer to them as "CXX/CXX_Objects.h", etc. > > range object created 0x1003140b0 > range object destroyed 0x1003140b0 >>>> CXX.example.test() > Example Test starting > Trying to convert a NULL to an Py::Int > Abort trap > bash-3.2$ pwd > /Users/was/build/sage-4.1.2.alpha4/spkg/build/matplotlib/trunk/ > matplotlib/pycxx-6.1.1/Demo/Python2 > > ---- > > Note that installing PyCXX and their test program was not easy. I > watched their "python setup.py install" fail repeatedly, then I would > copy missing files where they should go, and iterate (about 6 times I never use the setup.py - I keep trying to delete it from the kits but have users want it and contribute fixes. I do not recommend installing PyCXX into a system for a couple of reasons. On one system you may well end up using more then one version of PyCXX. For example one older version of maintenance and a newer version for new development. YOu may have more then one project using PyCXX that need compiler options that conflict. If you install PyCXX into the system the object code will be wrong so some projects. Your experience is convincing me to delete setup.py to avoid this in future. However the tests do all work on 10.6. You will need a new make file to use Apple's python 2.6.1. The PyCXX 6.1.1 kit does not have one to do this. |
From: Chris <ce...@gm...> - 2009-09-29 19:55:38
|
John Hunter <jdh2358@...> writes: > > On Wed, Sep 23, 2009 at 8:47 AM, Lev Givon <lev@...> wrote: > > contain a setup.cfg file: > > > > $ tar zft matplotlib-0.99.1.tar.gz |grep setup.cfg > > matplotlib-0.99.1/setup.cfg > > matplotlib-0.99.1/setup.cfg.template > > It seems to depend on which mirror you get the file from. From Voxel, > I see setup.cfg but from "German Research Network (Berlin, Germany) " > I do not see it. We may just need time for the mirrors to update. I > probably should have used a different file name... John Hunter <jdh2358@...> writes: > > On Wed, Sep 23, 2009 at 8:47 AM, Lev Givon <lev@...> wrote: > > contain a setup.cfg file: > > > > $ tar zft matplotlib-0.99.1.tar.gz |grep setup.cfg > > matplotlib-0.99.1/setup.cfg > > matplotlib-0.99.1/setup.cfg.template > > It seems to depend on which mirror you get the file from. From Voxel, > I see setup.cfg but from "German Research Network (Berlin, Germany) " > I do not see it. We may just need time for the mirrors to update. I > probably should have used a different file name... I also find setup.cfg in 0.99.1.1.tar.gz, and had to delete it to begin building: $ wget http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib- 0.99.1/matplotlib-0.99.1.1.tar.gz?use_mirror=kent ... 20:44:41 (2.11 MB/s) - `matplotlib-0.99.1.1.tar.gz' saved [11905737/11905737] $ tar xf matplotlib-0.99.1.1.tar.gz $ cd matplotlib-0.99.1.1 $ ls setup.cfg setup.cfg Chris |
From: Phillip M. F. <pfe...@ve...> - 2009-09-29 18:00:49
|
Hello Eric, The functions that I've created make it possible to generate a discrete (piecewise-constant) or continuous (piecewise-linear) colormap and register it at a single shot. These functions also accept a list of thresholds if the user wants to specify non-default thresholds. It seems as though the best alternatives require multiple steps and a considerable amount of fiddling. Furthermore, my functions are thoroughly documented, while the alternatives are not. I've found that it often takes less time to write something myself than to figure out how to use an undocumented function (which may not even do what I need). If you agree that my functions provide a better interface, then I hope that you and John Hunter can get them incorporated into matplotlib. Yours, Phillip Eric Firing wrote: > Dr. Phillip M. Feldman wrote: >> After experimenting with colormaps for a while, I was able to make both >> discrete (piecewise-constant) and continuous (piecewise-linear) >> colormaps >> work. Although colormaps can be created directly using >> LinearSegmentedColormap from the matplotlib.colors package, this is a >> tedious and error-prone process. So, I compiled a set of three interface >> functions. (I wrote two of these myself, and got one from the SciPy >> website). The two functions that I wrote permit one to define a discrete >> (piecewise-constant) and continuous (piecewise-linear) colormap >> directly via >> a sequence of colors and a set of thresholds specified as lists. Each >> color >> may be specified either via an RGB tuple or via an English color name >> known >> to webcolors.name_to_rgb. I'm going to submit all of this to the >> matplotlib >> developers forums in the hopes of getting it incorporated into >> matplotlib. > > Something I should have mentioned earlier: for the discrete case, one > good option is to use a ListedColormap to make a map with only a few > colors, and then use a BoundaryNorm to handle the mapping from data > values to colors. See > http://matplotlib.sourceforge.net/examples/pylab_examples/image_masked.html?highlight=image_masked > > for a BoundaryNorm example. Unfortunately, we don't have an example > of using it with a ListedColormap, but it should be straigtforward; > the key point is to set the BoundaryNorm ncolors kwarg to match the > actual number of colors in the colormap. > > Eric > |
From: Dr. P. M. F. <pfe...@ve...> - 2009-09-29 15:32:45
|
After experimenting with colormaps for a while, I was able to make both discrete (piecewise-constant) and continuous (piecewise-linear) colormaps work. Although colormaps can be created directly using LinearSegmentedColormap from the matplotlib.colors package, this is a tedious and error-prone process. So, I compiled a set of three interface functions. (I wrote two of these myself, and got one from the SciPy website). The two functions that I wrote permit one to define a discrete (piecewise-constant) and continuous (piecewise-linear) colormap directly via a sequence of colors and a set of thresholds specified as lists. Each color may be specified either via an RGB tuple or via an English color name known to webcolors.name_to_rgb. I'm submitting this in the hopes that this functionality will be incorporated into matplotlib. There's one thing that I've not been able to resolve: When attempting to display all defined colormaps using colormaps_test.py (attached), colormaps that I've defined do not show up. So, it would appear that registering a colormap makes it possible to access that colormap only if the name is known to the program that wants to use it. http://www.nabble.com/file/p25665294/make_cmap.py make_cmap.py http://www.nabble.com/file/p25665294/colormaps_test.py colormaps_test.py -- View this message in context: http://www.nabble.com/new-interface-functions-for-LinearSegmentedColormap-tp25665294p25665294.html Sent from the matplotlib - devel mailing list archive at Nabble.com. |
From: Jouni K. S. <jk...@ik...> - 2009-09-28 17:50:31
|
Jouni K. Seppänen <jk...@ik...> writes: > I committed something based on this, and a new rc parameter > savefig.extension that sets the filename extension when you call savefig > with a bare filename. The pdf tests seem to be working, at least for me, > but I am sure that the code can be improved. The buildbot was getting errors, since the build environments don't have gs. I changed the tests so that this isn't an error. It might be better to make it a known fail, but is it possible for the image comparison decorator to turn one test function into several cases? I.e., the png case could be pass/fail, and the pdf case a known fail if there is no Ghostscript. -- Jouni K. Seppänen http://www.iki.fi/jks |
From: William S. <ws...@gm...> - 2009-09-28 16:38:21
|
On Mon, Sep 28, 2009 at 9:35 AM, John Hunter <jd...@gm...> wrote: > On Mon, Sep 28, 2009 at 11:14 AM, John Hunter <jd...@gm...> wrote: > >> But even simple tests are failing with:: >> >> jdh2358@bsd:~> LD_LIBRARY_PATH=~/devtest/lib/ >> PYTHONPATH=~/devtest/lib/python2.6/site-packages/ /usr/bin/python -c >> 'import matplotlib; matplotlib.use("Agg"); from matplotlib.pyplot >> import *; plot([1,2,3]); savefig("test")' >> Traceback (most recent call last): >> File "<string>", line 1, in <module> >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/pyplot.py", >> line 7, in <module> >> from matplotlib.figure import Figure, figaspect >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/figure.py", >> line 16, in <module> >> import artist >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/artist.py", >> line 6, in <module> >> from transforms import Bbox, IdentityTransform, TransformedBbox, >> TransformedPath >> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/transforms.py", >> line 34, in <module> >> from matplotlib._path import affine_transform >> ImportError: /Users/jdh2358/devtest/lib/python2.6/site-packages/matplotlib/_path.so: >> no appropriate 64-bit architecture (see "man python" for running in >> 32-bit mode) >> >> I'm attaching my build output in case anyone sees anything that might >> be triggering this 32bit/64bit problem (see attached for full output). >> I did not rebuild numpy and this may be the problem since the failure >> is in the _path module. I'll give that a try next > > > Same issue with numpy HEAD One thing to keep in mind is that the default for GCC on OS X 10.6 is to build 64-bit binaries. With OS X 10.5 the default for GCC was to make 32-bit binaries. (To get 64-bit you used to have to do "-m64", but that is now the default.) So you really have to start from scratch. -- William |
From: John H. <jd...@gm...> - 2009-09-28 16:36:06
|
On Mon, Sep 28, 2009 at 11:14 AM, John Hunter <jd...@gm...> wrote: > But even simple tests are failing with:: > > jdh2358@bsd:~> LD_LIBRARY_PATH=~/devtest/lib/ > PYTHONPATH=~/devtest/lib/python2.6/site-packages/ /usr/bin/python -c > 'import matplotlib; matplotlib.use("Agg"); from matplotlib.pyplot > import *; plot([1,2,3]); savefig("test")' > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/pyplot.py", > line 7, in <module> > from matplotlib.figure import Figure, figaspect > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/figure.py", > line 16, in <module> > import artist > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/artist.py", > line 6, in <module> > from transforms import Bbox, IdentityTransform, TransformedBbox, > TransformedPath > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/transforms.py", > line 34, in <module> > from matplotlib._path import affine_transform > ImportError: /Users/jdh2358/devtest/lib/python2.6/site-packages/matplotlib/_path.so: > no appropriate 64-bit architecture (see "man python" for running in > 32-bit mode) > > I'm attaching my build output in case anyone sees anything that might > be triggering this 32bit/64bit problem (see attached for full output). > I did not rebuild numpy and this may be the problem since the failure > is in the _path module. I'll give that a try next Same issue with numpy HEAD |
From: William S. <ws...@gm...> - 2009-09-28 16:27:47
|
On Mon, Sep 28, 2009 at 9:14 AM, John Hunter <jd...@gm...> wrote: > On Mon, Sep 28, 2009 at 10:48 AM, William Stein <ws...@gm...> wrote: >> If you could just try running your matplotlib build on >> bsd.math.washington.edu and reporting about whether or not it works, >> that would be very helpful, since it will indicate whether the problem >> is somehow in Sage or in pyCXX or Matplotlib itself or something else. > > I was able to build into a mostly clean environment (rebuild all deps > zlip, freetype, png) using my OSX make file in, but I had to update > the MACOSX_DEPLOYMENT_TARGET to 10.6 (I've committed this to svn > HEAD). > > > PREFIX=~/devtest make -f make.osx fetch deps mpl_build mpl_install > > But even simple tests are failing with:: > > jdh2358@bsd:~> LD_LIBRARY_PATH=~/devtest/lib/ > PYTHONPATH=~/devtest/lib/python2.6/site-packages/ /usr/bin/python -c > 'import matplotlib; matplotlib.use("Agg"); from matplotlib.pyplot > import *; plot([1,2,3]); savefig("test")' > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/pyplot.py", > line 7, in <module> > from matplotlib.figure import Figure, figaspect > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/figure.py", > line 16, in <module> > import artist > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/artist.py", > line 6, in <module> > from transforms import Bbox, IdentityTransform, TransformedBbox, > TransformedPath > File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/transforms.py", > line 34, in <module> > from matplotlib._path import affine_transform > ImportError: /Users/jdh2358/devtest/lib/python2.6/site-packages/matplotlib/_path.so: > no appropriate 64-bit architecture (see "man python" for running in > 32-bit mode) > > I'm attaching my build output in case anyone sees anything that might > be triggering this 32bit/64bit problem (see attached for full output). > I did not rebuild numpy and this may be the problem since the failure > is in the _path module. I'll give that a try next I think it's definitely an issue with PyCXX. I installed the latest version of PyCXX and tried their test example program, and got the dreaded "Abort trap": bash-3.2$ python Python 2.6.2 (r262:71600, Sep 27 2009, 13:41:53) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import CXX.example CXX is installed. The support files you need are in the PYTHON/etc/CXX directory. The include files are in the distutils include path already. Just refer to them as "CXX/CXX_Objects.h", etc. range object created 0x1003140b0 range object destroyed 0x1003140b0 >>> CXX.example.test() Example Test starting Trying to convert a NULL to an Py::Int Abort trap bash-3.2$ pwd /Users/was/build/sage-4.1.2.alpha4/spkg/build/matplotlib/trunk/matplotlib/pycxx-6.1.1/Demo/Python2 ---- Note that installing PyCXX and their test program was not easy. I watched their "python setup.py install" fail repeatedly, then I would copy missing files where they should go, and iterate (about 6 times I've cc'd the PyCXX maintainer Barry Scott. Barry, do you have access to an OS X 10.6 install, since it seems PyCXX is broken there? If not, I can give you an account on a machine at University of Washington. PyCXX is the single component of Sage (http://sagemath.org) that is holding us back from finishing the OS X 10.6 port. -- William |
From: John H. <jd...@gm...> - 2009-09-28 16:14:50
|
On Mon, Sep 28, 2009 at 10:48 AM, William Stein <ws...@gm...> wrote: > If you could just try running your matplotlib build on > bsd.math.washington.edu and reporting about whether or not it works, > that would be very helpful, since it will indicate whether the problem > is somehow in Sage or in pyCXX or Matplotlib itself or something else. I was able to build into a mostly clean environment (rebuild all deps zlip, freetype, png) using my OSX make file in, but I had to update the MACOSX_DEPLOYMENT_TARGET to 10.6 (I've committed this to svn HEAD). PREFIX=~/devtest make -f make.osx fetch deps mpl_build mpl_install But even simple tests are failing with:: jdh2358@bsd:~> LD_LIBRARY_PATH=~/devtest/lib/ PYTHONPATH=~/devtest/lib/python2.6/site-packages/ /usr/bin/python -c 'import matplotlib; matplotlib.use("Agg"); from matplotlib.pyplot import *; plot([1,2,3]); savefig("test")' Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/pyplot.py", line 7, in <module> from matplotlib.figure import Figure, figaspect File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/figure.py", line 16, in <module> import artist File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/artist.py", line 6, in <module> from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "/Users/jdh2358/devtest//lib/python2.6/site-packages/matplotlib/transforms.py", line 34, in <module> from matplotlib._path import affine_transform ImportError: /Users/jdh2358/devtest/lib/python2.6/site-packages/matplotlib/_path.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode) I'm attaching my build output in case anyone sees anything that might be triggering this 32bit/64bit problem (see attached for full output). I did not rebuild numpy and this may be the problem since the failure is in the _path module. I'll give that a try next jdh2358@bsd:mpl> head -30 build.out export PKG_CONFIG_PATH="/Users/jdh2358/devtest//lib/pkgconfig" &&\ export MACOSX_DEPLOYMENT_TARGET=10.6 &&\ export CFLAGS="-arch i386 -arch ppc -I/Users/jdh2358/devtest//include -I/Users/jdh2358/devtest//include/freetype2 -isysroot /Developer/SDKs/MacOSX10.6.sdk" &&\ export LDFLAGS="-arch i386 -arch ppc -L/Users/jdh2358/devtest//lib -syslibroot,/Developer/SDKs/MacOSX10.6.sdk" &&\ python2.6 setup.py build ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.svn python: 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.2.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 '.' Tkinter: Tkinter: 67083, Tk: 8.5, Tcl: 8.5 wxPython: no * wxPython not found 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 |
From: William S. <ws...@gm...> - 2009-09-28 16:07:40
|
On Mon, Sep 28, 2009 at 8:55 AM, William Stein <ws...@gm...> wrote: > On Mon, Sep 28, 2009 at 8:47 AM, John Hunter <jd...@gm...> wrote: >> ---------- Forwarded message ---------- >> From: Tony S Yu <ts...@gm...> >> Date: Mon, Sep 28, 2009 at 8:41 AM >> Subject: Re: [matplotlib-devel] Fwd: OS X 10.6 port >> To: John Hunter <jd...@gm...> >> Cc: matplotlib development list <mat...@li...> >> >> >> >> On Sep 28, 2009, at 2:14 AM, John Hunter wrote: >> >>> in case anyone has some suggestions, I'm forwarding this from the sage list >>> >>> >>> ---------- Forwarded message ---------- >>> From: William Stein <ws...@gm...> >>> Date: Sun, Sep 27, 2009 at 10:51 PM >>> Subject: OS X 10.6 port >>> To: sage-devel <sag...@go...>, John Hunter <jd...@gm...> >>> >>> >>> Hi, >>> >>> I spent several hours yesterday trying to get matplotlib for Sage to >>> work on OS X 10.6. On my laptop everything works perfectly, but on >>> another test machine (bsd.math) the workaround from my laptop doesn't >>> work. So at this point Sage still does not support OS X 10.6. >>> >>> The problem is in matplotlib's C++ wrapper for freetype2. It's a >>> Python extension module implemented directly in C++, and it simply >>> doesn't work correctly at all. For example, whenever it tries to >>> raise a Python exception, it just terminates Python with >>> >>> "11713 Abort trap sage-ipython "$@" -i" > > The stack trace looks like this: > > #4 0x000000010cd907e2 in ~PythonExtension [inlined] () at > /Users/was/build/sage-4.1.2.alpha4/spkg/build/matplotlib/trunk/matplotlib/CXX/Extensions.hxx:778 > #5 0x000000010cd907e2 in FT2Font::FT2Font (this=0x10baf2b10, > facefile=@0x10bab6da0) at src/ft2font.cpp:778 > #6 0x000000010cd90e98 in ft2font_module::new_ft2font (this=<value > temporarily unavailable, due to optimizations>, args=<value > temporarily unavailable, due to optimizations>) at src/ft2font.cpp:778 > #7 0x000000010cd94912 in > Py::ExtensionModule<ft2font_module>::invoke_method_varargs > (this=0x10ce05f10, name=@0x7fff5fbf7030, args=@0x7fff5fbf6fe0) at > Extensions.hxx:422 > #8 0x000000010cda3190 in method_varargs_call_handler > (_self_and_name_tuple=<value temporarily unavailable, due to > optimizations>, _args=<value temporarily unavailable, due to > optimizations>) at CXX/cxx_extensions.cxx:1403 > ... > > >> I thought I'd chime in since I recently upgraded to OSX 10.6. I don't >> think I ever got this error, so I probably didn't have the same issue, >> but just in case... >> >> I reinstalled freetype2, but I'm not sure if I needed to. I also made >> a change to setupext.py so that the setup script could find freetype2, >> but this doesn't seem to be your problem because your errors don't >> occur during the build. >> >> Did you happen to build on top of an old install? I had to clean out >> the old compiled extensions before everything would build properly. I >> had to clean out the build directory (obviously), but there are also >> *.so files in lib/matplotlib and lib/matplotlib/backends. >> >> I should note that I'm built on top of the system python (2.6.1) and I >> did not use make.osx. >> > > I did a 100% clean build from source of Sage, which means building > Python and essentially all dependencies (including freetype) in a > single self-contained directory. I've replicated this on maybe 5 or > 6 different OS X 10.6 machines. It is a total show stopper for > releasing the next version of Sage, and is in fact the only problem > left (of many) in porting Sage to OS X 10.6 > > I used the latest version of XCode, which comes with OS X 10.6: > gcc version 4.2.1 (Apple Inc. build 5646) > > The version of Python is: > Python 2.6.2 (r262:71600, Sep 27 2009, 13:41:53) > > The Abort trap appears when building the font cache the moment an > exception is raised in C++ code. By hacking around that exception > getting raised, the Abort trap happens when some exception somewhere > else happens in Matplotlib's C++ code. Etc. > > I'm going to try looking into pyCXX now, since that seems the best hope. > I rebuild matplotlib using the newest version of pyCXX (which has seen 4 new releases since the version in matplotlib), but the problem remains the same. (I've also tried using the latest version of libfreetype.) bash-3.2$ python Python 2.6.2 (r262:71600, Sep 27 2009, 13:41:53) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pylab Abort trap ----- (gdb) bt #0 0x00007fff82adf096 in __kill () #1 0x00007fff82b800c2 in abort () #2 0x00000001015d0d51 in uw_init_context_1 () #3 0x00000001015d14cc in _Unwind_Resume () #4 0x000000010182f7f3 in ~PythonExtension [inlined] () at /Users/was/build/sage-4.1.2.alpha4/spkg/build/matplotlib/trunk/matplotlib/CXX/Python2/ExtensionOldType.hxx:778 #5 0x000000010182f7f3 in FT2Font::FT2Font (this=0x101171620, facefile=@0x7fff5fbf74c0) at src/ft2font.cpp:778 #6 0x000000010182fee8 in ft2font_module::new_ft2font (this=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>) at src/ft2font.cpp:778 #7 0x0000000101830a80 in Py::ExtensionModule<ft2font_module>::invoke_method_varargs (this=<value temporarily unavailable, due to optimizations>, method_def=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>) at ExtensionModule.hxx:184 #8 0x000000010183f8d0 in method_varargs_call_handler (_self_and_name_tuple=<value temporarily unavailable, due to optimizations>, _args=<value temporarily unavailable, due to optimizations>) at CXX/cxx_extensions.cxx:1714 #9 0x00000001000b3b25 in PyEval_EvalFrameEx () #10 0x00000001000b4ce0 in PyEval_EvalCodeEx () #11 0x00000001000b2afd in PyEval_EvalFrameEx () #12 0x00000001000b4ce0 in PyEval_EvalCodeEx () |
From: William S. <ws...@gm...> - 2009-09-28 15:56:11
|
On Mon, Sep 28, 2009 at 8:47 AM, John Hunter <jd...@gm...> wrote: > ---------- Forwarded message ---------- > From: Tony S Yu <ts...@gm...> > Date: Mon, Sep 28, 2009 at 8:41 AM > Subject: Re: [matplotlib-devel] Fwd: OS X 10.6 port > To: John Hunter <jd...@gm...> > Cc: matplotlib development list <mat...@li...> > > > > On Sep 28, 2009, at 2:14 AM, John Hunter wrote: > >> in case anyone has some suggestions, I'm forwarding this from the sage list >> >> >> ---------- Forwarded message ---------- >> From: William Stein <ws...@gm...> >> Date: Sun, Sep 27, 2009 at 10:51 PM >> Subject: OS X 10.6 port >> To: sage-devel <sag...@go...>, John Hunter <jd...@gm...> >> >> >> Hi, >> >> I spent several hours yesterday trying to get matplotlib for Sage to >> work on OS X 10.6. On my laptop everything works perfectly, but on >> another test machine (bsd.math) the workaround from my laptop doesn't >> work. So at this point Sage still does not support OS X 10.6. >> >> The problem is in matplotlib's C++ wrapper for freetype2. It's a >> Python extension module implemented directly in C++, and it simply >> doesn't work correctly at all. For example, whenever it tries to >> raise a Python exception, it just terminates Python with >> >> "11713 Abort trap sage-ipython "$@" -i" The stack trace looks like this: #4 0x000000010cd907e2 in ~PythonExtension [inlined] () at /Users/was/build/sage-4.1.2.alpha4/spkg/build/matplotlib/trunk/matplotlib/CXX/Extensions.hxx:778 #5 0x000000010cd907e2 in FT2Font::FT2Font (this=0x10baf2b10, facefile=@0x10bab6da0) at src/ft2font.cpp:778 #6 0x000000010cd90e98 in ft2font_module::new_ft2font (this=<value temporarily unavailable, due to optimizations>, args=<value temporarily unavailable, due to optimizations>) at src/ft2font.cpp:778 #7 0x000000010cd94912 in Py::ExtensionModule<ft2font_module>::invoke_method_varargs (this=0x10ce05f10, name=@0x7fff5fbf7030, args=@0x7fff5fbf6fe0) at Extensions.hxx:422 #8 0x000000010cda3190 in method_varargs_call_handler (_self_and_name_tuple=<value temporarily unavailable, due to optimizations>, _args=<value temporarily unavailable, due to optimizations>) at CXX/cxx_extensions.cxx:1403 ... > I thought I'd chime in since I recently upgraded to OSX 10.6. I don't > think I ever got this error, so I probably didn't have the same issue, > but just in case... > > I reinstalled freetype2, but I'm not sure if I needed to. I also made > a change to setupext.py so that the setup script could find freetype2, > but this doesn't seem to be your problem because your errors don't > occur during the build. > > Did you happen to build on top of an old install? I had to clean out > the old compiled extensions before everything would build properly. I > had to clean out the build directory (obviously), but there are also > *.so files in lib/matplotlib and lib/matplotlib/backends. > > I should note that I'm built on top of the system python (2.6.1) and I > did not use make.osx. > I did a 100% clean build from source of Sage, which means building Python and essentially all dependencies (including freetype) in a single self-contained directory. I've replicated this on maybe 5 or 6 different OS X 10.6 machines. It is a total show stopper for releasing the next version of Sage, and is in fact the only problem left (of many) in porting Sage to OS X 10.6 I used the latest version of XCode, which comes with OS X 10.6: gcc version 4.2.1 (Apple Inc. build 5646) The version of Python is: Python 2.6.2 (r262:71600, Sep 27 2009, 13:41:53) The Abort trap appears when building the font cache the moment an exception is raised in C++ code. By hacking around that exception getting raised, the Abort trap happens when some exception somewhere else happens in Matplotlib's C++ code. Etc. I'm going to try looking into pyCXX now, since that seems the best hope. William |
From: William S. <ws...@gm...> - 2009-09-28 15:48:39
|
On Mon, Sep 28, 2009 at 4:54 AM, John Hunter <jd...@gm...> wrote: > On Mon, Sep 28, 2009 at 4:47 AM, Dr. David Kirkby > <dav...@on...> wrote: >> William Stein wrote: >>> >>> Hi, >>> >>> I spent several hours yesterday trying to get matplotlib for Sage to >>> work on OS X 10.6. On my laptop everything works perfectly, but on >>> another test machine (bsd.math) the workaround from my laptop doesn't >>> work. So at this point Sage still does not support OS X 10.6. >> >> >> Just to add (which I've also CC'ed to John), mathplotlib (at least the >> version in Sage), is not respecting CXX properly. I specified CC as the Sun >> C compiler, and CXX as the Sun C++ compiler. The code then tries to build a >> C++ file (src/ft2font.cpp) with the Sun C compiler, which fails. >> >> /opt/xxxsunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 >> -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/numpy/core/include >> -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I. >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/ >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/python2.6 >> -c src/ft2font.cpp -o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o >> cc: No valid input files specified, no output generated >> error: command '/opt/xxxsunstudio12.1/bin/cc' failed with exit status 1 >> >> I've not looked at this in detail, so it could be a Sage-specific issue. > > I forwarded the original message on to matplotlib-devel. It would be > helpful if when replying to this message or any in this thread if we > CC the matplotlib-devel mailing list. I'm the list moderator so I can > approve these messages and you won't need to subscribe. I don't have > any immediate answers for you now, but hopefully we can come up with > some. If you could just try running your matplotlib build on bsd.math.washington.edu and reporting about whether or not it works, that would be very helpful, since it will indicate whether the problem is somehow in Sage or in pyCXX or Matplotlib itself or something else. -- William |
From: Dr. D. K. <dav...@on...> - 2009-09-28 15:13:40
|
Michael Droettboom wrote: > This is a very long-standing bug in distutils: > > http://bugs.python.org/issue1222585 > > While distutils distinguishes between C and C++ for *linking*, it does > not do so for *compiling*. This doesn't matter for gcc and msvc (which > are arguably the two most popular compilers for Python), but probably > does for most commercial Unix compilers. I have no idea why this patch > has never been applied in all these years -- but please jump on that bug > report so we can see about getting it fixed. > > As for us at STScI, we just build matplotlib with gcc on Solaris and it > works fine. > > Mike I've registered on the python bug tracker, and submitted a request that this bug is solved. The patch on there is against a 3-year old version of python, so I'd rather not try to integrate it myself, especially as the patch is non-trivial. I expected that trying to build Sage with Sun Studio would uncover some bugs in other software, but even I am amazed at just how many bugs this uncovers. Dave > > John Hunter wrote: >> On Mon, Sep 28, 2009 at 4:47 AM, Dr. David Kirkby >> <dav...@on...> wrote: >> >>> William Stein wrote: >>> >>>> Hi, >>>> >>>> I spent several hours yesterday trying to get matplotlib for Sage to >>>> work on OS X 10.6. On my laptop everything works perfectly, but on >>>> another test machine (bsd.math) the workaround from my laptop doesn't >>>> work. So at this point Sage still does not support OS X 10.6. >>>> >>> Just to add (which I've also CC'ed to John), mathplotlib (at least the >>> version in Sage), is not respecting CXX properly. I specified CC as >>> the Sun >>> C compiler, and CXX as the Sun C++ compiler. The code then tries to >>> build a >>> C++ file (src/ft2font.cpp) with the Sun C compiler, which fails. >>> >>> /opt/xxxsunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 >>> -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API >>> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/numpy/core/include >>> >>> -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I. >>> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/ >>> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/python2.6 >>> >>> -c src/ft2font.cpp -o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o >>> cc: No valid input files specified, no output generated >>> error: command '/opt/xxxsunstudio12.1/bin/cc' failed with exit status 1 >>> >>> I've not looked at this in detail, so it could be a Sage-specific issue. >>> >> >> I forwarded the original message on to matplotlib-devel. It would be >> helpful if when replying to this message or any in this thread if we >> CC the matplotlib-devel mailing list. I'm the list moderator so I can >> approve these messages and you won't need to subscribe. I don't have >> any immediate answers for you now, but hopefully we can come up with >> some. >> >> JDH >> >> ------------------------------------------------------------------------------ >> >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and >> stay ahead of the curve. Join us from November 9-12, 2009. >> Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Matplotlib-devel mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >> > |
From: Tony S Yu <ts...@gm...> - 2009-09-28 14:13:10
|
On Sep 28, 2009, at 2:14 AM, John Hunter wrote: > in case anyone has some suggestions, I'm forwarding this from the > sage list > > > ---------- Forwarded message ---------- > From: William Stein <ws...@gm...> > Date: Sun, Sep 27, 2009 at 10:51 PM > Subject: OS X 10.6 port > To: sage-devel <sag...@go...>, John Hunter <jd...@gm... > > > > > Hi, > > I spent several hours yesterday trying to get matplotlib for Sage to > work on OS X 10.6. On my laptop everything works perfectly, but on > another test machine (bsd.math) the workaround from my laptop doesn't > work. So at this point Sage still does not support OS X 10.6. > > The problem is in matplotlib's C++ wrapper for freetype2. It's a > Python extension module implemented directly in C++, and it simply > doesn't work correctly at all. For example, whenever it tries to > raise a Python exception, it just terminates Python with > > "11713 Abort trap sage-ipython "$@" -i" I thought I'd chime in since I recently upgraded to OSX 10.6. I don't think I ever got this error, so I probably didn't have the same issue, but just in case... I reinstalled freetype2, but I'm not sure if I needed to. I also made a change to setupext.py so that the setup script could find freetype2, but this doesn't seem to be your problem because your errors don't occur during the build. Did you happen to build on top of an old install? I had to clean out the old compiled extensions before everything would build properly. I had to clean out the build directory (obviously), but there are also *.so files in lib/matplotlib and lib/matplotlib/backends. I should note that I'm built on top of the system python (2.6.1) and I did not use make.osx. -Tony |
From: Michael D. <md...@st...> - 2009-09-28 14:06:43
|
This is a very long-standing bug in distutils: http://bugs.python.org/issue1222585 While distutils distinguishes between C and C++ for *linking*, it does not do so for *compiling*. This doesn't matter for gcc and msvc (which are arguably the two most popular compilers for Python), but probably does for most commercial Unix compilers. I have no idea why this patch has never been applied in all these years -- but please jump on that bug report so we can see about getting it fixed. As for us at STScI, we just build matplotlib with gcc on Solaris and it works fine. Mike John Hunter wrote: > On Mon, Sep 28, 2009 at 4:47 AM, Dr. David Kirkby > <dav...@on...> wrote: > >> William Stein wrote: >> >>> Hi, >>> >>> I spent several hours yesterday trying to get matplotlib for Sage to >>> work on OS X 10.6. On my laptop everything works perfectly, but on >>> another test machine (bsd.math) the workaround from my laptop doesn't >>> work. So at this point Sage still does not support OS X 10.6. >>> >> Just to add (which I've also CC'ed to John), mathplotlib (at least the >> version in Sage), is not respecting CXX properly. I specified CC as the Sun >> C compiler, and CXX as the Sun C++ compiler. The code then tries to build a >> C++ file (src/ft2font.cpp) with the Sun C compiler, which fails. >> >> /opt/xxxsunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 >> -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/numpy/core/include >> -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I. >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/ >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/python2.6 >> -c src/ft2font.cpp -o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o >> cc: No valid input files specified, no output generated >> error: command '/opt/xxxsunstudio12.1/bin/cc' failed with exit status 1 >> >> I've not looked at this in detail, so it could be a Sage-specific issue. >> > > I forwarded the original message on to matplotlib-devel. It would be > helpful if when replying to this message or any in this thread if we > CC the matplotlib-devel mailing list. I'm the list moderator so I can > approve these messages and you won't need to subscribe. I don't have > any immediate answers for you now, but hopefully we can come up with > some. > > JDH > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Michael D. <md...@st...> - 2009-09-28 13:59:49
|
I forgot a detail: you have to use a script to edit the commandline arguments to pass to gcc: #!/bin/sh y="" for x in $* do case "$x" in -xcode*) echo skip $x ;; *) y="$y $x" ;; esac done gcc $y and then do CC=gcc_hack python setup.py build (where gcc_hack is the path to the above script) Mike John Hunter wrote: > On Mon, Sep 28, 2009 at 4:47 AM, Dr. David Kirkby > <dav...@on...> wrote: > >> William Stein wrote: >> >>> Hi, >>> >>> I spent several hours yesterday trying to get matplotlib for Sage to >>> work on OS X 10.6. On my laptop everything works perfectly, but on >>> another test machine (bsd.math) the workaround from my laptop doesn't >>> work. So at this point Sage still does not support OS X 10.6. >>> >> Just to add (which I've also CC'ed to John), mathplotlib (at least the >> version in Sage), is not respecting CXX properly. I specified CC as the Sun >> C compiler, and CXX as the Sun C++ compiler. The code then tries to build a >> C++ file (src/ft2font.cpp) with the Sun C compiler, which fails. >> >> /opt/xxxsunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 >> -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/numpy/core/include >> -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I. >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/ >> -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/python2.6 >> -c src/ft2font.cpp -o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o >> cc: No valid input files specified, no output generated >> error: command '/opt/xxxsunstudio12.1/bin/cc' failed with exit status 1 >> >> I've not looked at this in detail, so it could be a Sage-specific issue. >> > > I forwarded the original message on to matplotlib-devel. It would be > helpful if when replying to this message or any in this thread if we > CC the matplotlib-devel mailing list. I'm the list moderator so I can > approve these messages and you won't need to subscribe. I don't have > any immediate answers for you now, but hopefully we can come up with > some. > > JDH > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Michael D. <md...@st...> - 2009-09-28 13:08:59
|
John Hunter wrote: > I spent several hours yesterday trying to get matplotlib for Sage to > work on OS X 10.6. On my laptop everything works perfectly, but on > another test machine (bsd.math) the workaround from my laptop doesn't > work. So at this point Sage still does not support OS X 10.6. > > The problem is in matplotlib's C++ wrapper for freetype2. It's a > Python extension module implemented directly in C++, and it simply > doesn't work correctly at all. For example, whenever it tries to > raise a Python exception, it just terminates Python with > > "11713 Abort trap sage-ipython "$@" -i" > Can you run this inside of gdb and get a traceback? > I'm cc'ing John Hunter -- author of matplotlib, in case he has any > advice to share. In particular, he has an account on > bsd.math.washington.edu and build tests matplotlib there, so I'm > curious if he has any issues with that. Note that Sage builds > freetype from source, which could be relevant. > > I will try updating freetype in Sage (our version is slightly out of > date), and also checking if there is some sort of conflict with a > system-wide freetype. My worry is that Matplotlib has some weird > custom C++ code for writing extensions that maybe uses signals or > something to raise exceptions, and it is just broken when used with OS > X 10.6. Hopefully this is not that the case, and something special to > Sage is happening. > CXX is the name of the C++ wrapper mechanism we use and is reasonably well-maintained. I can't find out if it has been tested on 10.6 yet, but it's certainly been tested on the gcc version that comes with it. There are no signals involved, only standard C++ exceptions which are delegated to Python exceptions. Is it possible there is any C++ code linked to this that was generated with another compiler version? Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: John H. <jd...@gm...> - 2009-09-28 11:54:32
|
On Mon, Sep 28, 2009 at 4:47 AM, Dr. David Kirkby <dav...@on...> wrote: > William Stein wrote: >> >> Hi, >> >> I spent several hours yesterday trying to get matplotlib for Sage to >> work on OS X 10.6. On my laptop everything works perfectly, but on >> another test machine (bsd.math) the workaround from my laptop doesn't >> work. So at this point Sage still does not support OS X 10.6. > > > Just to add (which I've also CC'ed to John), mathplotlib (at least the > version in Sage), is not respecting CXX properly. I specified CC as the Sun > C compiler, and CXX as the Sun C++ compiler. The code then tries to build a > C++ file (src/ft2font.cpp) with the Sun C compiler, which fails. > > /opt/xxxsunstudio12.1/bin/cc -DNDEBUG -O -xcode=pic32 > -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API > -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/lib/python2.6/site-packages/numpy/core/include > -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/local/include -I. > -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/ > -I/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/local/include/python2.6 > -c src/ft2font.cpp -o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o > cc: No valid input files specified, no output generated > error: command '/opt/xxxsunstudio12.1/bin/cc' failed with exit status 1 > > I've not looked at this in detail, so it could be a Sage-specific issue. I forwarded the original message on to matplotlib-devel. It would be helpful if when replying to this message or any in this thread if we CC the matplotlib-devel mailing list. I'm the list moderator so I can approve these messages and you won't need to subscribe. I don't have any immediate answers for you now, but hopefully we can come up with some. JDH |
From: John H. <jd...@gm...> - 2009-09-28 06:15:08
|
in case anyone has some suggestions, I'm forwarding this from the sage list ---------- Forwarded message ---------- From: William Stein <ws...@gm...> Date: Sun, Sep 27, 2009 at 10:51 PM Subject: OS X 10.6 port To: sage-devel <sag...@go...>, John Hunter <jd...@gm...> Hi, I spent several hours yesterday trying to get matplotlib for Sage to work on OS X 10.6. On my laptop everything works perfectly, but on another test machine (bsd.math) the workaround from my laptop doesn't work. So at this point Sage still does not support OS X 10.6. The problem is in matplotlib's C++ wrapper for freetype2. It's a Python extension module implemented directly in C++, and it simply doesn't work correctly at all. For example, whenever it tries to raise a Python exception, it just terminates Python with "11713 Abort trap sage-ipython "$@" -i" I'm cc'ing John Hunter -- author of matplotlib, in case he has any advice to share. In particular, he has an account on bsd.math.washington.edu and build tests matplotlib there, so I'm curious if he has any issues with that. Note that Sage builds freetype from source, which could be relevant. I will try updating freetype in Sage (our version is slightly out of date), and also checking if there is some sort of conflict with a system-wide freetype. My worry is that Matplotlib has some weird custom C++ code for writing extensions that maybe uses signals or something to raise exceptions, and it is just broken when used with OS X 10.6. Hopefully this is not that the case, and something special to Sage is happening. William -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org |
From: Eric F. <ef...@ha...> - 2009-09-28 02:57:21
|
Stéfan van der Walt wrote: > Hi all, > > When saving plots (using plt.figsave and matplotlib from SVN) > consisting of subplots, the layout is a bit messed up. As an example, > have a look at > > http://mentat.za.net/refer/segmentation.pdf Wow, that's really ugly! I suspect that for anyone to provide any help on this, you will need to supply a minimal script to show what you are doing. I take it you are starting with something that looks reasonable on the screen, but comes out quite different when you save it? Eric > > I have tried adjusting the figure size, the font size, the w- and > hspace, etc. Is this a known problem, or am I doing something silly? > > Thanks for your time, > Stéfan > |