[matplotlib-devel] Building matplotlib 0.99.1.1: cannot find -ltk8.5 (whereas 0.91.4 works)

2009-09-30 Thread Chris
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
...



--
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [sage-devel] PyCXX, Matplotlib and OS X 10.6

2009-09-30 Thread Barry Scott


On 28 Sep 2009, at 17:27, William Stein wrote:

On Mon, Sep 28, 2009 at 9:14 AM, John Hunter   
wrote:
On Mon, Sep 28, 2009 at 10:48 AM, William Stein   
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::

jdh2...@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 "", line 1, in 
File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ 
matplotlib/pyplot.py",

line 7, in 
  from matplotlib.figure import Figure, figaspect
File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ 
matplotlib/figure.py",

line 16, in 
  import artist
File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ 
matplotlib/artist.py",

line 6, in 
  from transforms import Bbox, IdentityTransform, TransformedBbox,
TransformedPath
File "/Users/jdh2358/devtest//lib/python2.6/site-packages/ 
matplotlib/transforms.py",

line 34, in 
  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.



example_mac_apple_py26.mak
Description: Binary data



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.




py26.log
Description: Binary data




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.o

[matplotlib-devel] patterns

2009-09-30 Thread Michael Oevermann
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

--
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] patterns

2009-09-30 Thread Jouni K . Seppänen
Michael Oevermann  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


--
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Building matplotlib 0.99.1.1 : cannot find -ltk8.5 (whereas 0.91.4 works )

2009-09-30 Thread Chris
Chris  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



--
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] proposed change to colors.py

2009-09-30 Thread Dr. Phillip M. Feldman

I've added three function defs at the end of colors.py.  The revised
colors.py is attached.  (I haven't been able to figure out how to make SVN
save the diff to a file). http://www.nabble.com/file/p25691605/colors.py
colors.py 
-- 
View this message in context: 
http://www.nabble.com/proposed-change-to-colors.py-tp25691605p25691605.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.


--
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] proposed change to colors.py

2009-09-30 Thread Ryan May
On Wed, Sep 30, 2009 at 7:47 PM, Dr. Phillip M. Feldman
 wrote:
>
> I've added three function defs at the end of colors.py.  The revised
> colors.py is attached.  (I haven't been able to figure out how to make SVN
> save the diff to a file). http://www.nabble.com/file/p25691605/colors.py
> colors.py

svn diff > filename

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

--
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
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel