Re: [Matplotlib-users] ANN: matplotlib 1.3.0 released

2013-09-02 Thread Andrew Jaffe
Dear all,

On 06/08/2013 16:36, Andrew Jaffe wrote:

>> On 08/02/2013 06:53 AM, Andrew Jaffe wrote:
>>>
>>> On 01/08/2013 19:06, Michael Droettboom wrote:
>>>> On behalf of a veritable army of super coders, I'm pleased to announce the 
>>>> release of matplotlib 1.3.0.
>>> Two issues on OSX 10.8.4. I had been previously using the dmg installer.
>>> Lacking that, I tried easy-install and pip install, both of which gave me 
>>> the following problems:
>>>
>>> - I needed to set CC=clang
>>> - When attempting to load matplotlib, I got the following error:
>>>
>>> /Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/font_manager.py
>>>
>>> in ()
>>> ---> 53 from matplotlib import ft2font
>>>
>>> ImportError: 
>>> dlopen(/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so,
>>>
>>> 2): Symbol not found: _FT_Attach_File
>>>  Referenced from:
>>> /Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so
>>>
>>>  Expected in: flat namespace in
>>> /Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so
>>>
>>> This is a freetype problem, probably an incompatible version somewhere. 
>>> Ideas?

Some self-followup:

I was able to get the build to compile and install and pass most of the 
tests with the following change to the basedir_map dict (currently line 
147) in setupext.py:

 'darwin': ['/opt/X11', '/usr/local/', '/usr', '/opt/local'],

i.e. /opt/X11 in the front. I assume this accounts for my XQuartz X11 
install. I think both of those changes (i.e., usr->opt and moving to the 
front of the path) are necessary.

With this setup, I get lots of knownfails and a few real 
"ImageComparisonFailure" ones -- see below for the output. In all three 
cases, examining the images, it's clear that the system is not using 
styled fonts.

(I have no idea how these failures compare to my previous system with a 
dmg installation of matplotlib as I never ran the tests on it...)

Also, as mentioned previously, on one of my machines (but, strangely, 
not both) I also had to change CC and CXX to force use of clang (i.e., 
one worked with standard gcc).  The test failures are the same in both 
cases, although, for what it's worth, the on-screen font rendering does 
appear different on the two machines, no doubt owing to slightly 
different installation histories of the various non-apple installed unix 
and other libraries...

Yours,

Andrew


==
FAIL: matplotlib.tests.test_backend_pdf.test_use14corefonts.test
--
Traceback (most recent call last):
   File 
"/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/nose/case.py",
 
line 197, in runTest
 self.test(*self.arg)
   File 
"/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib-1.3.0-py2.7-macosx-10.6-intel.egg/matplotlib/testing/decorators.py",
 
line 40, in failer
 result = f(*args, **kwargs)
   File 
"/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib-1.3.0-py2.7-macosx-10.6-intel.egg/matplotlib/testing/decorators.py",
 
line 159, in do_test
 '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: 
/Volumes/Data/Users/jaffe/result_images/test_backend_pdf/pdf_use14corefonts_pdf.png
 
vs. 
/Volumes/Data/Users/jaffe/result_images/test_backend_pdf/pdf_use14corefonts-expected_pdf.png
 
(RMS 57.518)

==
FAIL: matplotlib.tests.test_text.test_font_styles.test
--
Traceback (most recent call last):
   File 
"/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/nose/case.py",
 
line 197, in runTest
 self.test(*self.arg)
   File 
"/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib-1.3.0-py2.7-macosx-10.6-intel.egg/matplotlib/testing/decorators.py",
 
line 40, in failer
 result = f(*args, **kwargs)
   File 
"/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib-1.3.0-py2.7-macosx-10.6-intel.egg/matplotlib/testing/decorators.py",
 
line 159, in do_test
 '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: 
/Volumes/Data/Users/jaffe/result_images/test_text/font_styles.png vs. 
/Volumes/Data/Users/jaffe/result_images/test_text/font_styles-expected.png 
(RMS 13.

Re: [Matplotlib-users] ANN: matplotlib 1.3.0 released

2013-08-06 Thread Andrew Jaffe

Hi Michael et al,

Attached...

A

p.s. I've posted this via the gmane newsgroup, but a version of was sent 
to the ML and is awaiting moderator approval...




On 02/08/2013 15:32, Michael Droettboom wrote:

Can you provide the output of the build?

On 08/02/2013 06:53 AM, Andrew Jaffe wrote:

Hi,


On 01/08/2013 19:06, Michael Droettboom wrote:

On behalf of a veritable army of super coders, I'm pleased to announce
the release of matplotlib 1.3.0.

Two issues on OSX 10.8.4. I had been previously using the dmg installer.
Lacking that, I tried easy-install and pip install, both of which gave
me the following problems:

- I needed to set CC=clang
- When attempting to load matplotlib, I got the following error:

/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/font_manager.py
in ()
51 import matplotlib
52 from matplotlib import afm
---> 53 from matplotlib import ft2font
54 from matplotlib import rcParams, get_cachedir
55 from matplotlib.cbook import is_string_like

ImportError:
dlopen(/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so,
2): Symbol not found: _FT_Attach_File
 Referenced from:
/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so
 Expected in: flat namespace
in
/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so


This is a freetype problem, probably an incompatible version somewhere.
Ideas?

Andrew


Processing matplotlib-1.3.0.tar.gz
Running matplotlib-1.3.0/setup.py -q bdist_egg --dist-dir 
/var/folders/6l/7gzvw1zs42sbhj7_hlrpykfmgv/T/easy_install-WViA6d/matplotlib-1.3.0/egg-dist-tmp-7ipBNC
Downloading 
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz
Extracting in 
/var/folders/6l/7gzvw1zs42sbhj7_hlrpykfmgv/T/easy_install-WViA6d/matplotlib-1.3.0/temp/tmpb6R8rP
Now working in 
/var/folders/6l/7gzvw1zs42sbhj7_hlrpykfmgv/T/easy_install-WViA6d/matplotlib-1.3.0/temp/tmpb6R8rP/distribute-0.6.28
Building a Distribute egg in 
/private/var/folders/6l/7gzvw1zs42sbhj7_hlrpykfmgv/T/easy_install-WViA6d/matplotlib-1.3.0
/private/var/folders/6l/7gzvw1zs42sbhj7_hlrpykfmgv/T/easy_install-WViA6d/matplotlib-1.3.0/distribute-0.6.28-py2.7.egg

Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
matplotlib: yes [1.3.0]
python: yes [2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013,
13:18:45)  [GCC 4.2.1 (Apple Inc. build 5666) (dot
3)]]
  platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
 numpy: yes [version 1.7.1]
  dateutil: yes [using dateutil version 2.1]
   tornado: yes [using tornado version 3.1]
 pyparsing: yes [using pyparsing version 2.0.1]
 pycxx: yes [Couldn't import.  Using local copy.]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
  freetype: yes [version 13.1.7]
   png: yes [pkg-config information for 'libpng' could not
be found. Using unknown version.]

OPTIONAL SUBPACKAGES
   sample_data: yes [installing]
  toolkits: yes [installing]
 tests: yes [using nose version 1.3.0]

OPTIONAL BACKEND EXTENSIONS
macosx: yes [darwin]
qt4agg: no  [PyQt4 not found]
   gtk3agg: no  [Requires pygobject to be installed.]
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267:
 UserWarning: Unknown distribution option: 'use_2to3'
  warnings.warn(msg)
In file included from src/ft2font.cpp:7:
In file included from 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15:
In file included from 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
 warning: "Using deprecated NumPy API, disable it by #defining 
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it by #defining 
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
 ^
1 warning generated.
In file included from src/ft2font.cpp:3:
In file included from src/ft2font.h:17:
In file included from /usr/local/include/freetype2/freetype/freetype.h:41:
/usr/local/include/freetype2/freetype/config/ftconfig.h:65:9: warning: 
&#

Re: [Matplotlib-users] ANN: matplotlib 1.3.0 released

2013-08-02 Thread Andrew Jaffe
Hi,


On 01/08/2013 19:06, Michael Droettboom wrote:
> On behalf of a veritable army of super coders, I'm pleased to announce
> the release of matplotlib 1.3.0.

Two issues on OSX 10.8.4. I had been previously using the dmg installer. 
Lacking that, I tried easy-install and pip install, both of which gave 
me the following problems:

  - I needed to set CC=clang
  - When attempting to load matplotlib, I got the following error:

/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/font_manager.py
 
in ()
  51 import matplotlib
  52 from matplotlib import afm
---> 53 from matplotlib import ft2font
  54 from matplotlib import rcParams, get_cachedir
  55 from matplotlib.cbook import is_string_like

ImportError: 
dlopen(/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so,
 
2): Symbol not found: _FT_Attach_File
   Referenced from: 
/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so
   Expected in: flat namespace
  in 
/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so


This is a freetype problem, probably an incompatible version somewhere. 
Ideas?

Andrew



--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Changing individual Tick labels

2013-03-13 Thread Andrew Jaffe
Dear all,

None of the obvious ways for changing ticklabels seem to work for the 
current version of Matplotlib (1.2.0 for me). At present, 
ax.yaxis.get_ticklabels().get_text() returns empty strings, as does 
ax.get_yticklabels(), and the equivalent set_* functions don't seem to 
have any effect.

So: help!

Yours,

Andrew


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi all,

I should point out that for my actual use case, Fernando  explained the 
right thing to do: start ipython *without* pylab, in which case 
use('Agg') [for example] is legal.

Andrew



Andrew Jaffe wrote:
> Hi,
> 
> Fernando Perez wrote:
>> On Fri, Jun 27, 2008 at 10:52 AM, Andrew Jaffe <[EMAIL PROTECTED]> wrote:
>>> Hi all,
>>>
>>> All the usual apologies if this is a FAQ, but I can't find it.
>>>
>>> Is there any way to change the backend interactively when using ipython?
>>>
>>> Best of all would a way to make changes in the middle of a session, but
>>> even being able to do it at the beginning without editing matplotlibrc
>>> would be great.
>> Mid-session you can't swtich *GUI* backends in ipython because the
>> entire GUI event loop can only be initialized once.  But at startup,
>> as of fairly recent versions you can do:
>>
>> ipython -pylab -Xthread
>>
>> for X in {g,w,q,q4}.  This will force a specific threading/gui backend
>> regardless of your mplrc settings.
> 
> Actually, I want to be able to choose a *non*-GUI backend 
> (speed/commmunication issues). (Or, as I said, just to turn off the GUI 
> output...)
> 
> Yours,
> 
> Andrew
> 
>> Cheers,
>>
>> f
>>
>> -
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
> 
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi John,

John Hunter wrote:>
>> In fact I deleted my whole svn directory and re-updated, but no change.
>> I'm pretty sure I've done this correctly...
> 
> You also need to delete previous installs of matplotlib.
> 
>> If it matters, I'm installing as an egg.
>> [python setupegg.py build bdist_egg;
>> easy_install dist/matplotlib-0.98.2-py2.5-macosx-10.3-fat.egg]
> 
> Well, I'm looking at the signature of matplotlib.use in the source::
> 
> and warn is a valid keyword as you can see.  When you
> 
 import matplotlib
 print matplotlib.__file__
> 
> are you getting the file you think you should?

Aha, the problem is in ipython, which shadows user()  with  its own 
version, not yet updated for the new signature in my version.

Andrew


> 
> If you have an old matplotlib installed somewhere on your system that
> used namespace packages, you may be getting a different matplotlib
> root than you think you ware.  That is why I suggested you remove all
> existing matplotlib installs anywhere on your path.
> 
> JDH
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi,

Fernando Perez wrote:
> On Fri, Jun 27, 2008 at 10:52 AM, Andrew Jaffe <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> All the usual apologies if this is a FAQ, but I can't find it.
>>
>> Is there any way to change the backend interactively when using ipython?
>>
>> Best of all would a way to make changes in the middle of a session, but
>> even being able to do it at the beginning without editing matplotlibrc
>> would be great.
> 
> Mid-session you can't swtich *GUI* backends in ipython because the
> entire GUI event loop can only be initialized once.  But at startup,
> as of fairly recent versions you can do:
> 
> ipython -pylab -Xthread
> 
> for X in {g,w,q,q4}.  This will force a specific threading/gui backend
> regardless of your mplrc settings.

Actually, I want to be able to choose a *non*-GUI backend 
(speed/commmunication issues). (Or, as I said, just to turn off the GUI 
output...)

Yours,

Andrew

> 
> Cheers,
> 
> f
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi John,

John Hunter wrote:
> On Fri, Jun 27, 2008 at 1:31 PM, Andrew Jaffe <[EMAIL PROTECTED]> wrote:
>> Hi-
>>
>> [OK, sorry for all the top-posting...]
>>
>> Anyway, if I move to  the current svn, I get
>>
...
> Try removing all the matplotlib installs, eggs, etc.   Something is
> getting confused, because warn is a valid keyword to use in svn.
> 
>> rm -rf /Users/jaffe/Library/Python/2.5/site-packages/matplotlib*
>> rm -rf build
>> clean reinstall of mpl

In fact I deleted my whole svn directory and re-updated, but no change. 
I'm pretty sure I've done this correctly...

If it matters, I'm installing as an egg.
[python setupegg.py build bdist_egg;
easy_install dist/matplotlib-0.98.2-py2.5-macosx-10.3-fat.egg]


In [1]: switch_backend('Agg')
---
TypeError Traceback (most recent call last)

/Users/jaffe/home/python/ in ()

/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.98.2-py2.5-macosx-10.3-fat.egg/matplotlib/pyplot.pyc
 
in switch_backend(newbackend)
  53 close('all')
  54 global new_figure_manager, draw_if_interactive, show
---> 55 matplotlib.use(newbackend, warn=False)
  56 reload(matplotlib.backends)
  57 from matplotlib.backends import pylab_setup

TypeError: use() got an unexpected keyword argument 'warn'

In [2]: matplotlib.__version__
Out[2]: '0.98.2'


> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi-

[OK, sorry for all the top-posting...]

Anyway, if I move to  the current svn, I get

In [1]: switch_backend('Agg')
---
TypeError Traceback (most recent call last)

/Users/jaffe/home/python/ in ()

/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.98.2-py2.5-macosx-10.3-fat.egg/matplotlib/pyplot.pyc
 
in switch_backend(newbackend)
  53 close('all')
  54 global new_figure_manager, draw_if_interactive, show
---> 55 matplotlib.use(newbackend, warn=False)
  56 reload(matplotlib.backends)
  57 from matplotlib.backends import pylab_setup

TypeError: use() got an unexpected keyword argument 'warn'


Andrew


Eric Firing wrote:
> Andrew,
> 
> The traceback shows that you are tripping over something that has been 
> changed since the version you are using, so it might work if you update 
> your mpl, preferably from svn.  I think the relevant change was made by 
> John quite recently, but I haven't looked it up.
> 
> Eric
> 
> Andrew Jaffe wrote:
>> Hi John,
>>
>> Thanks for the very fast response, but it doesn't quite work for my use 
>> case. I don't know if it's because my default is interactive, or ipython 
>> on general, or something else...
>>
>> n21:~/work/Pointing> ipython -pylab -nobanner
>>
>> In [1]: switch_backend('Agg')
>> /usr/local/src/python-2.5.2/lib/python2.5/site-packages/matplotlib/__init__.py:753:
>>  
>> UserWarning:  This call to matplotlib.use() has no effect
>> because the the backend has already been chosen;
>> matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
>> or matplotlib.backends is imported for the first time.
>>
>>warnings.warn(_use_error_msg)
>> ---
>> NameError Traceback (most recent call last)
>>
>> /home/jaffe/work/Pointing/ in ()
>>
>> /usr/local/src/python-2.5.2/lib/python2.5/site-packages/matplotlib/pyplot.py 
>> in switch_backend(newbackend)
>>   52 global new_figure_manager, draw_if_interactive, show
>>   53 matplotlib.use(newbackend)
>> ---> 54 reload(backends)
>>   55 from backends import new_figure_manager, 
>> draw_if_interactive, show
>>   56
>>
>> NameError: global name 'backends' is not defined
>>
>> In [2]:
>>
>>
>>
>>
>> John Hunter wrote:
>>> On Fri, Jun 27, 2008 at 12:52 PM, Andrew Jaffe <[EMAIL PROTECTED]> wrote:
>>>> Hi all,
>>>>
>>>> All the usual apologies if this is a FAQ, but I can't find it.
>>>>
>>>> Is there any way to change the backend interactively when using ipython?
>>> Take a look at the pylab/pyplot switch_backends function
>>>
>>>
>>> switch_backend(newbackend)
>>> Switch the default backend to newbackend.  This feature is
>>> **experimental**, and is only expected to work switching to an
>>> image backend.  Eg, if you have a bunch of PostScript scripts that
>>> you want to run from an interactive ipython session, you may want
>>> to switch to the PS backend before running them to avoid having a
>>> bunch of GUI windows popup.  If you try to interactively switch
>>> from one GUI backend to another, you will explode.
>>>
>>> Calling this command will close all open windows.
>>>
>>> Eg:
>>>
>>>>>> switch_backends('Agg')
>>> JDH
>>>
>>> -
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>
>> -
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi John,

Thanks for the very fast response, but it doesn't quite work for my use 
case. I don't know if it's because my default is interactive, or ipython 
on general, or something else...

n21:~/work/Pointing> ipython -pylab -nobanner

In [1]: switch_backend('Agg')
/usr/local/src/python-2.5.2/lib/python2.5/site-packages/matplotlib/__init__.py:753:
 
UserWarning:  This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

   warnings.warn(_use_error_msg)
---
NameError Traceback (most recent call last)

/home/jaffe/work/Pointing/ in ()

/usr/local/src/python-2.5.2/lib/python2.5/site-packages/matplotlib/pyplot.py 
in switch_backend(newbackend)
  52 global new_figure_manager, draw_if_interactive, show
  53 matplotlib.use(newbackend)
---> 54 reload(backends)
  55 from backends import new_figure_manager, 
draw_if_interactive, show
  56

NameError: global name 'backends' is not defined

In [2]:




John Hunter wrote:
> On Fri, Jun 27, 2008 at 12:52 PM, Andrew Jaffe <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> All the usual apologies if this is a FAQ, but I can't find it.
>>
>> Is there any way to change the backend interactively when using ipython?
> 
> Take a look at the pylab/pyplot switch_backends function
> 
> 
> switch_backend(newbackend)
> Switch the default backend to newbackend.  This feature is
> **experimental**, and is only expected to work switching to an
> image backend.  Eg, if you have a bunch of PostScript scripts that
> you want to run from an interactive ipython session, you may want
> to switch to the PS backend before running them to avoid having a
> bunch of GUI windows popup.  If you try to interactively switch
> from one GUI backend to another, you will explode.
> 
> Calling this command will close all open windows.
> 
> Eg:
> 
>>>> switch_backends('Agg')
> 
> JDH
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Changing backend with ipython

2008-06-27 Thread Andrew Jaffe
Hi all,

All the usual apologies if this is a FAQ, but I can't find it.

Is there any way to change the backend interactively when using ipython?

Best of all would a way to make changes in the middle of a session, but 
even being able to do it at the beginning without editing matplotlibrc 
would be great.

For what I actually need to do, I don't really need to change the 
backend, but what I'd like to be able to do is just interactively stop 
all interactive (X11) output for my chosen backend   --  I'm  working 
over the network and it's very slow, but I want my savefig commandds to 
produce something.

Without ipython, I know you can do -dAgg (for example) but I don't see 
how /if that works with ipython.

Andrew


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Compiler error on OS X 10.5.2 in agg

2008-03-21 Thread Andrew Jaffe


Hi All,

Zachary Pincus wrote:

>> Can you tell me where you specified the -Os option to gcc to escape  
>> the problem?
> 
> So the compile that command that failed is printed right above the  
> error message it generated. (The long line that starts  with  
> 'gcc' ...). I just copied this command, edited the -O3 to an -Os, and  
> pasted that command-line back into the terminal. Total low-tech hack,  
> as I didn't want to much with the setup.py file to fix compile flags  
> on a per-file basis.
> 
> After that file is compiled manually, you can re-run 'python setup.py  
> build', and it will start up at the next step after the error.
> 
> I got the same error in another step, which was a bit trickier to fix,  
> because for some reason, src/_image.cpp gets copied to src/image.cpp  
> on a temporary basis, and then compiled. (I presume the file isn't  
> also modified?) But after the compile errors out, the copy is deleted,  
> so just pasting in the offending gcc command doesn't work. So I had to  
> manually copy src/_image.cpp to scr/image.cpp, and then paste in the  
> modified gcc command.
> 
> Ugh! I'd really love some help reducing this to a test case that I can  
> send to Apple.

I've got the same error(s) in the same situation (10.5.2). I haven't 
seen it any other context nor have had any success in reducing to a test 
case, alas. Could this have to do with picking up libraries (from fink 
or elsewhere) and/or different compiler versions? I've got XCode 3 and 
gcc 4.0. (I've actually got the apple 4.2 preview release as well but 
that craps out even earlier, I assume due to library version mismatches...)

Andrew


> 
> Zach
> 
> 
> On Mar 13, 2008, at 12:16 PM, Stephane Raynaud wrote:
> 
>> Hi,
>>
>> I got the same problem.
>> Can you tell me where you specified the -Os option to gcc to escape  
>> the problem?
>>
>>
>> On Mon, Mar 10, 2008 at 4:35 AM, Zachary Pincus <[EMAIL PROTECTED] 
>>> wrote:
>>> Hello,
>>>
>>> I just tried to compile the SVN head of matplotlib (r4994) from  
>>> source
>>> on OS X 10.5.2 (with source builds of python 2.5.2 and the SVN head  
>>> of
>>> numpy), and ran into an "internal compiler error" in the agg code.
>>> (pkgconfig 0.23 and wxPython 2.8.7.1 also present and accounted for.)
>>>
>>> Here's the compile line and error:
 building 'matplotlib.backends._backend_agg' extension
 gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno- 
 fused-
 madd -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-
 prototypes -I/Library/Frameworks/Python.framework/Versions/2.5/lib/
 python2.5/site-packages/numpy/core/include -I/usr/X11/include/
 libpng12 -I/usr/local/include -I/usr/include -I/usr/X11R6/include -
 I. -I/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
 python2.5/
 site-packages/numpy/core/include -Isrc -Iagg24/include -I. -I/usr/
 X11/include/freetype2 -I/usr/X11/include -I/usr/local/include -I/ 
 usr/
 include -I/usr/X11R6/include -I. -I/Library/Frameworks/
 Python.framework/Versions/2.5/include/python2.5 -c src/_image.cpp -o
 build/temp.macosx-10.4-i386-2.5/src/_image.o
 cc1plus: warning: command line option "-Wstrict-prototypes" is valid
 for C/ObjC but not for C++
 src/_image.cpp: In member function 'Py::Object
 _image_module::from_images(const Py::Tuple&)':
 src/_image.cpp:842: error: insn does not satisfy its constraints:
 (insn 2573 1070 2574 126 agg24/include/agg_color_rgba.h:268 (set
 (mem:QI (plus:SI (reg/f:SI 6 bp)
   (const_int -280 [0xfee8])) [0 SR.2969+0
 S1 A8])
   (reg:QI 5 di)) 56 {*movqi_1} (nil)
   (nil))
 src/_image.cpp:842: internal compiler error: in
 reload_cse_simplify_operands, at postreload.c:391
 Please submit a full bug report, with preprocessed source if
 appropriate.
 See http://developer.apple.com/bugreporter> for instructions.
>>> This seems to be an agg and OS X error; it's cropped up here:
>>> http://trac.osgeo.org/mapserver/ticket/2368
>>> and John Hunter reported it on the agg list here:
>>> http://article.gmane.org/gmane.comp.graphics.agg/3963
>>>
>>> Unfortunately, the error appears to either not have been fixed by the
>>> 10.5.1 update, as suggested in the email thread cited above, or the
>>> error re-appeared in 10.5.2.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Problems building matplotlib on OSX Leopard

2007-12-06 Thread Andrew Jaffe
Hi All,

I've been compiling svn versions of matplotlib on OSX for quite a while 
with no (or few...) problems.

On upgrading to leopard on my mac pro, I've run into the
error messages below.

External libs are from fink. There seems to be some problem with 
attempts to build a universal binary.

Any ideas?

Andrew




   << ...removed... >>

g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g 
-bundle -undefined dynamic_lookup 
build/temp.macosx-10.3-fat-2.5/src/ft2font.o 
build/temp.macosx-10.3-fat-2.5/src/mplutils.o 
build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o 
build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o 
build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o 
build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/X11/lib 
-L/sw/lib/freetype2/lib -L/sw/lib/freetype219/lib -L/usr/local/lib 
-L/usr/lib -L/sw/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o 
build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so 
-Wl,-framework,CoreServices,-framework,ApplicationServices
ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for 
architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: 
/var/folders/zy/zyE6hlZdE-S3suWR4ie8RE+++TI/-Tmp-//ccWqjNip.out (No such 
file or directory)
ld: in /sw/lib/libJPEG.dylib, file is not of required architecture for 
architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: 
/var/folders/zy/zyE6hlZdE-S3suWR4ie8RE+++TI/-Tmp-//ccWqjNip.out (No such 
file or directory)
error: Command "g++ -arch i386 -arch ppc -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup 
build/temp.macosx-10.3-fat-2.5/src/ft2font.o 
build/temp.macosx-10.3-fat-2.5/src/mplutils.o 
build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o 
build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o 
build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o 
build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/X11/lib 
-L/sw/lib/freetype2/lib -L/sw/lib/freetype219/lib -L/usr/local/lib 
-L/usr/lib -L/sw/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o 
build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so 
-Wl,-framework,CoreServices,-framework,ApplicationServices" failed with 
exit status 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] matplotlib svn bug: "Found an unknown keyword in AFM header..."?

2007-08-21 Thread Andrew Jaffe
Hi-

I admit I don't understand the problems or the speccific code involved, 
but I *think* it may be that the OSX-specific code isn't restricted to 
afm files. Hence I wonder if the following is a fix:

% svn diff lib/matplotlib/font_manager.py
Index: lib/matplotlib/font_manager.py
===
--- lib/matplotlib/font_manager.py  (revision 3727)
+++ lib/matplotlib/font_manager.py  (working copy)
@@ -229,7 +229,7 @@
  fontpaths = x11FontDirectory()
  # check for OS X & load its fonts if present
  if sys.platform == 'darwin':
-for f in OSXInstalledFonts():
+for f in OSXInstalledFonts(fontext=fontext):
  fontfiles[f] = 1

  for f in get_fontconfig_fonts(fontext):

It would be great if someone could confirm this and submit to svn.

Andrew


Jouni K. Seppänen wrote:
> Eric Firing <[EMAIL PROTECTED]> writes:
> 
>> I think that the problem is occurring in the last line.  This remains to 
>> be verified.  It looks like *.afm files are being found, but when 
>> createFontDict tries to parse them it doesn't find what it expects.
> 
> The cause of the problem is a combination of two things: first, for 
> some reason the afmfiles list contains non-AFM files, which is probably 
> a bug; second, the AFM parser doesn't quit when faced with a malformed
> file. I committed a sanity check (diff attached) in afm.py to fix the 
> second problem, but the first one remains.
> 
> 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib svn bug: "Found an unknown keyword in AFM header..."?

2007-08-21 Thread Andrew Jaffe
Michael Droettboom wrote:
> Andrew,
> 
> I believe this bug was recently discussed on matplotlib-devel and is 
> likely related to recent changes in the font manager cache.
> 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg01531.html
> 
> I believe it's being looked into, but I haven't seen a resolution 
> (unless I missed it).

Ah, sorry, this is indeed the same problem.

Adding

pdf.use14corefonts :  True

to matplotlibrc does fix it, FWIW.

Andrew




> Cheers,
> Mike
> 
> Andrew Jaffe wrote:
>> Hi All,
>>
>> I've got Intel OSX 10.4.10 with SVN versions of numpy, scipy and 
>> matplotlib.
>>
>> The latest matplotlib seems to fail on "import pylab" or "ipython 
>> -pylab" with very many lines of the form
>>
>> "Found an unknown keyword in AFM header (was"
>> followed either by a legit character or lots of junk.
>>
>> For what it's worth, I tend to install eggs rather than simple setup.py 
>> install; moving back to r3421 which I had prevviously seems to work fine.
>>
>> Any ideas?
>>
>> Yours,
>>
>> Andrew
>>
>>
>> -
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] matplotlib svn bug: "Found an unknown keyword in AFM header..."?

2007-08-21 Thread Andrew Jaffe
Hi All,

I've got Intel OSX 10.4.10 with SVN versions of numpy, scipy and 
matplotlib.

The latest matplotlib seems to fail on "import pylab" or "ipython 
-pylab" with very many lines of the form

"Found an unknown keyword in AFM header (was"
followed either by a legit character or lots of junk.

For what it's worth, I tend to install eggs rather than simple setup.py 
install; moving back to r3421 which I had prevviously seems to work fine.

Any ideas?

Yours,

Andrew


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compile error with python2.5

2006-09-20 Thread Andrew Jaffe
Hi all,

As discussed by David Cooke, above, I think there are still some other 
issues, at least under OSX: several files need to be patch to convert 
int to the new Py_ssize_t, at least in cxx_extensions.cxx and _image.cpp

Will these be changed?

Andrew



Achim Gaedke wrote:
> Hi there!
> 
> I built numpy-1.0b5 and pygtk with python2.5 on Sunday. It worked, but I
> use numarray as standard numerix extension.
> There was a bugfix for numpy-1.0b5 that is already contained in their
> repository version.
> 
> Yours, Achim
> 
> Charlie Moad wrote:
>> It builds now.  We still have to wait on a useable numpy for python2.5
>> and pygtk for windows/py2.5.  All the other components are there or we
>> can build.
> 


-
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