Re: [Matplotlib-users] show() blocks script execution for TkAgg from ipython -pylab

2010-08-10 Thread Ryan Krauss
In case this is helpful:

E:\>C:\Python26\python.exe ipython_show_test.py --verbose-debug
$HOME=D:\
CONFIGDIR=D:\.matplotlib
matplotlib data path C:\Python26\lib\site-packages\matplotlib\mpl-data
loaded rc file D:\.matplotlib\matplotlibrc
matplotlib version 1.0.0
verbose.level debug
interactive is False
units is False
platform is win32
loaded modules: ['numpy.lib._iotools', 'xml.sax.urlparse', 'distutils', 'numpy.l
ib.npyio', 'functools', 'pylab', '_bisect', 'subprocess', 'gc', 'matplotlib.temp
file', 'distutils.sysconfig', 'ctypes._endian', 'encodings.encodings', 'matplotl
ib.colors', 'msvcrt', 'numpy.testing.sys', 'numpy.core.info', 'xml', 'numpy.fft.
types', 'numpy.ma.cPickle', 'matplotlib.copy', 'numpy.matrixlib.defmatrix', 'num
py.random.info', 'tempfile', 'numpy.compat.types', 'base64', 'numpy.linalg', 'ma
tplotlib.threading', 'numpy.core.machar', 'numpy.testing.types', 'numpy.testing'
, 'bisect', 'collections', 'numpy.polynomial.sys', 'numpy.core.umath', '_struct'
, 'distutils.types', 'numpy.testing.operator', 'numpy.lib.numpy', 'numpy.core.sc
alarmath', 'numpy.ma.sys', 'matplotlib.matplotlib', 'string', 'matplotlib.subpro
cess', 'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops', 'numpy.
testing.unittest', 'numpy.lib.math', 'textwrap', 'matplotlib.__future__', 'ssl',
 'numpy.testing.re', 'itertools', 'numpy.version', 'numpy.lib.re', 'distutils.re
', 'numpy.matrixlib.sys', 'ctypes.os', 'numpy.core.os', 'numpy.lib.type_check',
'numpy.compat.sys', 'numpy.lib.__builtin__', 'signal', 'numpy.lib.types', 'numpy
.lib._datasource', 'random', 'threading', 'numpy.fft.fftpack_lite', 'matplotlib.
cbook', 'ctypes.ctypes', 'xml.sax.xmlreader', 'numpy.polynomial.string', 'distut
ils.version', 'cStringIO', 'numpy.polynomial', 'numpy.numpy', 'matplotlib.String
IO', 'numpy.ma.extras', 'locale', 'numpy.add_newdocs', 'numpy.core.getlimits', '
xml.sax.saxutils', 'numpy.lib.sys', 'encodings', 'numpy.ma.itertools', 'array',
'StringIO', 'abc', 'numpy.matrixlib', 'numpy.ctypes', 'numpy.testing.decorators'
, 'matplotlib.warnings', 'rfc822', 'matplotlib.string', '_subprocess', 'urllib',
 'matplotlib.sys', 're', 'numpy.lib._compiled_base', 'ntpath', 'new', 'numpy.ran
dom.mtrand', 'urllib2', 'matplotlib.cPickle', 'math', 'numpy.fft.helper', 'numpy
.ma.warnings', 'matplotlib.numpy', 'UserDict', 'numpy.lib.function_base', 'distu
tils.os', 'matplotlib', 'numpy.fft.numpy', 'xml.sax.codecs', 'exceptions', 'nump
y.lib.info', 'numpy.core.numerictypes', 'ctypes', 'numpy.lib.warnings', 'ctypes.
struct', 'codecs', 'numpy.core._sort', 'numpy.os', 'struct', '_functools', '_loc
ale', 'numpy.__builtin__', 'matplotlib.sre_constants', 'matplotlib.os', 'thread'
, 'numpy.lib.ufunclike', 'numpy.core.memmap', 'traceback', 'numpy.testing.warnin
gs', 'weakref', 'numpy.core._internal', 'numpy.fft.fftpack', 'numpy.linalg.lapac
k_lite', 'numpy.ma', 'distutils.sys', 'os', 'numpy.matrixlib.numpy', 'httplib',
'numpy.lib.itertools', '__future__', '_collections', 'xml.sax.types', 'matplotli
b.traceback', '_sre', 'unittest', 'numpy.core.sys', 'numpy.random', 'numpy.linal
g.numpy', '__builtin__', 'numpy.lib.twodim_base', 'numpy.ma.core', 'matplotlib.r
e', 'numpy.core.cPickle', 'operator', 'numpy.polynomial.polytemplate', 'numpy.co
re.arrayprint', 'distutils.string', 'numpy.lib.arrayterator', 'ctypes._ctypes',
'ctypes.sys', 'matplotlib.errno', 'numpy.testing.nosetester', 'posixpath', 'nump
y.lib.financial', 'numpy.core.multiarray', 'errno', '_socket', 'binascii', 'sre_
constants', 'datetime', 'numpy.core.shape_base', 'xml.sax.handler', 'os.path', '
numpy.core.function_base', 'numpy.compat.py3k', '_ctypes', 'numpy.lib.stride_tri
cks', 'numpy.core.numpy', 'numpy', '_warnings', 'numpy.polynomial.chebyshev', 'm
atplotlib.types', 'xml.sax.os', 'cPickle', 'encodings.__builtin__', 'numpy.polyn
omial.warnings', 'matplotlib.xml', 'matplotlib.new', '_codecs', 'numpy.lib.opera
tor', 'numpy.polynomial.polynomial', 'encodings.cp1252', 'matplotlib.pyparsing',
 'nturl2path', 'numpy.ma.numpy', 'copy', 'numpy.core.re', 'socket', 'numpy.core.
fromnumeric', 'hashlib', 'numpy.ctypeslib', 'keyword', 'numpy.lib.scimath', 'num
py.fft', 'numpy.lib', 'numpy.random.numpy', 'matplotlib.urllib2', 'matplotlib.ra
ndom', 'numpy.polynomial.__future__', 'encodings.aliases', 'matplotlib.distutils
', 'fnmatch', 'sre_parse', 'numpy.core.ctypes', 'mimetools', 'distutils.distutil
s', 'copy_reg', 'sre_compile', 'xml.sax', '_hashlib', '_random', 'numpy.lib.__fu
ture__', 'site', 'numpy.lib.polynomial', 'numpy.compat', 'numpy._import_tools',
'zipimport', '__main__', 'numpy.fft.info', 'numpy.core.records', 'shutil', 'nump
y.lib.cPickle', 'numpy.sys', 'matplotlib.weakref', 'xml.sax.urllib', 'numpy.core
._dotblas', 'numpy.testing.traceback', 'strop', 'numpy.testing.numpytest', 'nump
y.polynomial.numpy', 'numpy.core.numeric', 'numpy.linalg.info', 'encodings.codec
s', '_abcoll', 'numpy.core', 'matplotlib.rcsetup', 'matplotlib.time', 'nt', 'xml
.sax._exceptions', 'genericpath', 'stat', '_ssl',

[Matplotlib-users] show() blocks script execution for TkAgg from ipython -pylab

2010-08-10 Thread Ryan Krauss
I just upgraded my windows machine to matplotlib 1.0.0 and a simple
script such as

from pylab import *
from scipy import *

t = arange(0,1,0.01)
y = sin(2*pi*t)

figure(1)
clf()
plot(t,y)

show()

Now halts execution when run from the ipython -pylab prompt.  The same
commands typed at the commandline do not lead to show() halting
execution.

Is this expected behavior?

Thanks,

Ryan

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-10 Thread Markus Baden

On Aug 11, 2010, at 6:09 AM, Friedrich Romstedt wrote:

> Are you on OSX 10.5 or 10.6?  I'm asking because it's important for
> others when you're on 10.5 because you're using gcc-4.0 then, while
> 10.6 users have at least for non-Python (distutils) compilations
> gcc-4.2 as default.

I'm running Mac OS X 10.5.8.

Markus


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-10 Thread Friedrich Romstedt
Are you on OSX 10.5 or 10.6?  I'm asking because it's important for
others when you're on 10.5 because you're using gcc-4.0 then, while
10.6 users have at least for non-Python (distutils) compilations
gcc-4.2 as default.

Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib v1.0.0 for mac: installation problem

2010-08-10 Thread Friedrich Romstedt
2010/8/9 Antonino Cucchiara :
> Hello,
> I am running a MacOS Snow leopard and I recently istalled the python 2.6
> via Enthought.
> I wanted to upgrade the matplotlib 1.0 but when I run the .mpkg the
> installation don't start because
> it seems not recognizing the python 2.6 is installed (I do have now 2.6.6).

Hi,

I guess the thread "Building matplotlib from source with libpng
(png.h) installed via fink on Mac OS X" may have already answered your
question?

You have to compile freetype2 and libpng I believe.  Do you need 32bit support?

Wait until Markus has reported whether his system is 10.5 or 10.6
(because of the gcc-4.0/4.2 issue).

Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-10 Thread Friedrich Romstedt
2010/8/10 Markus Baden :
> Thanks for the warning. Not really sure. So far I have seen no
> problems, i.e. can happily plot. How can I make sure that I don't ran
> into those problems? I usually don't mix packages and just hope that
> the EPD guys update to Matplotlib 1.0 soon.

When you can import pylab and do plotting and all then everything is
fine.  The mix I mentioned was that of the precompiled EPD (compiled
with, say, compiler 1) and your probably self-compiled freetype2 (with
say, compiler 2).  The problem arises if it does not hold compiler 1
== compiler 2.  In that case, usually one can compile, I believe since
the functions are marked as "extern", but when making an attempt to
actually load the shared lib (e.g. freetype2), it may fail with some
random "symbol not found"  error.

So far, everything okay.

Happy plotting!
Friedrich

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread Christoph Gohlke


On 8/10/2010 12:26 PM, Eric Firing wrote:
> On 08/10/2010 09:10 AM, Christoph Gohlke wrote:
>>
>>
>> On 8/10/2010 11:53 AM, stetrick wrote:
>>>
>>> Should probably indicate that it is the MKV versions
>>>
>>>
>>> stetrick wrote:



 Christoph Gohlke wrote:
>
>
>
> On 8/9/2010 3:09 PM, stetrick wrote:
>>
>> I am now getting a message that says:
>>
>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>>
>> This application has requested the Runtime to terminate it in an unusual
>> way.
>>
>> This is with matplotlib 1.0.0, but all versions are 64-bit (python,
>> numpy,
>> matplotlib).
>>
>> Is this something I can fix or ignore?
>>
>> Thanks!
>
> Using Numpy 1.4.1 on Windows 7 64 bit.
> Python version 2.6.5 for 64 bit as well.  All from your website of
> pre-compiled stuff.
>
> Thanks for doing that!
>
>>
>> Those versions should work. Can you post some more details how you run
>> python and a script that shows this problem. I assume you can import and
>> use matplotlib and the crash appears when exiting Python? It might just
>> be the old known bug in the Tk backend, not anything specific to the 64
>> bit version. See
>> 
>>
>> --
>> Christoph
>
> I thought that was fixed:
> http://sourceforge.net/tracker/?func=detail&aid=3015013&group_id=80706&atid=560720
>
> Eric
>

Yes the bug is fixed. If the program is terminated properly. However, 
you can still crash the Python interpreter if you close or kill the 
console window while the following script is running.

python -c"from matplotlib import pyplot;pyplot.hot();input()"

--
Christoph

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread Eric Firing
On 08/10/2010 09:10 AM, Christoph Gohlke wrote:
>
>
> On 8/10/2010 11:53 AM, stetrick wrote:
>>
>> Should probably indicate that it is the MKV versions
>>
>>
>> stetrick wrote:
>>>
>>>
>>>
>>> Christoph Gohlke wrote:



 On 8/9/2010 3:09 PM, stetrick wrote:
>
> I am now getting a message that says:
>
> Fatal Python error: PyEval_RestoreThread: NULL tstate
>
> This application has requested the Runtime to terminate it in an unusual
> way.
>
> This is with matplotlib 1.0.0, but all versions are 64-bit (python,
> numpy,
> matplotlib).
>
> Is this something I can fix or ignore?
>
> Thanks!

 Using Numpy 1.4.1 on Windows 7 64 bit.
 Python version 2.6.5 for 64 bit as well.  All from your website of
 pre-compiled stuff.

 Thanks for doing that!

>
> Those versions should work. Can you post some more details how you run
> python and a script that shows this problem. I assume you can import and
> use matplotlib and the crash appears when exiting Python? It might just
> be the old known bug in the Tk backend, not anything specific to the 64
> bit version. See
> 
>
> --
> Christoph

I thought that was fixed:
http://sourceforge.net/tracker/?func=detail&aid=3015013&group_id=80706&atid=560720

Eric

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread Christoph Gohlke


On 8/10/2010 11:53 AM, stetrick wrote:
>
> Should probably indicate that it is the MKV versions
>
>
> stetrick wrote:
>>
>>
>>
>> Christoph Gohlke wrote:
>>>
>>>
>>>
>>> On 8/9/2010 3:09 PM, stetrick wrote:

 I am now getting a message that says:

 Fatal Python error: PyEval_RestoreThread: NULL tstate

 This application has requested the Runtime to terminate it in an unusual
 way.

 This is with matplotlib 1.0.0, but all versions are 64-bit (python,
 numpy,
 matplotlib).

 Is this something I can fix or ignore?

 Thanks!
>>>
>>> Using Numpy 1.4.1 on Windows 7 64 bit.
>>> Python version 2.6.5 for 64 bit as well.  All from your website of
>>> pre-compiled stuff.
>>>
>>> Thanks for doing that!
>>>

Those versions should work. Can you post some more details how you run 
python and a script that shows this problem. I assume you can import and 
use matplotlib and the crash appears when exiting Python? It might just 
be the old known bug in the Tk backend, not anything specific to the 64 
bit version. See 


--
Christoph

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread stetrick

Should probably indicate that it is the MKV versions


stetrick wrote:
> 
> 
> 
> Christoph Gohlke wrote:
>> 
>> 
>> 
>> On 8/9/2010 3:09 PM, stetrick wrote:
>>>
>>> I am now getting a message that says:
>>>
>>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>>>
>>> This application has requested the Runtime to terminate it in an unusual
>>> way.
>>>
>>> This is with matplotlib 1.0.0, but all versions are 64-bit (python,
>>> numpy,
>>> matplotlib).
>>>
>>> Is this something I can fix or ignore?
>>>
>>> Thanks!
>> 
>> Using Numpy 1.4.1 on Windows 7 64 bit.
>> Python version 2.6.5 for 64 bit as well.  All from your website of
>> pre-compiled stuff.
>> 
>> Thanks for doing that!
>> 
>> 
>> 
>> Which version of numpy are you using? Assuming you are talking about 
>> matplotlib-1.0.0.win-amd64-py2.6.exe, you need 
>> numpy-1.4.1.win-amd64-py2.6.exe.
>> 
>> Christoph
>> 
>> --
>> This SF.net email is sponsored by 
>> 
>> Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> http://p.sf.net/sfu/RIM-dev2dev 
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Fatal-Python-Error-with-64-bit-versions-tp29392620p29401038.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread stetrick



Christoph Gohlke wrote:
> 
> 
> 
> On 8/9/2010 3:09 PM, stetrick wrote:
>>
>> I am now getting a message that says:
>>
>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>>
>> This application has requested the Runtime to terminate it in an unusual
>> way.
>>
>> This is with matplotlib 1.0.0, but all versions are 64-bit (python,
>> numpy,
>> matplotlib).
>>
>> Is this something I can fix or ignore?
>>
>> Thanks!
> 
> Using Numpy 1.4.1 on Windows 7 64 bit.
> Python version 2.6.5 for 64 bit as well.  All from your website of
> pre-compiled stuff.
> 
> Thanks for doing that!
> 
> 
> 
> Which version of numpy are you using? Assuming you are talking about 
> matplotlib-1.0.0.win-amd64-py2.6.exe, you need 
> numpy-1.4.1.win-amd64-py2.6.exe.
> 
> Christoph
> 
> --
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Fatal-Python-Error-with-64-bit-versions-tp29392620p29401026.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Pie Charts, How to control pie chart size in figure?

2010-08-10 Thread Michael Waters
Hi, I am making a simple pie chart that needs to be small ~3x3 inches. 
The problem I am having is that the text labels get pushed out side the 
figure. Is there anyway to make the plot smaller relative to the figure 
size? Here is my code and the resulting plot:
from pylab import *

# make a square figure and axes
figure(1, figsize=(3,3))
ax = axes([0.0, 0.0, 1.0, 0.9])

labels = 'Central\nCampus','Medical\nCampus','North\nCampus'
fracs = [880,220,1000]

explode=(0.05, 0.05, 0.05)
ppl=pie(fracs, explode=explode, labels=labels, shadow=True,autopct='%1.0f%%')

title('GSRAs by Campus')

<>--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl_toolkits

2010-08-10 Thread John Hunter
On Tue, Aug 10, 2010 at 12:15 PM, c.jeang
 wrote:
> Hello,
>
>  where can I find mpl_toolkits.
>  Because I install matplotlib with ipython and the command
>  yum install python-matplotlib
>  but as a result I have no axes3d.py file and when I tried the examples of
>  the matplotlib site I get the following message:
>  unknown projection 3d
> Apparently the toolkits mpl3d  is missing, which site can provide it?


Most likely your matplotlib version provided by yum is out of date.
Check your version with

  import matplotlib
  print matplotlib.__version__

You can download the latest tarball from sourceforge:

  http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/

See also the installing page:

  http://matplotlib.sourceforge.net/users/installing.html

particularly the part on "Installing from source" and below.  Perhaps
another yum user can advise you on the easiest ways to install the
build dependencies.

JDH

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl_toolkits

2010-08-10 Thread Benjamin Root
On Tue, Aug 10, 2010 at 12:15 PM, c.jeang <
christian.jeanguilla...@univ-angers.fr> wrote:

> Hello,
>
>  where can I find mpl_toolkits.
>  Because I install matplotlib with ipython and the command
>  yum install python-matplotlib
>  but as a result I have no axes3d.py file and when I tried the examples of
>  the matplotlib site I get the following message:
>  unknown projection 3d
> Apparently the toolkits mpl3d  is missing, which site can provide it?
>
>  Best regards
>
>  Jeanguillaume
>
>
>
Jeanguillaume,

Which version of matplotlib did you install?  The axes3d.py examples use a
very new feature that wasn't available in previous versions.  The current
examples can run with older versions of matplotlib by replacing the .gca()
or the .add_subplot() line with

ax = axes3d.Axes3D(fig)

However, you would not be able to do any 3d subplotting examples without the
latest version of matplotlib.

I hope that clears things up.

Ben Root
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mpl_toolkits

2010-08-10 Thread c.jeang
Hello,

  where can I find mpl_toolkits.
  Because I install matplotlib with ipython and the command
  yum install python-matplotlib
  but as a result I have no axes3d.py file and when I tried the examples of
  the matplotlib site I get the following message:
  unknown projection 3d
Apparently the toolkits mpl3d  is missing, which site can provide it?

  Best regards

  Jeanguillaume


-- 
   Christian JEANGUILLAUME

   Service de Medecine Nucleaire
   CHU Larrey
   49033 ANGERS FRANCE
   email: jeanguilla...@ieee.org
   Tel: 33 (0)2 41 35 34 12
   Fax: 33 (0)2 41 35 48 80

   LISA : Laboratoire d'Ing�ierie
   des Syst�es Automatis� (CNRS FRE)




--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread Christoph Gohlke


On 8/9/2010 3:09 PM, stetrick wrote:
>
> I am now getting a message that says:
>
> Fatal Python error: PyEval_RestoreThread: NULL tstate
>
> This application has requested the Runtime to terminate it in an unusual
> way.
>
> This is with matplotlib 1.0.0, but all versions are 64-bit (python, numpy,
> matplotlib).
>
> Is this something I can fix or ignore?
>
> Thanks!

Which version of numpy are you using? Assuming you are talking about 
matplotlib-1.0.0.win-amd64-py2.6.exe, you need 
numpy-1.4.1.win-amd64-py2.6.exe.

Christoph

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] missing label in colorbar

2010-08-10 Thread Oz Nahum
Hi Everyone,
I solved the issue using the following code:

CS=ax1.pcolormesh(x,y,dolomites,vmin=0, vmax=max(dolomite),cmap=cm.jet_r)
fig.colorbar(CS,ticks=[0,max(dolomite)],orientation='horizontal',aspect=40,format='%.1E')

ax1.set_title("dolomite [phi]")


It's not straight forward to understand, I hope my question will be a good
answer for others...

Cheers,

-- 
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen

---

Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion too
Imagine all the people
Living life in peace
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] missing label in colorbar

2010-08-10 Thread Oz Nahum
Hi Everyone,

I'm struggling to understand how to put the highest value on the ticks of a
colorbar.
My problem is that the highest value is simply not there, and it looks weird
... I would be happy to solve this issue.


See what my code produces,
http://yfrog.com/j9wrongip

And here is how I want it to be:
http://yfrog.com/2pcorrectsp

And of course here is my code:

from pylab import *
import numpy as N
from matplotlib.ticker import FuncFormatter, ScalarFormatter
a=ScalarFormatter(useOffset=True, useMathText=False)
a.set_scientific(True)
def read_array2(filename, dtypes,lineskip=3, separator='  '):
""" Read a file with an arbitrary number of columns.
The type of data in each column is arbitrary
It will be cast to the given dtype at runtime
This is an improved function that also cleanes the data
"""
startFromLine = lineskip
linesCounter = 1
cast = N.cast
# a nice syntax to initialize a list with determine size
data = [[] for dummy in xrange(len(dtypes))]
for line in open(filename, 'r'):
#print type(line)
if linesCounter>startFromLine:
fields = line.strip().split(separator)
#clean double numbers because of minus signs
for i, number in enumerate(fields):
temp=number.split(" ")
if len(temp)>1:
#pdb.set_trace()
del fields[i]
for j, hold in enumerate(temp):
#print j, hold
#pdb.set_trace()
fields.insert(i+j,hold)
#print len(fields)
del temp
#remove trailing calvin degrees in fields
for i, number in enumerate(fields):
if number[-4]=='-':
hold=number[:-4]
del fields[i]
fields.insert(i,hold)
#split fields and append to data
for i, number in enumerate(fields):
data[i].append(number)
   #data[i].append(number)
linesCounter=linesCounter+1
#cast data to a nice array
#pdb.set_trace()
for i in xrange(len(dtypes)):
data[i] = cast[dtypes[i]](data[i])
return N.rec.array(data, dtype=dtypes)

def readTechPlotHeader(fileName):
'''
This function reads a Techplot file header
format. It returns a list which can be used in
other functions, to visualize techplot file format
data using Python.
the function takes in a file name.
'''
fileObject=open(fileName, 'r')
fileObject.next()
header=fileObject.next()
#remove the expresions 'variables = ' and '\n'
header=header[12:-1]
headerCopy=header
#remove all commas, and convert to list
header=header.strip().split(',')
for x in xrange(len(header)):
header[x]=header[x].strip(' ')
header[x]=(header[x].strip("\""),'float32')
fileObject.close()
return header, headerCopy



gsp_descr2,headerCopy=readTechPlotHeader('dedo2d_0.gsv')
print  gsp_descr2

gsp_descr2=N.dtype(gsp_descr2)


data = read_array2('dedo2d_0.gsv', gsp_descr2)

x,y,dolomite,calcite=data["x"],data["y"],data["dolomite"],data["calcite"]

x=N.unique(x)
y=N.unique(y)

fig = plt.figure(1,figsize=(10, 6))

ax1 = fig.add_subplot(111)

x=N.unique(x)
y=N.unique(y)
print max(dolomite)
calcites=resize(calcite,(y.size,x.size))
dolomites=resize(dolomite,(y.size,x.size))


CS=ax1.pcolormesh(x,y,dolomites)

ax1.set_title("dolomite [phi]")

cbar = fig.colorbar(CS,ticks=[0, 0.0001, 0.00015, 0.0002])
cbar.ax.set_yticklabels(["lo", "med", "hi",'missing'])


grid(True, which='minor')


from matplotlib.ticker import MultipleLocator, FormatStrFormatter
minorLocator = MultipleLocator(1.0)

ax1.yaxis.set_minor_locator(minorLocator)
ax1.xaxis.set_minor_locator(minorLocator)
ax1.set_title("dolomite [phi]")
savefig('minerals1.png',papertype='a4',
orientation='landscape')#,bbox_inches='tight')

show()

The correct image is produced with:
import numpy as NP
from matplotlib import pyplot as PLT

A = NP.random.random_integers(0, 2, 100).reshape(10, 10)
print A
A=A/1.0
print A
fig = PLT.figure()
ax1 = fig.add_subplot(111)

cax = ax1.pcolormesh(A)#, interpolation="nearest")
# set the tickmarks *if* you want cutom (ie, arbitrary) tick labels:
cbar = fig.colorbar(cax, ticks=[0, 0.0001, 0.0002])
# note: 'ax' is not the same as the 'axis' instance created by calling
'add_subplot'
# the latter instance i bound to the variable 'ax1' to avoid confusing the
two
cbar.ax.set_yticklabels(["lo", "med", "hi"])
PLT.show()


Thanks in advance,

(If someone needs, I can directly send the data files, they are not to big,
but I wanted to spare them from the list)

-- 
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen

---

Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion too
Imagine all the people
Living life in peace
--

[Matplotlib-users] matplotlib v1.0.0 for mac: installation problem

2010-08-10 Thread Antonino Cucchiara
Hello,
I am running a MacOS Snow leopard and I recently istalled the python 2.6 
via Enthought.
I wanted to upgrade the matplotlib 1.0 but when I run the .mpkg the 
installation don't start because
it seems not recognizing the python 2.6 is installed (I do have now 2.6.6).

Any suggestions?

Thanks,
Nino

-- 

Antonino Cucchiara, PhD
Postdoctoral Scholar
Lawrence Berkeley National Lab
UC Berkeley
website: www.astro.psu.edu/~cucchiara/


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Fatal Python Error with 64 bit versions

2010-08-10 Thread stetrick

I am now getting a message that says:

Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual
way.

This is with matplotlib 1.0.0, but all versions are 64-bit (python, numpy,
matplotlib).

Is this something I can fix or ignore?

Thanks!
-- 
View this message in context: 
http://old.nabble.com/Fatal-Python-Error-with-64-bit-versions-tp29392620p29392620.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] GTk backend problem

2010-08-10 Thread Antonino Cucchiara
Hello,
I recently upgraded to Enthought python 2.6 an so I have now matplotlib 
0.99.3
My scripts now no longer seem to find the pyGTK since when I run them I 
got this message:

Traceback (most recent call last):
   File "./sed_plotb_v2.py", line 14, in 
 from pylab import *
   File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/pylab.py",
 
line 1, in 
 from matplotlib.pylab import *
   File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pylab.py",
 
line 247, in 
 from matplotlib.pyplot import *
   File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/pyplot.py",
 
line 78, in 
 new_figure_manager, draw_if_interactive, show = pylab_setup()
   File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/__init__.py",
 
line 25, in pylab_setup
 globals(),locals(),[backend_name])
   File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py",
 
line 10, in 
 from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, 
FigureCanvasGTK,\
   File 
"/Library/Frameworks/Python.framework/Versions/6.2/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
 
line 11, in 
 raise ImportError("Gtk* backend requires pygtk to be installed.")
ImportError: Gtk* backend requires pygtk to be installed.


is any way to help matplotlib to point the where pyGTK is or go around 
the problem with another backend?

Thanks,
Nino

-- 

Antonino Cucchiara, PhD
Postdoctoral Scholar
Lawrence Berkeley National Lab
UC Berkeley
website: www.astro.psu.edu/~cucchiara/


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] cygwin compile?

2010-08-10 Thread Adam Gustafson
Has anyone been able to successfully compile matplotlib in Cygwin?  I would
imagine so, so if you've been able to do it, please help!  Not quite sure
why I'm having so much trouble, but the errors from the build step are
below.

I think perhaps the python lists are empty (can't figure out what version of
the libraries I have).  Could someone please instruct me as to how to fix
this?  It'd be much appreciated.  Thanks.


$ python setup.py build
basedirlist is: ['/usr/local', '/usr']

BUILDING MATPLOTLIB
matplotlib: 1.0.0
python: 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)  [GCC
4.3.4 20090804 (release) 1]
  platform: cygwin

REQUIRED DEPENDENCIES
 numpy: 1.4.1
 freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of '/usr/include', '.', '/usr/include/freetype2',
* './freetype2'.

OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)
* Could not find 'libpng' headers in any of
* '/usr/include', '.'
Traceback (most recent call last):
  File "setup.py", line 162, in 
if check_for_tk() or (options['build_tkagg'] is True):
  File "/home/Adam/matplotlib-1.0.0/setupext.py", line 816, in check_for_tk
explanation = add_tk_flags(module)
  File "/home/Adam/matplotlib-1.0.0/setupext.py", line 1080, in add_tk_flags
result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)
  File "/home/Adam/matplotlib-1.0.0/setupext.py", line 938, in
parse_tcl_config
tk_lib = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split()[0][2:]
IndexError: list index out of range
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users