[Matplotlib-users] numpy1.0rc and matplotlib-0.87.5

2006-09-22 Thread Peter Bienstman
Hello,

I can't seem to get matplotlib-0.87.5  to work with numpy1.0rc:

Python 2.4.3 (#1, Sep 21 2006, 13:06:42)
[GCC 4.1.1 (Gentoo 4.1.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pylab import *
Traceback (most recent call last):
  File "", line 1, in ?
  File "/usr/lib64/python2.4/site-packages/pylab.py", line 1, in ?
from matplotlib.pylab import *
  File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line 196, in ?
import cm
  File "/usr/lib/python2.4/site-packages/matplotlib/cm.py", line 5, in ?
import colors
  File "/usr/lib/python2.4/site-packages/matplotlib/colors.py", line 33, in ?
from numerix import array, arange, take, put, Float, Int, where, \
  File "/usr/lib/python2.4/site-packages/matplotlib/numerix/__init__.py", line 
74, in ?
Matrix = matrix
NameError: name 'matrix' is not defined

This is on an AMD64 platform. I tried removing the build directories of both 
packages, and reinstalling, but that didn't work.

Am I missing something?

Thanks!

Peter

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] fonts_demo.py warnings

2006-09-22 Thread fred
Hi the list,

I have looked for in mailing-list archive, but did not find anything
relevant.

I use matplotlib 0.87-5 and I want to try some examples concerning fonts
in .examples/.

When I run fonts_demo.py, I get the following messages :

:~...matplotlib-0.87.5/examples/{58}/> python fonts_demo.py
/usr/local/lib/python2.4/site-packages/matplotlib/font_manager.py:989:
UserWarning: Could not match cursive, normal, normal.  Returning
/usr/local/lib/python2.4/site-packages/matplotlib/mpl-data/Vera.ttf
  warnings.warn('Could not match %s, %s, %s.  Returning %s' % (name,
style, variant, self.defaultFont))
/usr/local/lib/python2.4/site-packages/matplotlib/font_manager.py:989:
UserWarning: Could not match fantasy, normal, normal.  Returning
/usr/local/lib/python2.4/site-packages/matplotlib/mpl-data/Vera.ttf
  warnings.warn('Could not match %s, %s, %s.  Returning %s' % (name,
style, variant, self.defaultFont))
/usr/local/lib/python2.4/site-packages/matplotlib/font_manager.py:989:
UserWarning: Could not match sans-serif, italic, normal.  Returning
/usr/local/lib/python2.4/site-packages/matplotlib/mpl-data/Vera.ttf
  warnings.warn('Could not match %s, %s, %s.  Returning %s' % (name,
style, variant, self.defaultFont))

What am I doing wrong ?

In fact, all fonts displayed in the window are the same.

Any suggestion ?

Cheers,

PS : python 2.4, freetype-2.1.7-6, libpng-1.2.8 on a debian sarge linux box.

-- 
« Python, c'est un peu comme la baïonnette en 14, faut toujours sortir avec,
et pas hésiter d'en mettre un coup en cas de besoin. »
J.-Ph. D.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] some curves not legended

2006-09-22 Thread fred
Hi the list,

Is it possible to have some curves not legended ?

A sample example is better :

http://fredantispam.free.fr/foo.png

I whish the pointed curves to be not displayed in the legend box.

How can I do this ?

Cheers,

-- 
« Python, c'est un peu comme la baïonnette en 14, faut toujours sortir avec,
et pas hésiter d'en mettre un coup en cas de besoin. »
J.-Ph. D.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] zope+matplotlib import problems

2006-09-22 Thread giandomenico biondaro
Hi to all,I'm writing a web application with zope+python. I've made a first try to insert a graph using zope external  method an following the instruction reported in this sample:
http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_ZopeI have some problem with the imports; zope tell me:  Error Type: ImportError  Error Value: cannot import name FigureCanvasAgg
This is due to the instruction 7:   1 import matplotlib   2 matplotlib.use('Agg')   3 from pylab import *   4 from os import *   5 from StringIO import StringIO   6 from PIL import Image as PILImage
   7 from matplotlib.backends.backend_agg import FigureCanvasAgg[...]The path of the file backends_agg.py  is correct. Have you got any suggestion.Thanks.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] some curves not legended

2006-09-22 Thread John Hunter
> "fred" == fred  <[EMAIL PROTECTED]> writes:

fred> Hi the list, Is it possible to have some curves not legended
fred> ?


ax.plot(x,y,label='_nolegend_')

Help on function legend in module matplotlib.pylab:

legend(*args, **kwargs)
LEGEND(*args, **kwargs)

Place a legend on the current axes at location loc.  Labels are a
sequence of strings and loc can be a string or an integer
specifying the legend location

USAGE:

  Make a legend with existing lines

   >>> legend()

  legend by itself will try and build a legend using the label
  property of the lines/patches/collections.  You can set the
  label of a line by doing plot(x, y, label='my data') or
  line.set_label('mydata'). If label is set to '_nolegend_', the
  item will not be shown in legend.


JDH

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How to build a universal matplotlib for MacOS X

2006-09-22 Thread Russell E. Owen
Here are instructions for building a universal matplotlib for MacOS X 
from source. The topic comes up once in awhile and having just fought 
through it, I figured it was best to post instructions. Thanks to 
Charlie Moad and mpsuzuki for their valuable assistance.

1) Install the prerequisites:

1.1) libz is included with MacOS X 10.4. If you ever installed a copy 
yourself, get rid of it or make sure it's universal.

1.2) Install libpng. Get source, unpack and:

- Configure it for a universal build. On a PPC system (this should be 
two lines; you may have to manually unwrap the first line):
$ CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 
-arch ppc" \
   ./configure --disable-dependency-tracking

- On an Intel system use this simpler version:
$ CFLAGS="-arch i386 -arch ppc" \
   ./configure --disable-dependency-tracking

- Build and install as usual:
$ make
$ sudo make install

- If you plan to redistribute matplotlib, delete the dynamic library so 
matplotlib statically links to libpng:
$ sudo rm /usr/local/lib/libpng*.dylib

1.3) Install freetype. Do *NOT* use version 2.2.1; it is broken on MacOS 
X (but fixed in CVS). 2.1.10 works fine. Get source, unpack, and install 
exactly as for libpng except:

- Before building, you may wish to modify 
include/freetype/configure/ftoption.h to enable hinting:
  uncomment #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
  perhaps comment out #define TT_CONFIG_OPTION_UNPATENTED_HINTING

- After building, you *MUST* delete the dynamic library. At least for 
version 2.1.10 and 2.2.1 it is *NOT* universal, only the static library 
is universal.
$ sudo rm /usr/local/lib/libfreetype*.dylib

2) Make sure you have a universal python installed, e.g. MacPython from 


3) Install matplotlib in the usual fashion:
$ python setup.py build
$ sudo python setup.py install
(I didn't try easy_install, but I suspect it works too)

-- Russell

P.S. The instructions for running configure to get a universal binary 
are from Apple Tech Note 2137: 
 with the 
correction that LDFLAGS must *NOT* be defined (issue number 4387241 in 
Apple Bug Reporter database). Fortunately it is not necessary, and 
suggesting otherwise is a mistake in the tech note.

If you forget --disable-dependency-tracking you'll get error messages 
saying you have an incompatible set of compiler flags.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users