Re: [Matplotlib-users] printing quality

2007-12-03 Thread Michael Droettboom
Peter I. Hansen wrote:
 On Nov 30, 2007 11:14 PM, Michael Droettboom [EMAIL PROTECTED] wrote:
 Thanks for the script.  I ran it through 0.90 and 0.91...  Perhaps I
 don't understand your problem with color.  To my eyes, the plot
 generated with Agg (to a PNG) and to a PDF look the same, in terms of
 the color of the axvspans.

 So, either your mpl installation is generating a different PDF than mine
 (certainly possible), or I'm just not seeing the difference that is
 bothering you (also possible).  It could be that you are using a
 different PDF viewer (I'm using Adobe Acrobat Reader 7.0 on Linux...)

 I've attached the PDF I get from 0.90 on my machine.  Does it look the
 same as yours?

[This attachment was too large for the list and bounced...  I'm bringing 
the conversation back to the list.]

 Your output looks similar to mine. The thing that bothers me (and I
 see that maybe I wasn't clear enough on that to begin with) is the
 grainy way the colors look when printed.

That may be beyond matplotlib's control.  Matplotlib requests a solid 
grey color, but the printing stack (Acrobat, the printer driver or the 
printer itself) could be interpreting that in many ways.  You could 
experiment with various printer settings.

Sorry to not have a more helpful answer.  Perhaps others on this list 
have suggestions.

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Missing \Delta in mathtext

2007-12-03 Thread Michael Droettboom
The log shows that for some reason it is pulling in 
BitstreamVeraSerif-Roman instead of Arev Sans for that character.  It 
could be that it isn't finding the Arev fonts on your system.

Can you send your matplotlibrc file?  (Particularly the mathtext.* 
options...)  Also, can you set verbose.level to debug-annoying and 
send us the output?

Cheers,
Mike

Rob Hetland wrote:
 
 I was working on a figure, using mathtext and the Arev Sans fontset, and 
 I noticed that \Delta does not display correctly.  In fact, none of the 
 capitol greek letters show up.  It claims they are missing (and I do not 
 default back to CM).  However, I _know_ Arev Sans has \Delta (and the 
 others).
 
 Little \delta and all the other little greek letters are there:
 
   text(0.5, 0.5, r'$\Delta$')
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:808:
  
 MathTextWarning: Font 'BitstreamVeraSerif-Roman' does not have a glyph 
 for '\Delta'
   MathTextWarning)
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:817:
  
 MathTextWarning: Substituting with a dummy symbol.
   warn(Substituting with a dummy symbol., MathTextWarning)
 matplotlib.text.Text instance at 0x476f8f30
   text(0.5, 0.5, r'$\alpha \beta \gamma \delta \nu \eta \zeta \pi \xi$')
 matplotlib.text.Text instance at 0x478a6e18
 
 
 Am I doing something wrong?
 
 -Rob
 
 
 
 Rob Hetland, Associate Professor
 Dept. of Oceanography, Texas AM University
 http://pong.tamu.edu/~rob
 phone: 979-458-0096, fax: 979-845-6331
 
 

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Missing \Delta in mathtext

2007-12-03 Thread Michael Droettboom
The line I'm referring to is this ---

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mathtext.py:808:
 
MathTextWarning: Font 'BitstreamVeraSerif-Roman' does not have a glyph 
for '\Delta'
   MathTextWarning)

Can you send your matplotlibrc settings and the mathtext expression you 
are using?  One or the other of those is causing Vera Serif to be used 
for the \Delta character rather than Arev Sans.

Cheers,
Mike

Rob Hetland wrote:
 
 On Dec 3, 2007, at 2:02 PM, Michael Droettboom wrote:
 
 Can you send your matplotlibrc file?  (Particularly the mathtext.* 
 options...)  Also, can you set verbose.level to debug-annoying and 
 send us the output?
 
 It seems to me that Arev is being used from the debug information.  See 
 the log below.
 
 -Rob
 
 
 
 matplotlib data path 
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/mpl-data
  
 
 loaded rc file /Users/rob/.matplotlib/matplotlibrc
 matplotlib version 0.91.0
 verbose.level debug-annoying
 interactive is True
 units is False
 platform is darwin
 loaded modules: ['IPython.Prompts', 'IPython.pickleshare', 'heapq', 
 'xml.sax.urlparse', '_sha512', 'IPython.iplib', 'IPython.signal', 
 'random', '_bisect', 'ctypes.os', 'IPython.wildcard', 'gettext', 
 'IPython.bdb', 'distutils.sysconfig', 'ctypes._endian', 
 'encodings.encodings', 'IPython.fnmatch', 'IPython.time', '_lsprof', 
 'xml', 'struct', 'tempfile', 'pprint', 'IPython.doctest', 
 'IPython.copy_reg', 'imp', 'IPython.OInspect', 'IPython.warnings', 
 'collections', 'IPython.pydoc', 'cProfile', 'IPython.cStringIO', 
 'IPython.Shell', 'IPython.rlineimpl', 'zipimport', 'string', 
 'xml.sax.types', 'matplotlib.dateutil', 'encodings.utf_8', 
 'matplotlib.__future__', 'IPython.thread', 'datetime', 'IPython.Itpl', 
 'IPython.Debugger', 'new', 'distutils.re', 'IPython.excolors', 
 'IPython.Queue', 'IPython.os', 'resource', 'bisect', 'IPython.glob', 
 'signal', 'cmd', 'pydoc', 'threading', 'token', 'IPython.ctypes', 
 'shlex', 'IPython.shlex', 'xml.sax.xmlreader', 'matplotlib.pytz', 
 'IPython.exceptions', 'IPython.new', 'dis', 'cStringIO', 'pkgutil', 
 'IPython.external.simplegeneric', 'IPython.platutils_posix', 
 'IPython.path', 'IPython.types', 'IPython', 'IPython.external', 
 'IPython.commands', 'matplotlib.matplotlib', 'encodings', 
 'IPython.threading', 'bdb', 'IPython.ConfigLoader', 
 'matplotlib.warnings', 'matplotlib.string', 'urllib', 'IPython.pdb', 
 're', 'posix', 'IPython.shadowns', 'math', 'fcntl', 'pytz.tzinfo', 
 'dateutil', 'optparse', 'UserDict', 'inspect', 'IPython.hooks', 
 'distutils.os', '_ctypes', 'Queue', 'fnmatch', 'ctypes', 
 'IPython.generics', 'ctypes.struct', 'codecs', 'matplotlib.sys', 'path', 
 'pickleshare', 'pytz.bisect', 'md5', 'IPython.ColorANSI', 'commands', 
 'matplotlib.sre_constants', 'socket', 'thread', 'StringIO', 
 'IPython.StringIO', 'traceback', 'IPython.pstats', 'weakref', 
 'itertools', 'opcode', 'doctest', 'IPython.history', 'pstats', 
 'IPython.tokenize', 'distutils.sys', 'os', 'pdb', 'IPython.traceback', 
 '__future__', 'matplotlib.copy', 'distutils.distutils', '_sre', 
 'unittest', 'IPython.ipmaker', '__builtin__', 'matplotlib.re', 
 'operator', 'distutils.string', 'ctypes._ctypes', '_heapq', 
 'ctypes.sys', 'matplotlib.datetime', 'IPython.codeop', 'posixpath', 
 'errno', '_socket', 'binascii', 'IPython.sys', 'IPython.re', 
 'sre_constants', 'IPython.cProfile', '_sha256', 'IPython.PyColorize', 
 'matplotlib.md5', 'types', 'IPython.genutils', 'tokenize', 'gestalt', 
 'matplotlib.tempfile', 'textwrap', 'IPython.strdispatch', 'cPickle', 
 'pytz.sys', 'IPython.platutils', 'matplotlib.xml', 'IPython.macro', 
 '_codecs', 'IPython.token', '_locale', 'IPython.keyword', 
 'IPython.IPython', 'IPython.string', 'pytz', 'matplotlib.pyparsing', 
 'IPython.__builtin__', 'copy', 'pwd', '_struct', '_types', 
 'IPython.socket', 'hashlib', 'IPython.resource', 'IPython.cmd', 
 'keyword', 'atexit', 'distutils', 'IPython.linecache', 
 'xml.sax.saxutils', 'IPython.optparse', 'IPython.__main__', 
 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions', 
 'sre_parse', 'IPython.ultraTB', 'IPython.prefilter', 'IPython.tempfile', 
 'IPython.Release', 'IPython.OutputTrap', 'copy_reg', 'sre_compile', 
 'xml.sax', 'xml.sax.os', '_hashlib', '_random', 'site', 'IPython.sets', 
 'IPython.getopt', 'IPython.ipstruct', 'IPython.external.types', 
 'IPython.inspect', '__main__', 'locale', 'shutil', 'IPython.Magic', 
 'IPython.pprint', 'urlparse', 'xml.sax.urllib', 'matplotlib.os', 
 'strop', 'IPython.bisect', 'xml.sax.handler', 'IPython.textwrap', 
 'xml.sax.codecs', 'IPython.shutil', 'encodings.codecs', 
 'ctypes.gestalt', 'pytz.datetime', 'IPython.Logger', 
 'matplotlib.rcsetup', 'getopt', 'matplotlib.weakref', 'pytz.sets', 
 'xml.sax._exceptions', 'IPython.readline', 'stat', '_ssl', 'warnings', 
 'encodings.types', 'glob', 'sets', 'repr', 'sys', 'ctypes.ctypes', 
 'codeop', 'readline', 'os.path', 

Re: [Matplotlib-users] Missing \Delta in mathtext

2007-12-03 Thread Rob Hetland

On Dec 3, 2007, at 2:02 PM, Michael Droettboom wrote:

 Can you send your matplotlibrc file?  (Particularly the mathtext.*  
 options...)  Also, can you set verbose.level to debug-annoying  
 and send us the output?

It seems to me that Arev is being used from the debug information.   
See the log below.

-Rob



matplotlib data path /Library/Frameworks/Python.framework/Versions/ 
2.5/lib/python2.5/site-packages/matplotlib/mpl-data
loaded rc file /Users/rob/.matplotlib/matplotlibrc
matplotlib version 0.91.0
verbose.level debug-annoying
interactive is True
units is False
platform is darwin
loaded modules: ['IPython.Prompts', 'IPython.pickleshare', 'heapq',  
'xml.sax.urlparse', '_sha512', 'IPython.iplib', 'IPython.signal',  
'random', '_bisect', 'ctypes.os', 'IPython.wildcard', 'gettext',  
'IPython.bdb', 'distutils.sysconfig', 'ctypes._endian',  
'encodings.encodings', 'IPython.fnmatch', 'IPython.time', '_lsprof',  
'xml', 'struct', 'tempfile', 'pprint', 'IPython.doctest',  
'IPython.copy_reg', 'imp', 'IPython.OInspect', 'IPython.warnings',  
'collections', 'IPython.pydoc', 'cProfile', 'IPython.cStringIO',  
'IPython.Shell', 'IPython.rlineimpl', 'zipimport', 'string',  
'xml.sax.types', 'matplotlib.dateutil', 'encodings.utf_8',  
'matplotlib.__future__', 'IPython.thread', 'datetime',  
'IPython.Itpl', 'IPython.Debugger', 'new', 'distutils.re',  
'IPython.excolors', 'IPython.Queue', 'IPython.os', 'resource',  
'bisect', 'IPython.glob', 'signal', 'cmd', 'pydoc', 'threading',  
'token', 'IPython.ctypes', 'shlex', 'IPython.shlex',  
'xml.sax.xmlreader', 'matplotlib.pytz', 'IPython.exceptions',  
'IPython.new', 'dis', 'cStringIO', 'pkgutil',  
'IPython.external.simplegeneric', 'IPython.platutils_posix',  
'IPython.path', 'IPython.types', 'IPython', 'IPython.external',  
'IPython.commands', 'matplotlib.matplotlib', 'encodings',  
'IPython.threading', 'bdb', 'IPython.ConfigLoader',  
'matplotlib.warnings', 'matplotlib.string', 'urllib', 'IPython.pdb',  
're', 'posix', 'IPython.shadowns', 'math', 'fcntl', 'pytz.tzinfo',  
'dateutil', 'optparse', 'UserDict', 'inspect', 'IPython.hooks',  
'distutils.os', '_ctypes', 'Queue', 'fnmatch', 'ctypes',  
'IPython.generics', 'ctypes.struct', 'codecs', 'matplotlib.sys',  
'path', 'pickleshare', 'pytz.bisect', 'md5', 'IPython.ColorANSI',  
'commands', 'matplotlib.sre_constants', 'socket', 'thread',  
'StringIO', 'IPython.StringIO', 'traceback', 'IPython.pstats',  
'weakref', 'itertools', 'opcode', 'doctest', 'IPython.history',  
'pstats', 'IPython.tokenize', 'distutils.sys', 'os', 'pdb',  
'IPython.traceback', '__future__', 'matplotlib.copy',  
'distutils.distutils', '_sre', 'unittest', 'IPython.ipmaker',  
'__builtin__', 'matplotlib.re', 'operator', 'distutils.string',  
'ctypes._ctypes', '_heapq', 'ctypes.sys', 'matplotlib.datetime',  
'IPython.codeop', 'posixpath', 'errno', '_socket', 'binascii',  
'IPython.sys', 'IPython.re', 'sre_constants', 'IPython.cProfile',  
'_sha256', 'IPython.PyColorize', 'matplotlib.md5', 'types',  
'IPython.genutils', 'tokenize', 'gestalt', 'matplotlib.tempfile',  
'textwrap', 'IPython.strdispatch', 'cPickle', 'pytz.sys',  
'IPython.platutils', 'matplotlib.xml', 'IPython.macro', '_codecs',  
'IPython.token', '_locale', 'IPython.keyword', 'IPython.IPython',  
'IPython.string', 'pytz', 'matplotlib.pyparsing',  
'IPython.__builtin__', 'copy', 'pwd', '_struct', '_types',  
'IPython.socket', 'hashlib', 'IPython.resource', 'IPython.cmd',  
'keyword', 'atexit', 'distutils', 'IPython.linecache',  
'xml.sax.saxutils', 'IPython.optparse', 'IPython.__main__',  
'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions',  
'sre_parse', 'IPython.ultraTB', 'IPython.prefilter',  
'IPython.tempfile', 'IPython.Release', 'IPython.OutputTrap',  
'copy_reg', 'sre_compile', 'xml.sax', 'xml.sax.os', '_hashlib',  
'_random', 'site', 'IPython.sets', 'IPython.getopt',  
'IPython.ipstruct', 'IPython.external.types', 'IPython.inspect',  
'__main__', 'locale', 'shutil', 'IPython.Magic', 'IPython.pprint',  
'urlparse', 'xml.sax.urllib', 'matplotlib.os', 'strop',  
'IPython.bisect', 'xml.sax.handler', 'IPython.textwrap',  
'xml.sax.codecs', 'IPython.shutil', 'encodings.codecs',  
'ctypes.gestalt', 'pytz.datetime', 'IPython.Logger',  
'matplotlib.rcsetup', 'getopt', 'matplotlib.weakref', 'pytz.sets',  
'xml.sax._exceptions', 'IPython.readline', 'stat', '_ssl',  
'warnings', 'encodings.types', 'glob', 'sets', 'repr', 'sys',  
'ctypes.ctypes', 'codeop', 'readline', 'os.path',  
'IPython.background_jobs', 'IPython.DPyGetOpt', 'IPython.cPickle',  
'xml.sax.sys', 'IPython.usage', 'matplotlib.distutils', '_weakref',  
'difflib', 'distutils.errors', 'marshal', 'matplotlib', 'linecache',  
'matplotlib.shutil', 'time', 'IPython.FakeModule', 'IPython.ipapi']
numerix numpy 1.0.5.dev4407
$HOME=/Users/rob
CONFIGDIR=/Users/rob/.matplotlib
Using fontManager instance from /Users/rob/.matplotlib/fontManager.cache
backend WXAgg version 2.8.6.1
Python 2.5 (r25:51918, Sep 19 2006, 

[Matplotlib-users] ps.usedistiller doesn't know ghostscript version

2007-12-03 Thread Lionel Roubeyrie
Hi all,
there's a little problem with ghostscript on ubuntu gutsy, mpl complaints 
about a bad version :
ipython -pylab
/usr/lib/python2.5/site-packages/matplotlib/__init__.py:641: UserWarning: 
matplotlibrc ps.usedistiller option can not be used unless ghostscript-7.07 
or later is installed on your system

but gs -v returns:
GPL Ghostscript SVN PRE-RELEASE 8.61 (2007-08-02)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.

Here is the modified __init__.py to deal with it :

def checkdep_ghostscript():
try:
if sys.platform == 'win32':
command = 'gswin32c -v'
else:
command = 'gs --version'
stdin, stdout = os.popen4(command)
line = stdout.readlines()[0]
v = line.strip()
vtest = '.'.join(v.split('.')[:2]) # deal with version numbers 
like '7.07.1'
float(vtest)
return vtest

matplotlib.__version__
Out [10]:'0.90.1'

-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] printing quality

2007-12-03 Thread Rich Shepard
On Mon, 3 Dec 2007, Michael Droettboom wrote:

 That may be beyond matplotlib's control.  Matplotlib requests a solid
 grey color, but the printing stack (Acrobat, the printer driver or the
 printer itself) could be interpreting that in many ways.  You could
 experiment with various printer settings.

 Sorry to not have a more helpful answer.  Perhaps others on this list
 have suggestions.

   Don't know if this is pertinent to this thread, but I see differences when
viewing LaTeX documents such as an OMR (Optical Mark Reader) form I designed
when viewed as PostScript and as PDF. The former displays the graphics
better than does the latter while the latter better displays the text. In my
case, the printed version combines the highest quality of the two.

Rich

-- 
Richard B. Shepard, Ph.D.   |  IntegrityCredibility
Applied Ecosystem Services, Inc.|Innovation
http://www.appl-ecosys.com Voice: 503-667-4517  Fax: 503-667-8863

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Missing \Delta in mathtext

2007-12-03 Thread Michael Droettboom
I see what's going on here.  Upper-case Greek letters are always upright 
  (non-italic) in mathtext.  TeX does this, and it is apparently a long 
standing American typographic convention.

So, when it goes to print the \Delta, it looks at mathtext.rm, which 
in your case you have set to serif, which causes it to look at the 
setting for font.serif, in which the first font it finds is Bitstream 
Vera Serif, which doesn't have Greek characters.

Personally, I like to set the math fonts explicitly, rather than using 
the font categories.  This is what I set for using Arev Sans:

mathtext.cal : Arev Sans:oblique
mathtext.it  : Arev Sans:oblique
mathtext.rm  : Arev Sans
mathtext.bf  : Arev Sans:bold
mathtext.sf  : Arev Sans

I may consider adding arev and arevsans values to mathtext.fontset 
that would do nothing more than set the mathtext.* values to 
reasonable defaults to avoid this confusion.  (Which would of course 
require that the Arev fonts are available -- they aren't included with 
matplotlib).  I still think it's useful and reasonable to provide access 
to full font customization, but it would be nice to support the common 
case in a more direct way.

Hope that helps.

Cheers,
Mike

Rob Hetland wrote:
 
 On Dec 3, 2007, at 2:26 PM, Michael Droettboom wrote:
 
 Can you send your matplotlibrc settings and the mathtext expression 
 you are using?  One or the other of those is causing Vera Serif to be 
 used for the \Delta character rather than Arev Sans.
 
 
 I get this error anytime I try to get a delta.  E.g.:
 
 text(0.5, 0.5, r'$\Delta$)
 
 (I think this is what you mean by mathtext expresssion?)  Here is the 
 relevant part of the matplotlibrc file:
 
 
 font.family : sans-serif
 font.style  : normal
 font.variant: normal
 font.weight : medium
 font.stretch: normal
 # note that font.size controls default text sizes.  To configure
 # special text sizes tick labels, axes, labels, title, etc, see the rc
 # settings for axes and ticks. Special text sizes can be defined
 # relative to font.size, using the following values: xx-small, x-small,
 # small, medium, large, x-large, xx-large, larger, or smaller
 font.size   : 12.0
 font.serif  : STIX, Bitstream Vera Serif, New Century 
 Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus 
 Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
 font.sans-serif : Arev Sans
 #, Lucida Grande, Helvetica, Verdana, Geneva, Lucid, Avant Garde, 
 sans-serif
 font.cursive: Zapfino, Apple Chancery, Textile, Sand, cursive
 font.fantasy: Chicago, Comic Sans MS, Charcoal, Impact, Western, 
 fantasy
 font.monospace  : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono 
 L, Courier New, Courier, Fixed, Terminal, monospace
 
 text.color  : black
 text.usetex : False
 text.dvipnghack : True
 
 ### MATHTEXT
 mathtext.fallback_to_cm : False
 mathtext.cal : sans:oblique
 mathtext.it  : sans:oblique
 mathtext.rm  : serif
 mathtext.bf  : sans:bold
 mathtext.sf  : sans
 # mathtext.fontset : stixsans
 mathtext.fontset : custom  # for arev sans
 
 pdf.fonttype   : 42
 
 # pdf.use14corefonts : True
 # ps.fonttype : 42
 # ps.useafm : True
 
 
 
 
 
 Rob Hetland, Associate Professor
 Dept. of Oceanography, Texas AM University
 http://pong.tamu.edu/~rob
 phone: 979-458-0096, fax: 979-845-6331
 
 

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Missing \Delta in mathtext

2007-12-03 Thread Rob Hetland

On Dec 3, 2007, at 2:26 PM, Michael Droettboom wrote:

 Can you send your matplotlibrc settings and the mathtext expression  
 you are using?  One or the other of those is causing Vera Serif to  
 be used for the \Delta character rather than Arev Sans.


I get this error anytime I try to get a delta.  E.g.:

text(0.5, 0.5, r'$\Delta$)

(I think this is what you mean by mathtext expresssion?)  Here is the  
relevant part of the matplotlibrc file:


font.family : sans-serif
font.style  : normal
font.variant: normal
font.weight : medium
font.stretch: normal
# note that font.size controls default text sizes.  To configure
# special text sizes tick labels, axes, labels, title, etc, see the rc
# settings for axes and ticks. Special text sizes can be defined
# relative to font.size, using the following values: xx-small, x-small,
# small, medium, large, x-large, xx-large, larger, or smaller
font.size   : 12.0
font.serif  : STIX, Bitstream Vera Serif, New Century  
Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman,  
Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
font.sans-serif : Arev Sans
#, Lucida Grande, Helvetica, Verdana, Geneva, Lucid, Avant Garde,  
sans-serif
font.cursive: Zapfino, Apple Chancery, Textile, Sand, cursive
font.fantasy: Chicago, Comic Sans MS, Charcoal, Impact,  
Western, fantasy
font.monospace  : Bitstream Vera Sans Mono, Andale Mono, Nimbus  
Mono L, Courier New, Courier, Fixed, Terminal, monospace

text.color  : black
text.usetex : False
text.dvipnghack : True

### MATHTEXT
mathtext.fallback_to_cm : False
mathtext.cal : sans:oblique
mathtext.it  : sans:oblique
mathtext.rm  : serif
mathtext.bf  : sans:bold
mathtext.sf  : sans
# mathtext.fontset : stixsans
mathtext.fontset : custom  # for arev sans

pdf.fonttype   : 42

# pdf.use14corefonts : True
# ps.fonttype : 42
# ps.useafm : True





Rob Hetland, Associate Professor
Dept. of Oceanography, Texas AM University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331



-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Missing \Delta in mathtext

2007-12-03 Thread Rob Hetland

On Dec 3, 2007, at 2:53 PM, Michael Droettboom wrote:

 Personally, I like to set the math fonts explicitly, rather than  
 using the font categories.  This is what I set for using Arev Sans:

 mathtext.cal : Arev Sans:oblique
 mathtext.it  : Arev Sans:oblique
 mathtext.rm  : Arev Sans
 mathtext.bf  : Arev Sans:bold
 mathtext.sf  : Arev Sans



Ah, yes.  This makes sense now. I used to have my fonts set up this  
way, but then changed them based on one of the newer  
matplotlibrc.default files.  Now I changed it back, and things work  
fine.

-Rob


Rob Hetland, Associate Professor
Dept. of Oceanography, Texas AM University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331



-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread Chris Fonnesbeck
On Dec 2, 2007 10:44 PM, John Hunter [EMAIL PROTECTED] wrote:
 On Dec 2, 2007 9:23 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:
  Running a recent build from svn on OSX 10.5, the TkAgg interface
  becomes unresponsive after plotting a histogram and calling show().
  Here is a sample from the process, in case it is useful:

 I'm not seeing this with tkagg on 10.5.  hist is working fine for me
 both in ipython and running histogram_demo.py -- what tcl/tk are you
 building against?

I've just tried installing ActiveState's Tk/Tcl, but I get the
following error when I try to plot anything:

Exception in Tkinter callback
Traceback (most recent call last):
  File 
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py,
line 1403, in __call__
return self.func(*args)
  File /Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py,
line 188, in resize
self.show()
  File /Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py,
line 192, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File /Library/Python/2.5/site-packages/matplotlib/backends/tkagg.py,
line 15, in blit
tk.call(PyAggImagePhoto, photoimage, id(aggimage), colormode, id(bbox))
TclError




-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib very slow

2007-12-03 Thread José Gómez-Dans
Hi,
I have compiled v.0.90.1 on RHEL 5. By default, the GTKAgg backend is being 
used (TkAgg cannot be set, as TkInter is not installed on the system, I 
think. It throws a NO Module named Tkinter error).

At any rate, a test session is as follows:
import pylab
pylab.plot ( [1,2,3],[1,2,3],'-or') #Wait for a long time, up to 3-4 minutes
pylab.show() # Display the graph. Quite fast 1sec

This delay is very unusual, and does not happen on my laptop. Does anyone have 
any ideas?

Thanks!
Jose

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ps.usedistiller doesn't know ghostscript version

2007-12-03 Thread Darren Dale
On Monday 03 December 2007 9:03:59 am Lionel Roubeyrie wrote:
 Hi all,
 there's a little problem with ghostscript on ubuntu gutsy, mpl complaints
 about a bad version :
 ipython -pylab
 /usr/lib/python2.5/site-packages/matplotlib/__init__.py:641: UserWarning:
 matplotlibrc ps.usedistiller option can not be used unless ghostscript-7.07
 or later is installed on your system

 but gs -v returns:
 GPL Ghostscript SVN PRE-RELEASE 8.61 (2007-08-02)
 Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.

 Here is the modified __init__.py to deal with it :
 
 def checkdep_ghostscript():
 try:
 if sys.platform == 'win32':
 command = 'gswin32c -v'
 else:
 command = 'gs --version'
 stdin, stdout = os.popen4(command)
 line = stdout.readlines()[0]
 v = line.strip()
 vtest = '.'.join(v.split('.')[:2]) # deal with version numbers
 like '7.07.1'
 float(vtest)
 return vtest
 
 matplotlib.__version__
 Out [10]:'0.90.1'

This was fixed in matplotlib-0.91.1.

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread Chris Fonnesbeck
On Dec 3, 2007 11:04 AM, Michael Droettboom [EMAIL PROTECTED] wrote:
 Possibly related to the _tkagg extension -- that's what defines the
 PyAggImagePhoto method.  If you installed ActiveState's Tcl/Tk after
 building matplotlib, that could explain this.  Try doing a clean build
 of matplotlib again (removing the build directory first).

 But that's only a suggestion -- I don't use Macs much.

Thanks for the suggestion. I did do a fresh svn update and build after
installing Tk/Tcl.

-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread John Hunter
On Dec 3, 2007 10:08 AM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:

 On Dec 3, 2007 10:58 AM, John Hunter [EMAIL PROTECTED] wrote:
  On Dec 2, 2007 9:23 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:
   Running a recent build from svn on OSX 10.5, the TkAgg interface
   becomes unresponsive after plotting a histogram and calling show().
   Here is a sample from the process, in case it is useful:
 
  Is it only hist that is hanging?  Does plot work  This one has me
  a bit stumped.

 Same thing. Here is what I did:

 In [1]: from matplotlib import use

Sorry for the confusion, I was still on the *old* problem of tkagg
hanging w/ hist, and was wondering if it was hanging with other plot
commands too.  Not that you can easily test now w/ the active tcl
install.

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread Michael Droettboom
Possibly related to the _tkagg extension -- that's what defines the 
PyAggImagePhoto method.  If you installed ActiveState's Tcl/Tk after 
building matplotlib, that could explain this.  Try doing a clean build 
of matplotlib again (removing the build directory first).

But that's only a suggestion -- I don't use Macs much.

Cheers,
Mike

Chris Fonnesbeck wrote:
 On Dec 2, 2007 10:44 PM, John Hunter [EMAIL PROTECTED] wrote:
 On Dec 2, 2007 9:23 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:
 Running a recent build from svn on OSX 10.5, the TkAgg interface
 becomes unresponsive after plotting a histogram and calling show().
 Here is a sample from the process, in case it is useful:
 I'm not seeing this with tkagg on 10.5.  hist is working fine for me
 both in ipython and running histogram_demo.py -- what tcl/tk are you
 building against?
 
 I've just tried installing ActiveState's Tk/Tcl, but I get the
 following error when I try to plot anything:
 
 Exception in Tkinter callback
 Traceback (most recent call last):
   File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py,
 line 1403, in __call__
 return self.func(*args)
   File 
 /Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py,
 line 188, in resize
 self.show()
   File 
 /Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py,
 line 192, in draw
 tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
   File /Library/Python/2.5/site-packages/matplotlib/backends/tkagg.py,
 line 15, in blit
 tk.call(PyAggImagePhoto, photoimage, id(aggimage), colormode, id(bbox))
 TclError
 
 
 
 

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread Chris Fonnesbeck
On Dec 3, 2007 10:58 AM, John Hunter [EMAIL PROTECTED] wrote:
 On Dec 2, 2007 9:23 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:
  Running a recent build from svn on OSX 10.5, the TkAgg interface
  becomes unresponsive after plotting a histogram and calling show().
  Here is a sample from the process, in case it is useful:

 Is it only hist that is hanging?  Does plot work  This one has me
 a bit stumped.

Same thing. Here is what I did:

In [1]: from matplotlib import use

In [2]: use('TkAgg')

In [3]: from numpy import random

In [4]: x = random.gamma(0.1, 1000, 1000)

In [5]: from pylab import *

In [6]: plot(x)
Out[6]: [matplotlib.lines.Line2D instance at 0x1dda508]

In [7]: show()
Exception in Tkinter callback
Traceback (most recent call last):
  File 
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk/Tkinter.py,
line 1403, in __call__
return self.func(*args)
  File /Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py,
line 188, in resize
self.show()
  File /Library/Python/2.5/site-packages/matplotlib/backends/backend_tkagg.py,
line 192, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File /Library/Python/2.5/site-packages/matplotlib/backends/tkagg.py,
line 15, in blit
tk.call(PyAggImagePhoto, photoimage, id(aggimage), colormode, id(bbox))
TclError





-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-03 Thread John Hunter
On Dec 3, 2007 5:53 PM, John Hunter [EMAIL PROTECTED] wrote:
 On Dec 3, 2007 5:49 PM, John Hunter [EMAIL PROTECTED] wrote:

  Charlie, I don't know how you handled this last time, but is there
  something in setuptools you have to disable for this build?

 Well, here's a clue: matplotlib/__init__.py does not exist in this instal

When I copy all the dirs from the 2.5 egg you built into
site-packages, I get a matplotlib with rcParams and the rest of the
__init__.py stuff.  Unfortunately, when I try to import pylab, I get
the dreaded old msvcp71.dll error.  If I recall correctly, we used to
hack distutils to remove the line that linked with that lib.

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-03 Thread John Hunter
On Dec 3, 2007 5:49 PM, John Hunter [EMAIL PROTECTED] wrote:

 Charlie, I don't know how you handled this last time, but is there
 something in setuptools you have to disable for this build?

Well, here's a clue: matplotlib/__init__.py does not exist in this instal

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] TypeError on CocoaAgg backend

2007-12-03 Thread Chris Fonnesbeck
OK, I'm having a bad backend day (insert joke here).

Since I am on OSX, I decided to switch over to the CocoaAgg backend,
but it fails when trying to show a histogram, yielding the following
TypeError:

In [4]: from matplotlib import use

In [5]: use('CocoaAgg')

In [6]: from pylab import hist, show

In [7]: from numpy import random

In [8]: x = random.exponential(2, 1000)

In [9]: hist(x)
Out[9]:
(array([545, 230, 117,  59,  18,  15,  11,   1,   3,   1]),
 array([  2.99606603e-03,   1.52977050e+00,   3.05654494e+00,
 4.58331937e+00,   6.11009381e+00,   7.63686824e+00,
 9.16364268e+00,   1.06904171e+01,   1.22171915e+01,
 1.37439660e+01]),
 a list of 10 Patch objects)

In [10]: show()
---
TypeError Traceback (most recent call last)

/Users/chris/Projects/Occupancy-abundance Manuscript/ipython console
in module()

/Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
in show()
 44 def show():
 45 for manager in Gcf.get_all_fig_managers():
--- 46 manager.show()
 47
 48 def draw_if_interactive():

/Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
in show(self)
203 mplBundle,
204 False)
-- 205 NSApplication.sharedApplication().run()
206
207

/Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
in startWithBundle_(self, bundle)
179 def startWithBundle_(self, bundle):
180 #NSApplicationLoad()
-- 181 if not
bundle.loadNibFile_externalNameTable_withZone_('Matplotlib.nib', {},
None):
182 print sys.stderr, 'Unable to load Matplotlib Cocoa UI!'
183 sys.exit()

/Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
in awakeFromNib(self)
 79
 80 self.plotView.setImageFrameStyle_(NSImageFrameGroove)
--- 81 self.plotView.image = NSImage.alloc().initWithSize_((0,0))
 82 self.plotView.setImage_(self.plotView.image)
 83

TypeError: cannot change a method

-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-03 Thread Charlie Moad
I gave it a try, and I did not get this error.

- Charlie

On Dec 3, 2007 12:57 PM, Jörgen Stenarson [EMAIL PROTECTED] wrote:
 Hi,

 After upgrading to the new matplotlib 0.9.1 on python2.4 using the
 windows binary installer I get the following error:


 C:\python
 Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on
 win32
 Type help, copyright, credits or license for more information.
   import pylab
 Traceback (most recent call last):
File stdin, line 1, in ?
File C:\Python24\Lib\site-packages\pylab.py, line 1, in ?
  from matplotlib.pylab import *
File C:\Python24\Lib\site-packages\matplotlib\pylab.py, line 206, in ?
  from matplotlib.numerix import npyma as ma
File C:\Python24\Lib\site-packages\matplotlib\numerix\__init__.py,
 line 20, in ?
  from matplotlib import rcParams, verbose
 ImportError: cannot import name rcParams

 Does anyone else see the same thing?


 best regards
 Jörgen



 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with binary install of matplotlib-0.9.1 python2.4 on windows

2007-12-03 Thread John Hunter
On Dec 3, 2007 5:44 PM, Charlie Moad [EMAIL PROTECTED] wrote:
 I gave it a try, and I did not get this error.

I am seeing the problem on python2.5 using the binary exe installer.
It appears we are getting fouled up by setuptools special handling of
the __init__.py file, which is supposed to be empty I think to support
namespace packages.  All the stuff we are defining in
matplotlib/__init__.py, like rcParams and friends, is being lost.
Instead, a

 import matplotlib
 dir(matplotlib)

just shows the special names '__path__', '__doc__',  and '__name__',
and the  'toolkit' dir.

Charlie, I don't know how you handled this last time, but is there
something in setuptools you have to disable for this build?

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] TypeError on CocoaAgg backend

2007-12-03 Thread Barry Wark
sorry instances of self.plotView.image

On Dec 3, 2007 3:38 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:
 OK, I'm having a bad backend day (insert joke here).

 Since I am on OSX, I decided to switch over to the CocoaAgg backend,
 but it fails when trying to show a histogram, yielding the following
 TypeError:

 In [4]: from matplotlib import use

 In [5]: use('CocoaAgg')

 In [6]: from pylab import hist, show

 In [7]: from numpy import random

 In [8]: x = random.exponential(2, 1000)

 In [9]: hist(x)
 Out[9]:
 (array([545, 230, 117,  59,  18,  15,  11,   1,   3,   1]),
  array([  2.99606603e-03,   1.52977050e+00,   3.05654494e+00,
  4.58331937e+00,   6.11009381e+00,   7.63686824e+00,
  9.16364268e+00,   1.06904171e+01,   1.22171915e+01,
  1.37439660e+01]),
  a list of 10 Patch objects)

 In [10]: show()
 ---
 TypeError Traceback (most recent call last)

 /Users/chris/Projects/Occupancy-abundance Manuscript/ipython console
 in module()

 /Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
 in show()
  44 def show():
  45 for manager in Gcf.get_all_fig_managers():
 --- 46 manager.show()
  47
  48 def draw_if_interactive():

 /Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
 in show(self)
 203 mplBundle,
 204 False)
 -- 205 NSApplication.sharedApplication().run()
 206
 207

 /Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
 in startWithBundle_(self, bundle)
 179 def startWithBundle_(self, bundle):
 180 #NSApplicationLoad()
 -- 181 if not
 bundle.loadNibFile_externalNameTable_withZone_('Matplotlib.nib', {},
 None):
 182 print sys.stderr, 'Unable to load Matplotlib Cocoa UI!'
 183 sys.exit()

 /Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
 in awakeFromNib(self)
  79
  80 self.plotView.setImageFrameStyle_(NSImageFrameGroove)
 --- 81 self.plotView.image = NSImage.alloc().initWithSize_((0,0))
  82 self.plotView.setImage_(self.plotView.image)
  83

 TypeError: cannot change a method

 --
 Christopher J. Fonnesbeck
 + Fish  Wildlife Research Institute (FWC)
 + 727.235.5570

 -
 SF.Net email is sponsored by: The Future of Linux Business White Paper
 from Novell.  From the desktop to the data center, Linux is going
 mainstream.  Let it simplify your IT future.
 http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread John Hunter
On Dec 3, 2007 10:13 AM, John Hunter [EMAIL PROTECTED] wrote:

 Sorry for the confusion, I was still on the *old* problem of tkagg
 hanging w/ hist, and was wondering if it was hanging with other plot
 commands too.  Not that you can easily test now w/ the active tcl
 install.

Chris, if you get some time to explore this further, I'd like to see
if we can sort it out.  If you could remove the acive tcl and do a
clean rebuild of mpl, I'd like to verify the hang still exists, and
whether it is hist or all plot commands, and et some version info (eg
what tcl/tk) and see a copy of the mpl build output.  Also, I'd like
to see a run w/ --verbose-debug output.  I find it strange because I
am on the same platform and am not having any troubles (yet) with
tkagg.

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to change coordinate system origin

2007-12-03 Thread John Hunter
On Dec 3, 2007 7:50 AM, Jaonary Rabarisoa [EMAIL PROTECTED] wrote:
 Hi all,

 I'm relatively new to matplotlib and what I'll ask to you seems to be simple
 but I just can't figure out how to do this. I'd like to change the origin of
 my coordinate system  to the upper left of my axis when I plot my figures.
 In matlab I use axis('ij') but in matplotlib I couldn't find something
 similar. How will I do this ?

I am not 100% sure what you are asking and I don't have a matlab
install handy to test.  If you want to plot a decreasing scale on the
y-axis, that is easy, just invert the min and max args to the ylim

ax.set_ylim(ymax, ymin)

If you want to do something more sophisticated, please describe in
detail and then I may have to tell you it is not currently supported
:-(

JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib very slow

2007-12-03 Thread John Hunter
On Dec 3, 2007 9:08 AM, José Gómez-Dans [EMAIL PROTECTED] wrote:
 Hi,
 I have compiled v.0.90.1 on RHEL 5. By default, the GTKAgg backend is being
 used (TkAgg cannot be set, as TkInter is not installed on the system, I
 think. It throws a NO Module named Tkinter error).

 At any rate, a test session is as follows:
 import pylab
 pylab.plot ( [1,2,3],[1,2,3],'-or') #Wait for a long time, up to 3-4 minutes
 pylab.show() # Display the graph. Quite fast 1sec

 This delay is very unusual, and does not happen on my laptop. Does anyone have
 any ideas?

This is not happening for me.  Does it happen every time you run mpl
or just the first time after you install.  Run some test script, eg

   cat test.py
  from pylab import *
  plot([1,2,3])
  show()

with

   python test.py -dGTKAgg --verbose-debug

and see if you can get some clue what mpl is doing when it hangs.
Also, post the verbose output to the list.

Thanks,
JDH

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] TypeError on CocoaAgg backend

2007-12-03 Thread Chris Fonnesbeck
On Dec 3, 2007 7:34 PM, Barry Wark [EMAIL PROTECTED] wrote:
 sorry instances of self.plotView.image

 On Dec 3, 2007 3:38 PM, Chris Fonnesbeck [EMAIL PROTECTED] wrote:



I replaced the one instance of this that I found. I now get the following error:

In [7]: show()
---
ValueErrorTraceback (most recent call last)

/Users/chris/ipython console in module()

/Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
in show()
 44 def show():
 45 for manager in Gcf.get_all_fig_managers():
--- 46 manager.show()
 47
 48 def draw_if_interactive():

/Library/Python/2.5/site-packages/matplotlib/backends/backend_cocoaagg.py
in show(self)
203 mplBundle,
204 False)
-- 205 NSApplication.sharedApplication().run()
206
207

ValueError: NSInvalidArgumentException - NSImageCell's object value
must be an NSImage.


-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hist() hangs on OSX 10.5

2007-12-03 Thread Chris Fonnesbeck
On Dec 3, 2007 9:41 PM, John Hunter [EMAIL PROTECTED] wrote:
 On Dec 3, 2007 10:13 AM, John Hunter [EMAIL PROTECTED] wrote:

  Sorry for the confusion, I was still on the *old* problem of tkagg
  hanging w/ hist, and was wondering if it was hanging with other plot
  commands too.  Not that you can easily test now w/ the active tcl
  install.

 Chris, if you get some time to explore this further, I'd like to see
 if we can sort it out.  If you could remove the acive tcl and do a
 clean rebuild of mpl, I'd like to verify the hang still exists, and
 whether it is hist or all plot commands, and et some version info (eg
 what tcl/tk) and see a copy of the mpl build output.  Also, I'd like
 to see a run w/ --verbose-debug output.  I find it strange because I
 am on the same platform and am not having any troubles (yet) with
 tkagg.

John,

I removed ActiveTcl and the hang seems to have disappeared, both for
hist and plot.

cf

-- 
Christopher J. Fonnesbeck
+ Fish  Wildlife Research Institute (FWC)
+ 727.235.5570

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Contours on imshow with limited range

2007-12-03 Thread Christian Lerrahn
Hi,
I limit the value range of my imshow using vmin and vmax. As I like the
way the contour levels are usually coloured by contour, I would like to
just restrict them to the same range but have matplotlib use the
default spacing and colouring. In other words, I want to avoid setting
levels manually. Is that possible at all? There is obviously no vmin
and vmax in contour but can I do this is some other way? Or do I have
to set up my own array for the levels to achieve this?

Cheers,
Christian

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users