Re: [Matplotlib-users] bug report

2015-09-17 Thread Christoph Gohlke
I can reproduce the AttributeError on all Python versions and the crash 
(in Python's _tkinter.pyd extension) on Python 3.4.

As a workaround you might try to upgrade to matplotlib 1.5, which seems 
to work for me.

Christoph


On 9/17/2015 6:46 AM, Bobby Wilkins wrote:
> Thank you all.
>
> I am using Python 3.4.3.
>
> I meant to include a pip list:
>
> Assimulo (2.8)
> decorator (4.0.2)
> gmpy2 (2.0.7)
> ipykernel (4.0.3)
> ipython (4.0.0)
> ipython-genutils (0.1.0)
> ipywidgets (4.0.2)
> Jinja2 (2.8)
> jsonschema (2.5.1)
> jupyter-client (4.0.0)
> jupyter-core (4.0.4)
> MarkupSafe (0.23)
> matplotlib (1.4.3)
> mistune (0.7.1)
> nbconvert (4.0.0)
> nbformat (4.0.0)
> nose (1.3.7)
> notebook (4.0.4)
> numpy (1.9.2)
> pandas (0.16.2)
> path.py (8.1)
> pickleshare (0.5)
> pip (7.1.2)
> Pygments (2.0.2)
> pyparsing (2.0.3)
> pyreadline (2.0)
> python-dateutil (2.4.2)
> pytz (2015.4)
> pyzmq (14.7.0)
> requests (2.7.0)
> scipy (0.16.0)
> setuptools (18.2)
> simplegeneric (0.8.1)
> six (1.9.0)
> sympy (0.7.6)
> testpath (0.2)
> tornado (4.2.1)
> traitlets (4.0.0)
>
> So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
> problem?  Let me try to install Python 2.7 tonight and see what that does.
>
> On Wed, Sep 16, 2015 at 8:39 AM, Sterling Smith  > wrote:
>
> Works fine for
>
> {{{
>   : python
> Python 2.7.10 (default, Sep 15 2015, 11:26:42)
> [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> /Users/smithsp/.pyhistory
> >>> import matplotlib
> >>> matplotlib.__version__
> '1.4.3'
> >>> import numpy
> >>> numpy.__version__
> '1.9.2'
> >>> matplotlib.get_backend()
> u’MacOSX'
> }}}
>
> All are obtained through MacPorts on OSX 10.9.5.
>
> -Sterling
>
>
>
> On Sep 16, 2015, at 6:50AM, Benjamin Root  > wrote:
>
> > Btw, I can't reproduce the problem using matplotlib master, numpy 
> master and linux. I know it isn't at all similar to your setup, but it is a 
> data point.
> >
> > On Wed, Sep 16, 2015 at 9:43 AM, Benjamin Root  > wrote:
> > What version of numpy do you have installed?
> >
> > On Wed, Sep 16, 2015 at 5:35 AM, Bobby Wilkins  > wrote:
> > OS: Windows 8.1 Pro
> >
> > matplotlib version: 1.4.3
> >
> > where obtained:http://www.lfd.uci.edu/~gohlke/pythonlibs/
> 
> >
> > customizations: none
> >
> > Sample Program: attached py file; this is a Physics homework problem; I 
> have the answers I need, but would like to fix the errors to be able to label 
> all lines.
> >
> > Debug output in attached output.txt file
> >
> > If you uncomment line 180, the error is reported as if it came from 
> that line even though there is no float64 on that line (savefig).  If 
> commented, it does not report a line from my .py file...
> >
> > If you make line 170 read as follows, the error goes away:
> >
> > if (maxTerm<32):
> >
> > This suggests to me that the additional labels for the 32, 64, 128, and 
> 154 term runs is what is triggering the bug, but I cannot figure out what it 
> is.
> >
> > Also, separate note, just about any time I make figures, when closing 
> the last figure I get a python.exe app crash and this message:
> >
> > alloc: invalid block: 044E7680: 0 d
> >
> >
> > Thank you for any help,
> > Bobby
> >
> >
> > 
> --
> > Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> > Get real-time metrics from all of your servers, apps and tools
> > in one place.
> > SourceForge users - Click here to start your Free Trial of Datadog now!
> >http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
> > ___
> > Matplotlib-users mailing list
> >Matplotlib-users@lists.sourceforge.net
> 
> >https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
> >
> > 
> --
> > Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
> > Get real-time metrics from all of your servers, apps and tools
> > in one place.
> > SourceForge users - Click here to start your Free Trial of Datadog now!
> 
> >http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140___
> > Matplotlib-users mailing list
> >Matplotlib-users@lists.sourceforge.net
> 
> >https://lists.sourceforge.net/l

Re: [Matplotlib-users] Matplotlib Installation error

2014-12-18 Thread Christoph Gohlke
Pip and setuptools were added in 2.7.9. From the release announcement:

- The "ensurepip" module has been backported to Python 2.7

Christoph


On 12/18/2014 6:37 AM, Benjamin Root wrote:
> Christoph,
>
> When did pip.exe start being packaged with python2.7? I thought that was
> only in one of the py3k releases?
>
> Ben Root
>
> On Thu, Dec 18, 2014 at 3:17 AM, Christoph Gohlke  <mailto:cgoh...@uci.edu>> wrote:
>
> On 12/17/2014 11:33 PM, MIS_91 wrote:
> > Hi folks,
> >
> > Sorry to bother you with an installationg problem. But I really want to 
> get
> > matplotlib.
> > I have Windows 8 (64) and python 2.7, I've succesfully fully installed
> > pygame and numpy. When I start the installation of matplotlib (I've 
> tried
> > 1.4.0 and 1.4.2) I get an error message telling that python 2.7 were not
> > found in the registry. I've tried to save it in the same registry as 
> python
> > 2.7 befor executing the installation but I still recieve the same error
> > message.
> >
> > I'm greatfull for all help!
> >
> > / M.S
> >
>
> Make sure to use matplotlib-1.4.2.win32-py2.7.exe if you have installed
> python-2.7.x.msi (32 bit).
>
> Matplotlib requires extra Python packages. See
> <http://matplotlib.org/users/installing.html#windows>.
>
> In case you have Python 2.7.9 and numpy installed you can easily install
> matplotlib and all required packages with pip:
>
> C:\Python27\Scripts\pip.exe install matplotlib
>
>
> Christoph
>
> 
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration &
> more
> Get technology previously reserved for billion-dollar corporations, FREE
> 
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> <mailto:Matplotlib-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib Installation error

2014-12-18 Thread Christoph Gohlke
On 12/17/2014 11:33 PM, MIS_91 wrote:
> Hi folks,
>
> Sorry to bother you with an installationg problem. But I really want to get
> matplotlib.
> I have Windows 8 (64) and python 2.7, I've succesfully fully installed
> pygame and numpy. When I start the installation of matplotlib (I've tried
> 1.4.0 and 1.4.2) I get an error message telling that python 2.7 were not
> found in the registry. I've tried to save it in the same registry as python
> 2.7 befor executing the installation but I still recieve the same error
> message.
>
> I'm greatfull for all help!
>
> / M.S
>

Make sure to use matplotlib-1.4.2.win32-py2.7.exe if you have installed 
python-2.7.x.msi (32 bit).

Matplotlib requires extra Python packages. See 
.

In case you have Python 2.7.9 and numpy installed you can easily install 
matplotlib and all required packages with pip:

   C:\Python27\Scripts\pip.exe install matplotlib


Christoph

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can not display 3D plot !

2014-11-18 Thread Christoph Gohlke
According to your Windows log, the faulting module is _dotblas.pyd, 
which is part of numpy. Does `import numpy;numpy.test()` pass?

Christoph


On 11/18/2014 10:39 AM, Geoffrey Mégardon wrote:
> Everything came pre-built through the normal anaconda downloading page! :D
>
> For the DLL, it seems at its normal place:
> http://ns1.faultwire.net/file_detail/msvcr90.dll*92305.html#
>
> I think there is no solution we can track for now :/ :/ :/
>
> On 18 November 2014 12:16, Benjamin Root  > wrote:
>
> That's too bad. Faulthandler is limited on windows systems, but I
> was hoping it would give us something.
>
> Anyway, I looked at the error log again (I didn't see anything
> relevant the first time), and I noticed the following:
>
> 
> LoadedModule[5]=C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.8387_none_08e793bfa83a89b5\MSVCR90.dll
>
> Two things the caught my eye about this line. First of all, just
> about everything else appears to be 32-bit, but this might be 64-bit
> (maybe, I am guessing). Also, (and I am a long time removed from
> development work on Windows), I don't recall this directory for
> stock installs. Did you build any part of your anaconda stack
> yourself? Or did everything come pre-built through the normal
> anaconda channels?
>
> Ben Root
>
>
> On Tue, Nov 18, 2014 at 12:04 PM, Geoffrey Mégardon
> mailto:geoffrey.megar...@gmail.com>>
> wrote:
>
> I tried that:
>
> from mpl_toolkits.mplot3d import axes3d
> import matplotlib
> import matplotlib.pyplot as plt
> import faulthandler
> import os
>
> print os.getcwd()
> #with open("./error-log.txt", "wb") as f:
> #faulthandler.enable(f)
> faulthandler.enable()
>
> fig = plt.figure()
> ax = fig.add_subplot(111, projection='3d')
> X, Y, Z = axes3d.get_test_data(0.05)
> cset = ax.contour(X, Y, Z)
> ax.clabel(cset, fontsize=9, inline=1)
>
> plt.show()
>
> And I don't get any error, even if it still crashes :)
>
> Do you have an idea to make the faulthandler able to catch the
> errors?
> Did you received the Windows error log/traceback I sent you? I
> think it is the most detailed traceback we have for now.
>
>
> On 15 November 2014 09:50, Benjamin Root  > wrote:
>
> I was waiting for the results from using faulthandler. It is
> very easy to use, and I think it will be very illuminating.
>
> Ben Root
>
> On Sat, Nov 15, 2014 at 8:50 AM, Geoffrey Mégardon
>  > wrote:
>
> So, are there new ideas about this problem?
> My case seems quite rare :/
>
> On 13 November 2014 17:46, Geoffrey Mégardon
>  > wrote:
>
> sorry to double post,
>
> I don't know if it is linked but Pycharms complains
> about Skeleton Generation Problems, among the errors
> there is one which has matplotlib inside:
>
> *Failed modules*
> Python 2.7.8 (C:\Anaconda\python.exe)
> dde
> matplotlib._cntr
> win32ui
> win32uiole
> Generation of skeletons for the modules above will
> be tried again when the modules are updated or a new
> version of generator is available
>
> On 13 November 2014 17:35, Geoffrey Mégardon
>  > wrote:
>
> I will have a look to faulthandler but I never
> used it before.
>
> To use savefig() leads to the same crash.
>
> The two first examples on this pages work fine:
> 
> http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html
>
> The first example from:
> http://matplotlib.org/basemap/users/examples.html
> send back an error telling I do not have a
> module Basemap:
> Traceback (most recent call last):
>File "C:\Users\User\Google
> Drive\Work\tryAxesGrid.py", line 1, in 
>  from mpl_toolkits.basemap import Basemap
> ImportError: No module named basemap
>
> Here the previously cited traceback provided by
> windows 8.1:
>
> Version=1
> Even

Re: [Matplotlib-users] 1.4 install on Windows 8.1 with pip gives bad hash

2014-08-27 Thread Christoph Gohlke
Thank you. Works for me as expected: `pip install matplotlib` installed 
matplotlib, pyparsing, python-dateutil, and six. Since numpy is not 
(yet) available as wheels on PyPI it needs to be installed before by 
other means or built from source by pip.

Christoph


On 8/27/2014 10:55 AM, Thomas Caswell wrote:
> Didn't know you could do that
>
> I have (I think) uploaded all of the wheels we have to pypi.  I don't
> have a windows or mac machine to test on, can anyone provide feed back
> if it worked as intended?
>
> Tom
>
> On Wed, Aug 27, 2014 at 12:20 PM, Christoph Gohlke  wrote:
>> Somewhat related to this: are the Windows and Mac wheels going to be
>> uploaded to PyPI so pip doesn't try to install/build from the source
>> distribution by default?
>>
>> Christoph
>>
>> On 8/27/2014 5:33 AM, Thomas Caswell wrote:
>>> Is the hash it reports reproducible?  My first guess at what is going
>>> on here is that the hash is doing it's job correctly and reporting
>>> that your file became corupted  during download.  Try again at it
>>> should work.
>>>
>>> Tom
>>>
>>> On Wed, Aug 27, 2014 at 5:55 AM, Werner  wrote:
>>>> Just FYI,
>>>>
>>>> I tried to install with pip but got the following error.
>>>>
>>>> C:\Python34\Scripts>pip install -U matplotlib
>>>> Downloading/unpacking matplotlib
>>>>  Hash of the package
>>>> https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.0.tar.gz#md5=1daf7f2123d94745f
>>>> eac1a30b210940c (from https://pypi.python.org/simple/matplotlib/)
>>>> (b3547692387bce383d7a001a8e03ce87) doesn't match the e
>>>> xpected hash 1daf7f2123d94745feac1a30b210940c!
>>>> Cleaning up...
>>>>
>>>> Werner
>>>>
>>>> P.S.
>>>> I installed using the .exe installer without problems.
>>>>
>>>> --
>>>> Slashdot TV.
>>>> Video for Nerds.  Stuff that matters.
>>>> http://tv.slashdot.org/
>>>> ___
>>>> Matplotlib-users mailing list
>>>> Matplotlib-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>>
>>
>> --
>> Slashdot TV.
>> Video for Nerds.  Stuff that matters.
>> http://tv.slashdot.org/
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.4 install on Windows 8.1 with pip gives bad hash

2014-08-27 Thread Christoph Gohlke
Somewhat related to this: are the Windows and Mac wheels going to be 
uploaded to PyPI so pip doesn't try to install/build from the source 
distribution by default?

Christoph

On 8/27/2014 5:33 AM, Thomas Caswell wrote:
> Is the hash it reports reproducible?  My first guess at what is going
> on here is that the hash is doing it's job correctly and reporting
> that your file became corupted  during download.  Try again at it
> should work.
>
> Tom
>
> On Wed, Aug 27, 2014 at 5:55 AM, Werner  wrote:
>> Just FYI,
>>
>> I tried to install with pip but got the following error.
>>
>> C:\Python34\Scripts>pip install -U matplotlib
>> Downloading/unpacking matplotlib
>> Hash of the package
>> https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.0.tar.gz#md5=1daf7f2123d94745f
>> eac1a30b210940c (from https://pypi.python.org/simple/matplotlib/)
>> (b3547692387bce383d7a001a8e03ce87) doesn't match the e
>> xpected hash 1daf7f2123d94745feac1a30b210940c!
>> Cleaning up...
>>
>> Werner
>>
>> P.S.
>> I installed using the .exe installer without problems.
>>
>> --
>> Slashdot TV.
>> Video for Nerds.  Stuff that matters.
>> http://tv.slashdot.org/
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ImportError: DLL load failed: The specified module could not be found (related to png16.dll)

2014-07-02 Thread Christoph Gohlke
On 7/2/2014 11:46 AM, Alan Ezust wrote:
> I am still trying to build matplotlib on windows. The instructions on
> 1717 were very helpful, I managed to build the
> prerequisites manually based on the instructions in the dep_build.cmd
> that came from matplotlib-winbuild project.
>
> But when I try to run it I get this error message:
>
 import matplotlib.pyplot as plt
> Traceback (most recent call last):
>File "", line 1, in 
>File
> "C:\Python33\lib\site-packages\matplotlib-1.4.x-py3.3-win32.egg\matplotlib\pyplot.py",
> line 27, in 
>  import matplotlib.colorbar
>File
> "C:\Python33\lib\site-packages\matplotlib-1.4.x-py3.3-win32.egg\matplotlib\colorbar.py",
> line 34, in 
>  import matplotlib.collections as collections
>File
> "C:\Python33\lib\site-packages\matplotlib-1.4.x-py3.3-win32.egg\matplotlib\collections.py",
> line 27, in 
>  import matplotlib.backend_bases as backend_bases
>File
> "C:\Python33\lib\site-packages\matplotlib-1.4.x-py3.3-win32.egg\matplotlib\backend_bases.py",
> line 56, in 
>  import matplotlib.textpath as textpath
>File
> "C:\Python33\lib\site-packages\matplotlib-1.4.x-py3.3-win32.egg\matplotlib\textpath.py",
> line 22, in 
>  from matplotlib.mathtext import MathTextParser
>File
> "C:\Python33\lib\site-packages\matplotlib-1.4.x-py3.3-win32.egg\matplotlib\mathtext.py",
> line 63, in 
>  import matplotlib._png as _png
> ImportError: DLL load failed: The specified module could not be found.
>
> I am guessing it doesn't like the filename of the png16.dll file, but
> how do I know what filename it is looking for?
> I noticed I had to rename a bunch of .lib files in order to build
> matplotlib from source, but that was OK since the error message
> said what file it was looking for. How do I determine the correct
> filename to use from here?
>

It's better to use the static libraries for libpng, zlib, and freetype 
(unless you have reasons not to). Rename the .lib files as in the build 
script:





Christoph

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Windows 7 builds - freetype2 extension FTBFS

2014-06-25 Thread Christoph Gohlke
On 6/25/2014 6:22 PM, Alan Ezust wrote:
> I apologize, the error message I posted earlier was for a branch which
> was not even merged into the current git origin/master.
>
> I just switched back to the real "origin/master" branch... Now I get a
> completely different error message.
> Windows 7, with ms visual C++ 2010 SP1 x86
>
> python setup.py install
> 
> Edit setup.cfg to change the build options
>
> BUILDING MATPLOTLIB
>  matplotlib: yes [1.4.x]
>  python: yes [3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014,
>  10:37:12) [MSC v.1600 32 bit (Intel)]]
>platform: yes [win32]
>
> REQUIRED DEPENDENCIES AND EXTENSIONS
>   numpy: yes [version 1.8.1]
> six: yes [using six version 1.6.1]
>dateutil: yes [using dateutil version 2.2]
> tornado: yes [using tornado version 3.2.1]
>   pyparsing: yes [using pyparsing version 2.0.2]
>   pycxx: yes [Official versions of PyCXX are not compatible
>  with Python 3.x.  Using local copy]
>  libagg: yes [pkg-config information for 'libagg' could not
>  be found. Using local copy.]
>freetype: yes [Unknown version]
> png: yes [pkg-config information for 'libpng' could not
>  be found. Using unknown version.]
>   qhull: yes [pkg-config information for 'qhull' could
> not be
>  found. Using local copy.]
>
> OPTIONAL SUBPACKAGES
> sample_data: yes [installing]
>toolkits: yes [installing]
>   tests: yes [using nose version 1.3.3 / using
> unittest.mock]
>
> OPTIONAL BACKEND EXTENSIONS
>  macosx: no  [Mac OS-X only]
>  qt4agg: no  [PyQt4 not found]
> gtk3agg: no  [gtk3agg backend does not work on Python 3]
>   gtk3cairo: no  [Requires pygobject to be installed.]
>  gtkagg: no  [Requires pygtk]
>   tkagg: no  [The C/C++ header for Tk (tk.h) could not be
>  found.  You may need to install the development
>  package.]
>   wxagg: no  [requires wxPython]
> gtk: no  [Requires pygtk]
> agg: yes [installing]
>   cairo: yes [installing, pycairo version 1.10.0]
>   windowing: yes [installing, installing]
>
> OPTIONAL LATEX DEPENDENCIES
>  dvipng: no
> ghostscript: no
>   latex: no
> pdftops: no
>
> running install
> running bdist_egg
> running egg_info
> writing namespace_packages to lib\matplotlib.egg-info\namespace_packages.txt
> writing top-level names to lib\matplotlib.egg-info\top_level.txt
> writing dependency_links to lib\matplotlib.egg-info\dependency_links.txt
> writing lib\matplotlib.egg-info\PKG-INFO
> writing requirements to lib\matplotlib.egg-info\requires.txt
> writing namespace_packages to lib\matplotlib.egg-info\namespace_packages.txt
> writing top-level names to lib\matplotlib.egg-info\top_level.txt
> writing dependency_links to lib\matplotlib.egg-info\dependency_links.txt
> writing lib\matplotlib.egg-info\PKG-INFO
> writing requirements to lib\matplotlib.egg-info\requires.txt
> reading manifest file 'lib\matplotlib.egg-info\SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> writing manifest file 'lib\matplotlib.egg-info\SOURCES.txt'
> installing library code to build\bdist.win32\egg
> running install_lib
> running build_py
> copying lib\matplotlib\mpl-data\matplotlibrc ->
> build\lib.win32-3.3\matplotlib\mpl-data
> running build_ext
> building 'freetype2' extension
> Traceback (most recent call last):
>File "setup.py", line 264, in 
>  **extra_args
>File "C:\Python33\lib\distutils\core.py", line 148, in setup
>  dist.run_commands()
>File "C:\Python33\lib\distutils\dist.py", line 930, in run_commands
>  self.run_command(cmd)
>File "C:\Python33\lib\distutils\dist.py", line 949, in run_command
>  cmd_obj.run()
>File "C:\Python33\lib\site-packages\setuptools\command\install.py",
> line 65, in run
>  self.do_egg_install()
>File "C:\Python33\lib\site-packages\setuptools\command\install.py",
> line 107, in do_egg_install
>  self.run_command('bdist_egg')
>File "C:\Python33\lib\distutils\cmd.py", line 313, in run_command
>  self.distribution.run_command(command)
>File "C:\Python33\lib\distutils\dist.py", line 949, in run_command
>  cmd_obj.run()
>File "C:\Python33\lib\site-packages\setuptools\command\bdist_egg.py",
> line 157, in run
>  cmd = self.call_command('install_lib', warn_dir=0)
>File "C:\Python33\lib\site-packages\setuptools\command\bdist_egg.py",
> line 143, in call_command
> 

Re: [Matplotlib-users] AttributeError: function 'Py_DecRef' not found

2014-05-28 Thread Christoph Gohlke
Try unbundling the Python interpreter using the `'bundle_files': 2` 
option . Works for 
me with Python 3.4 (2.7 works with `'bundle_files': 3`).

Christoph

On 5/28/2014 8:35 PM, hgbing2013 wrote:
> I need to embedding matplotlib in pyqt4, i use the below code in my project:
>
> from matplotlib.backends.backend_qt4agg \
>  import FigureCanvasQTAgg as FigureCanvas
>
> convert to exe with py2exe, however running exe i got the error:
>
>File "matplotlib\backends\backend_qt4agg.pyo", line 19, in 
>File "ctypes\__init__.pyo", line 378, in __getattr__
>File "ctypes\__init__.pyo", line 383, in __getitem__
> AttributeError: function 'Py_DecRef' not found
>
> environment in my pc:
> python2.7
> PyQt GPL v4.10.3 for Python v2.7 (x32)
>
> Thanks
> 
> robert
>
>
> --
> Time is money. Stop wasting it! Get your web API in 5 minutes.
> www.restlet.com/download
> http://p.sf.net/sfu/restlet
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

--
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Couldn't save animation as gif

2013-10-13 Thread Christoph Gohlke
On 10/13/2013 7:49 PM, Aiyong WANG wrote:
> Today I setuped a ubuntu virtual machine, installed matplotlib 1.3.1
> (builded and installed from source), installed ImageMagick via
> 'apt-get', and tried again that sample.
> It worked.
>
> So Does the imagemagick writer not work on Windows, or am I missing
> something in my Win7 ?
>
> Can anybody help ?
> Thank you.
>
>
> 2013/10/13 Aiyong WANG mailto:gepcel...@gmail.com>>
>
> Hi.
> I'm using windows 7, with python(x,y) 2.7.5.0 installed. I then
> installed matplotlib 1.3.1 and imagemagick.
> Something goes wrong when try to save animation as a gif file.
> I used a base_animation.py within ipython notebook as followed:
>
> code:
> 
> -
> import numpy as np
> from matplotlib import pyplot as plt
> from matplotlib import animation
> # First set up the figure, the axis, and the plot element we want to
> animate
> fig = plt.figure()
> ax = fig.add_subplot(111, xlim=(0, 2), ylim=(-2, 2))
> line, = ax.plot([], [], lw=2)
> # initialization function: plot the background of each frame
> def init():
>  line.set_data([], [])
>  return line,
> # animation function.  This is called sequentially
> def animate(i):
>  x = np.linspace(0, 2, 1000)
>  y = np.sin(2 * np.pi * (x - 0.01 * i))
>  line.set_data(x, y)
>  return line,
> # call the animator.  blit=True means only re-draw the parts that
> have changed.
> anim = animation.FuncAnimation(fig, animate, init_func=init,
> frames=100, interval=20, blit=True)
> # this is how you save your animation to file:
> #anim.save('animation.gif', writer='imagemagick_file', fps=30)
> anim.save('animation.gif', writer='imagemagick', fps=30)
> plt.show()
> 
> --
>
>
>
> And I got an error message like this:
>
> 
> ---
> RuntimeError   Traceback (most recent call 
> last)
>   in()
>   26  # this is how you save your animation to file:
>   27  #anim.save('animation.gif', writer='imagemagick_file', fps=30)
> ---> 28  anim.save('animation.gif',  writer='imagemagick',  fps=30)
>   29
>   30  plt.show()
>
> D:\Python27\lib\site-packages\matplotlib\animation.pyc  insave(self, 
> filename, writer, fps, dpi, codec, bitrate, extra_args, metadata, extra_anim, 
> savefig_kwargs)
>  716  #TODO: Need to see if turning off blit is 
> really necessary
>  717  anim._draw_next_frame(d,  blit=False)
> --> 718  writer.grab_frame(**savefig_kwargs)
>  719
>  720  # Reconnect signal for first draw if necessary
>
> D:\Python27\lib\site-packages\matplotlib\animation.pyc  
> ingrab_frame(self, **savefig_kwargs)
>  202  # frame format and dpi.
>  203  self.fig.savefig(self._frame_sink(), 
> format=self.frame_format,
> --> 204   dpi=self.dpi, **savefig_kwargs)
>  205  except  RuntimeError:
>  206  out,  err=  self._proc.communicate()
>
> D:\Python27\lib\site-packages\matplotlib\figure.pyc  insavefig(self, 
> *args, **kwargs)
> 1419  self.set_frameon(frameon)
> 1420
> -> 1421  self.canvas.print_figure(*args,  **kwargs)
> 1422
> 1423  if  frameon:
>
> D:\Python27\lib\site-packages\matplotlib\backend_bases.pyc  
> inprint_figure(self, filename, dpi, facecolor, edgecolor, orientation, 
> format, **kwargs)
> 2218  orientation=orientation,
> 2219  bbox_inches_restore=_bbox_inches_restore,
> -> 2220  **kwargs)
> 2221  finally:
>   if  bbox_inchesand  restore_bbox:
>
> D:\Python27\lib\site-packages\matplotlib\backends\backend_agg.pyc  
> inprint_raw(self, filename_or_obj, *args, **kwargs)
>  495  close=  False
>  496  try:
> --> 497  renderer._renderer.write_rgba(filename_or_obj)
>  498  finally:
>  499  if  close:
>
> RuntimeError: Error writing to file
>
> --
>
> Can anybody help?
> --
> WANG Aiyong
>
>
>
>
> --
> --
> WANG Aiyong


`convert.exe` is a Windows system file. Set `animation.convert_path` in 
`matplotlib.rc` to the full path to ImageMagick's `convert.exe`. Works 
for me.

Christoph

--

Re: [Matplotlib-users] 'module' object has no attribute 'instancemethod'

2013-05-25 Thread Christoph Gohlke
On 5/25/2013 12:37 PM, klo uo wrote:
> Out of the blue, I started getting this messages while plotting with MPL
> 1.2.1:
>
> 
> Traceback (most recent call last):
>File
> "C:\Python27\lib\site-packages\matplotlib\backends\backend_qt4.py", line
> 244, in mouseMoveEvent
>  FigureCanvasBase.motion_notify_event( self, x, y )
>File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py",
> line 1724, in motion_notify_event
>  self.callbacks.process(s, event)
>File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 343,
> in process
>  proxy(*args, **kwargs)
>File "C:\Python27\lib\site-packages\matplotlib\cbook.py", line 215,
> in __call__
>  mtd = new.instancemethod(self.func, self.inst(), self.klass)
> AttributeError: 'module' object has no attribute 'instancemethod'
> 
>
> I didn't install any new package or change my Python installation in any
> way, which makes this hard for me to solve. The message appears when I
> move my mouse pointer inside plot window. I first removed matplotlibrc
> from my "home" folder, and it happens again regardless backend changed
> this way from wx to tk (which is default). I set backend to qt4 also,
> but it's just the same.
>
> Any ideas?
>

There is likely a `new` module in sys.path that shadows Python's builtin 
new module. Add a `import new;print(new.__file__)` statement at the top 
of your script. It should output 'X:\\Python27\\lib\\new.pyc'

Christoph


--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem with a umlaut

2013-05-15 Thread Christoph Gohlke

On 5/15/2013 1:55 PM, Ojala Janne wrote:



Which backend are you using?  I can't reproduce.  Does



https://github.com/matplotlib/matplotlib/blob/master/examples/text_labels_and_annotations/unicode_demo.py




work for you?


The bug only happens if I try to save the figure as EPS. So I suppose that
then means its a cairo back end (happens also if I force cairo). So that
means
as written the code works fine but if i try to make publishable quality
output
by saving as EPS (a raster image is not suitable), it crashes.

But it again works if I add any character thats so weird that ist on a n
extended
  unicode block then all characters seem to be handled correctly. Even
the ones
that previously crashed.



I can reproduce the crash on Python 2.7, 32 and 64 bit. Python 2.6 and 
3.3 appear to work. The call stack is attached. The crash is in 
ttfont_add_glyph_dependencies() at 



Christoph



msvcr90.dll!__crt_debugger_hook(int _Reserved=0)  Line 65   C
msvcr90.dll!_invoke_watson(const wchar_t * 
pszExpression=0x0022e750, const wchar_t * 
pszFunction=0x798363d3, const wchar_t * pszFile=0x05ed9ddc, 
unsigned int nLine=109701576, unsigned __int64 pReserved=0)  Line 233  C++
msvcr90.dll!_invalid_parameter(const wchar_t * 
pszExpression=0x05f649a8, const wchar_t * 
pszFunction=0x05b8ce88, const wchar_t * pszFile=0x0022e708, 
unsigned int nLine=2288096, unsigned __int64 pReserved=0)  Line 115C++
msvcr90.dll!_invalid_parameter_noinfo()  Line 126   C++
ttconv.pyd!std::_Vector_const_iterator 
>::operator*()  Line 106 C++
ttconv.pyd!std::_Vector_iterator >::operator*() 
 Line 340   C++
>   ttconv.pyd!ttfont_add_glyph_dependencies(TTFONT * 
> font=0x0022e8c0, std::vector > & 
> glyph_ids=[13](17,19,20,21,22,23,24,25,26,27,28,36,174))  Line 703 + 0xd 
> bytes   C++
ttconv.pyd!read_font(const char * filename=0x05f7fa60, 
font_type_enum target_type=PS_TYPE_3, std::vector > & 
glyph_ids=[13](17,19,20,21,22,23,24,25,26,27,28,36,174), TTFONT & font={...})  
Line 1326   C++
ttconv.pyd!insert_ttfont(const char * filename=0x05f7fa60, 
TTStreamWriter & stream={...}, font_type_enum target_type=PS_TYPE_3, 
std::vector > & 
glyph_ids=[13](17,19,20,21,22,23,24,25,26,27,28,36,174))  Line 1336 C++
ttconv.pyd!convert_ttf_to_ps(_object * self=0x, _object 
* args=0x05f649a8, _object * kwds=0x)  Line 149 + 0x1f 
bytesC++
python27.dll!PyCFunction_Call(_object * func=0x0004, 
_object * arg=0x01d57760, _object * kw=0x05b8ce88)  Line 85 + 
0x8 bytesC
python27.dll!call_function(_object * * * pp_stack=0x, 
int oparg=131)  Line 4021 + 0xaf bytesC
python27.dll!PyEval_EvalFrameEx(_frame * f=0x05ceddf8, int 
throwflag=99512536)  Line 2670   C
python27.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x05f725b0, 
_object * globals=0x0009, _object * locals=0x0001, 
_object * * args=0x, int argcount=9, _object * * 
kws=0x05bb31a0, int kwcount=1, _object * * defs=0x05f6e3c0, int 
defcount=6, _object * closure=0x)  Line 3253 + 0xa bytes   C
python27.dll!function_call(_object * func=0x05f7c588, _object * 
arg=0x05b729a8, _object * kw=0x0009)  Line 531 + 0x3b bytes 
C
python27.dll!PyObject_Call(_object * func=0x05b729a8, _object * 
arg=0x05fd7798, _object * kw=0x)  Line 2530 C
python27.dll!ext_do_call(_object * func=0x05f7c588, _object * * 
* pp_stack=0x0002, int flags=9384, int na=9, int nk=0)  Line 
4334 + 0xe bytes   C
python27.dll!PyEval_EvalFrameEx(_frame * f=0x05b20d18, int 
throwflag=95362448)  Line 2708   C
python27.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x05f72430, 
_object * globals=0x0003, _object * locals=0x0005, 
_object * * args=0x05f63c50, int argcount=3, _object * * 
kws=0x05f7a1e0, int kwcount=5, _object * * defs=0x, int 
defcount=0, _object * closure=0x)  Line 3253 + 0xa bytes   C
python27.dll!function_call(_object * func=0x05f7c518, _object * 
arg=0x01e7a750, _object * kw=0x0009)  Line 531 + 0x3b bytes 
C
python27.dll!PyObject_Call(_object * func=0x01e7a750, _object * 
arg=0x05fd5818, _object * kw=0x01d61048)  Line 2530 C
python27.dll!ext_do_call(_object * func=0x05f7c518, _object * * 
* pp_stack=0x0003, int flags=100268584, int na=3, int nk=0)

Re: [Matplotlib-users] DLL Load failure for matploltlib._png

2013-03-07 Thread Christoph Gohlke
On 3/7/2013 8:39 AM, Christoph Gohlke wrote:
> On 3/7/2013 6:00 AM, Tejashri Kandolkar wrote:
>> Hi,
>>
>> I built matplotlib1.2.0 with python3.2 on Windows7 from source.
>> I built the libpng and freetype libs and linked them statically to
>> matplotlib.
>>
>> Everything works fine on my machine, I can run the matplotlib examples etc
>> But on a new Win7 machine(with the exact same configuration as mine,
>> except a few softwares), I get the following error when i try to import
>> png module like this:
>>
>> import matplotlib._png
>>
>> ImportError: DLL load failed: The application has failed to start
>> because its side-by-side configuration is incorrect. Please see the
>> application event log or use the command-line sxstrace.exe tool for more
>> detail.
>>
>>
>> I used the dependency walker and found that pyd_ DLL was indeed having
>> issues during load.
>>
>> What could be the reason. Surprisingly it works all fine on my machine.
>>
>>
>> Regards,
>> Tej
>>
>
> Assuming this is 32 bit Python, install the Microsoft Visual C++ 2008
> Redistributable Package (x86)  http://www.microsoft.com/en-us/download/details.aspx?id=29>
>

Besides that, look for extra msvcp90.dll or msvcr90.dll files in PATH 
(for example MikteX is known for that) and resolve conflicts.

Christoph

--
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] DLL Load failure for matploltlib._png

2013-03-07 Thread Christoph Gohlke
On 3/7/2013 6:00 AM, Tejashri Kandolkar wrote:
> Hi,
>
> I built matplotlib1.2.0 with python3.2 on Windows7 from source.
> I built the libpng and freetype libs and linked them statically to
> matplotlib.
>
> Everything works fine on my machine, I can run the matplotlib examples etc
> But on a new Win7 machine(with the exact same configuration as mine,
> except a few softwares), I get the following error when i try to import
> png module like this:
>
> import matplotlib._png
>
> ImportError: DLL load failed: The application has failed to start
> because its side-by-side configuration is incorrect. Please see the
> application event log or use the command-line sxstrace.exe tool for more
> detail.
>
>
> I used the dependency walker and found that pyd_ DLL was indeed having
> issues during load.
>
> What could be the reason. Surprisingly it works all fine on my machine.
>
>
> Regards,
> Tej
>

Assuming this is 32 bit Python, install the Microsoft Visual C++ 2008 
Redistributable Package (x86) http://www.microsoft.com/en-us/download/details.aspx?id=29>

Christoph

--
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mathtext and fonts under Windows 8

2013-01-17 Thread Christoph Gohlke
I can reproduce this. The Windows 8 Arial font is different from the one 
in Windows 7. It seems other projects encountered and fixed the same 
issue: 

Christoph


On 1/17/2013 7:20 AM, Michael Droettboom wrote:
> Is the Arial font file different on Windows 8 vs. Windows 7?  (Just a
> difference in file size would be enough to know).  If so, it's probably
> the nature of those differences that we need to look into.
>
> Mike
>
> On 01/16/2013 10:04 AM, CAB wrote:
>> Dear Mike & Paul,
>> Thanks for your replies.  I tried Mike's protocol, and I found that
>> font_manager found the Arial font ("C:\\Windows\\fonts\\Arial.ttf") in
>> the right place.  I don't have fontforge yet, so I guess I need to
>> install and check it out.
>> But the thing that bothers me about this error is that it only occurs
>> if I try to mix mathtext and non-matplotlib font.  So matplotlib finds
>> Arial just fine.  And it finds the mathtext font fine.  Only the
>> mixture is fatal.  It's as if the parser loses track of the Arial
>> font, or it looks for a mathtext glyph in Arial.  Very strange that it
>> occurs only in Windows 8.
>> Regarding Paul's response, I don't have LaTeX on the W8 computer, and
>> my impression is that mathtext doesn't look for "mathematical Arial",
>> instead there are some packaged fonts that it uses for this purpose,
>> like Computer Modern and STIX.
>> I'll try to hunt this down further, and let you know if I find anything.
>> Best,
>> Chad
>>
>> *From:* Michael Droettboom 
>> *To:* matplotlib-users@lists.sourceforge.net
>> *Sent:* Thursday, January 10, 2013 7:35 AM
>> *Subject:* Re: [Matplotlib-users] mathtext and fonts under Windows 8
>>
>> Since this is specific to Windows 8, I wonder if the Arial font has
>> been updated in that version.  If it's a newer OTF font, rather than a
>> TTF font, it's possible matplotlib can't read it correctly.
>>
>> You can see what font file is on each platform by starting up a Python
>> prompt and doing:
>>
>>   >>> from matplotlib import font_manager
>>   >>> font_manager.findfont("Arial")
>>
>> It should display the path to the font.  From that, you should be able
>> to get the Arial file on each of your platforms and see if they are
>> different.  To get more details, you could open them up in the open
>> source "fontforge" tool.  Sorry I can't do this myself, as I don't
>> have access to anything past XP.
>>
>> If the fonts turn out to be different, as a workaround, you could try
>> backing up and then replacing the Arial font on your Windows 8 machine
>> with the one on your Windows 7 machine.
>>
>> Cheers,
>> Mike
>>
>> On 01/09/2013 11:59 PM, Paul Hobson wrote:
>>> Sounds like it might have something to do with your Latex
>>> installation (if any) or the barebones Latex-rendering done by MPL
>>> alone. Namely, they simply don't have the characters for mathematical
>>> Arial available.
>>>
>>> Not too sure though. Hopefully someone more knowledgeable responds.
>>> -paul
>>>
>>>
>>> On Tue, Jan 8, 2013 at 9:31 PM, CAB >> > wrote:
>>>
>>> Hi, All,
>>>
>>> I am encountering a thorny problem when trying to run matplotlib
>>> under Windows 8. If I label an axis using a command like
>>>
>>> ax.set_ylabel(r'time (s)', name='Arial'),
>>>
>>> all is well.  But if  try to add mathtext to that, as in
>>>
>>> ax.set_ylabel(r'time ($s$)', name='Arial'),
>>>
>>> mathtext.py  throws an error (a very long
>>> stream) ending in "RuntimeError: Face has no glyph names". If I
>>> remove the "name='Arial'" above and let the program default to
>>> Bitstream Vera Sans, the mathtext works.
>>>
>>> This problem does not occur under Windows 7 or XP; only under two
>>> different Windows 8 installations.  Any ideas what's going on?
>>>
>>> Chad
>>>
>>> 
>>> --
>>> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript,
>>> jQuery
>>> and much more. Keep your Java skills current with LearnJavaNow -
>>> 200+ hours of step-by-step video tutorials by Java experts.
>>> SALE $49.99 this month only -- learn more at:
>>> http://p.sf.net/sfu/learnmore_122612
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> 
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>>
>>>
>>> --
>>> Master Visual Studio, SharePoint, SQL,ASP.NET  , C# 2012, 
>>> HTML5, CSS,
>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>>> MVPs and experts. ON SALE this month only -- learn more at:
>>> http://p.sf.n

Re: [Matplotlib-users] Qt4/PySide memory leak

2012-10-01 Thread Christoph Gohlke

On 9/24/2012 5:50 PM, Christoph Gohlke wrote:

On 9/24/2012 3:32 PM, David Honcik wrote:

I've run into a large memory leak using Matplotlib with PySide and the
Qt4 back end.  I'm using :
Python 3.2
Numpy 1.6.2
Pyside 1.1.1 (qt474)
Matplotlib 1.2 (first the Capetown Group port to Python 3, then 1.2 RC2)
on Windows XP 32 bit
I've tried using the Python 2.7 branch of all of the above and don't see
the problem.  I don't see the problem with the Tk back end.  I don't see
the problem with the Qt4 back end and PyQt4.  Only with the above
mentioned versions and using the Qt4 back end with PySide.
The following script will reproduce the problem :

import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
import pylab
arrayX = []
arrayY = []
for nIndex in range(0, 100):
arrayX.append(nIndex)
arrayY.append(nIndex)
Figure = matplotlib.pyplot.figure(1)
Axes = Figure.add_axes([ 0.05, 0.05, 0.95, 0.95])
Axes.plot(arrayX,
arrayY,
color  = "blue",
marker = "o",
markersize = 5.0)
Axes.set_xlim(arrayX[0], arrayX[len(arrayX) - 1])
Axes.set_ylim(arrayY[0], arrayY[len(arrayY) - 1])
matplotlib.pyplot.show()

I run the above, grab the lower right sizing handle on the plot window
and start resizing the window.  Watching the python process in task
manager, each resize leaks a noticeable amount of memory.  A few minutes
of this will get process memory up to ~2.5 GB. At that point it crashes.
I'm new here, am I in the right place?



I can reproduce this exactly, also with pyside 1.1.2 and an empty plot.
Looks like QtGui.QImage is leaking.

import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
from matplotlib import pyplot
pyplot.plot()
pyplot.show()

--
Christoph




As a workaround, until PySide is fixed, use the attached patch, which 
forcibly decreases the reference count of the string buffer after use.


Christoph
diff --git a/lib/matplotlib/backends/backend_qt4agg.py 
b/lib/matplotlib/backends/backend_qt4agg.py
index 0701781..408f3ce 100644
--- a/lib/matplotlib/backends/backend_qt4agg.py
+++ b/lib/matplotlib/backends/backend_qt4agg.py
@@ -4,6 +4,7 @@ Render to qt from agg
 from __future__ import division, print_function
 
 import os, sys
+import ctypes
 
 import matplotlib
 from matplotlib.figure import Figure
@@ -15,6 +16,10 @@ from backend_qt4 import QtCore, QtGui, FigureManagerQT, 
FigureCanvasQT,\
 
 DEBUG = False
 
+decref = ctypes.pythonapi.Py_DecRef
+decref.argtypes = [ctypes.py_object]
+decref.restype = None
+
 
 def new_figure_manager( num, *args, **kwargs ):
 """
@@ -95,6 +100,8 @@ class FigureCanvasQTAgg( FigureCanvasQT, FigureCanvasAgg ):
 else:
 stringBuffer = self.renderer._renderer.tostring_argb()
 
+refcnt = sys.getrefcount(stringBuffer)
+
 qImage = QtGui.QImage(stringBuffer, self.renderer.width,
   self.renderer.height,
   QtGui.QImage.Format_ARGB32)
@@ -106,6 +113,11 @@ class FigureCanvasQTAgg( FigureCanvasQT, FigureCanvasAgg ):
 p.setPen( QtGui.QPen( QtCore.Qt.black, 1, QtCore.Qt.DotLine ) )
 p.drawRect( self.rect[0], self.rect[1], self.rect[2], 
self.rect[3] )
 p.end()
+
+del qImage
+if refcnt != sys.getrefcount(stringBuffer):
+# Fix a memory leak in PySide on Python 3
+decref(stringBuffer)
 else:
 bbox = self.blitbox
 l, b, r, t = bbox.extents
--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Qt4/PySide memory leak

2012-09-24 Thread Christoph Gohlke
On 9/24/2012 3:32 PM, David Honcik wrote:
> I've run into a large memory leak using Matplotlib with PySide and the
> Qt4 back end.  I'm using :
> Python 3.2
> Numpy 1.6.2
> Pyside 1.1.1 (qt474)
> Matplotlib 1.2 (first the Capetown Group port to Python 3, then 1.2 RC2)
> on Windows XP 32 bit
> I've tried using the Python 2.7 branch of all of the above and don't see
> the problem.  I don't see the problem with the Tk back end.  I don't see
> the problem with the Qt4 back end and PyQt4.  Only with the above
> mentioned versions and using the Qt4 back end with PySide.
> The following script will reproduce the problem :
> 
> import matplotlib
> matplotlib.use('Qt4Agg')
> matplotlib.rcParams['backend.qt4']='PySide'
> import pylab
> arrayX = []
> arrayY = []
> for nIndex in range(0, 100):
> arrayX.append(nIndex)
> arrayY.append(nIndex)
> Figure = matplotlib.pyplot.figure(1)
> Axes = Figure.add_axes([ 0.05, 0.05, 0.95, 0.95])
> Axes.plot(arrayX,
> arrayY,
> color  = "blue",
> marker = "o",
>markersize = 5.0)
> Axes.set_xlim(arrayX[0], arrayX[len(arrayX) - 1])
> Axes.set_ylim(arrayY[0], arrayY[len(arrayY) - 1])
> matplotlib.pyplot.show()
> 
> I run the above, grab the lower right sizing handle on the plot window
> and start resizing the window.  Watching the python process in task
> manager, each resize leaks a noticeable amount of memory.  A few minutes
> of this will get process memory up to ~2.5 GB. At that point it crashes.
> I'm new here, am I in the right place?
>

I can reproduce this exactly, also with pyside 1.1.2 and an empty plot. 
Looks like QtGui.QImage is leaking.

import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
from matplotlib import pyplot
pyplot.plot()
pyplot.show()

--
Christoph


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building Basemap on Windows

2012-08-30 Thread Christoph Gohlke
On 8/30/2012 2:25 AM, klo uo wrote:
> So I forked then cloned huge Basemap repository with idea to test latest code
>
> README file says it needs geos library, which README suggest:
>
>nmake /f makefile.vc MSVC_VER=1500
>
> However, error is inevitable almost always and this time Google
> suggests that MS does not support C-99 (can't find inttypes.h).
> Easiest solution is to copy these:
> https://code.google.com/p/msinttypes include files in affected include
> folder and change line `#include ` in platform.h to
> `#include "inttypes.h"` so it picks it up from current folder
>
> That was it, geos compiled and products ended in src subfolder
> relative to geos folder:
>
>inlines.obj
>geos.lib
>geos_i.exp
>geos_i.lib
>geos.dll.manifest
>geos.pdb
>geos.ilk
>geos.dll
>geos_c_i.exp
>geos_c_i.lib
>geos_c.dll.manifest
>geos_c.pdb
>geos_c.ilk
>geos_c.dll
>
> Now, Basemap setup has *nix scenario for GEOS_DIR so I changed setup.py to:
>
>
> geos_include_dirs=["C:\\Temp\\basemap\\GEOS-3~1.3\\capi","C:\\Temp\\basemap\\GEOS-3~1.3\\include",numpy.get_include()]
>geos_library_dirs=["C:\\Temp\\basemap\\GEOS-3~1.3\\src"]
>
> after I learned that `python setup.py build" fails if Basemap source
> is in path with spaces
>
> Still no luck, and thought to ask for kind help:
>

>
>LINK : fatal error LNK1181: cannot open input file 'geos_c.lib'
>
>error: Command "c:\Program Files\Microsoft Visual Studio
> 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO
>/LIBPATH:C:\Temp\basemap\GEOS-3~1.3\src
> /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild geos_c.lib
> geos.lib
>/EXPORT:init_geoslib
> build\temp.win32-2.7\Release\src/_geoslib.obj
> /OUT:build\lib.win32-2.7\_geoslib.pyd
>/IMPLIB:build\temp.win32-2.7\Release\src\_geoslib.lib
> /MANIFESTFILE:build\temp.win32-2.7\Release\src\_geoslib.pyd.manifest"
>failed with exit status 1181
>

Try to remove 'geos_c' from the list of libraries in setup.py. Works for me.

-libraries=['geos_c','geos']))
+libraries=['geos']))

Christoph


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] python3 and matplotlib installation problem

2012-07-28 Thread Christoph Gohlke
On 7/28/2012 12:29 PM, elmar werling wrote:
> Hi,
>
> just installed matplotlib by doing
>
> git clone https://github.com/matplotlib/matplotlib
> cd matplotlib
> python3 setup.py build
> sudo python3 setup.py install
>
> When I import matplotlib.pyplot I get the following error message.
>
> Any help is wellcome
> Elmar
>
>
>
> Python 3.2.1 (default, Jul 18 2011, 16:24:40) [GCC] on linux2
> Type "copyright", "credits" or "license()" for more information.
>   >>> import numpy
>   >>> import matplotlib
>   >>> numpy.__version__
> '1.6.2'
>   >>> matplotlib.__version__
> '1.2.x'
>   >>> import matplotlib.pyplot
> Traceback (most recent call last):
> File "", line 1, in 
>   import matplotlib.pyplot
> File "/usr/local/lib/python3.2/site-packages/matplotlib/pyplot.py",
> line 26, in 
>   from matplotlib.figure import Figure, figaspect
> File "/usr/local/lib/python3.2/site-packages/matplotlib/figure.py",
> line 19, in 
>   from .axes import Axes, SubplotBase, subplot_class_factory
> File "/usr/local/lib/python3.2/site-packages/matplotlib/axes.py",
> line 21, in 
>   import matplotlib.dates as mdates
> File "/usr/local/lib/python3.2/site-packages/matplotlib/dates.py",
> line 122, in 
>   from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
> File "/usr/local/lib/python3.2/site-packages/dateutil/rrule.py", line 55
>   raise ValueError, "Can't create weekday with n == 0"
>   ^
> SyntaxError: invalid syntax
>   >>>
>
>
>

Install python-dateutil 2.1 . Do not 
use not dateutil 1.5 or the version included with matplotlib.

See also 

Christoph

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to compile under windows?

2012-07-11 Thread Christoph Gohlke
On 7/11/2012 1:47 PM, Daniel Hyams wrote:
> I looked around in the docs a bit but didn't find anything...is there a
> guide / set of recommended practices when trying to build matplotlib
> from source on Windows?
>

These discussions on [matplotlib-devel] might help:

"Calling all Mac OSX users!"


"Building on Windows (Was Re: Calling all Mac OSX users!)"


- Christoph

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 1.2.x + Python 3.2.3 + Numpy 1.6.2

2012-06-30 Thread Christoph Gohlke
On 6/30/2012 11:45 AM, Youbao Zhang wrote:
> Dear all,
>
> I successfully installed Python 3.2.3 + Numpy 1.6.2 + Matplotlib 1.2.x
> (Git version). I tried the following command sequence line by line:
>
> huskier@SqueezeVM0:~/Programming/Python/Python-3.2.3$ python3.2
> Python 3.2.3 (default, Jun 30 2012, 07:14:35)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> *>>> import matplotlib.pyplot as plt*
> *>>> plt.plot(range(10), range(10))*
> []
> *>>> plt.show()*

>
> However, nothing happens when I typed plt.show(). There should be a
> figure window which I can get using python 2.6.
>
> I do not know what's wrong with my installation. OR matplotlib cannot be
> used with python 3? Any ideas?
>
> Best regards,
>
> Simon
>

Did you create a `setup.cfg` file and enable `backend = TkAgg` before 
building matplotlib? Otherwise add a `import 
matplotlib;matplotlib.use("TkAgg")` statement at the top of the script.

Christoph

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 0.99.1 crashes python on Windows XP [SEC=UNCLASSIFIED]

2012-04-18 Thread Christoph Gohlke


On 4/18/2012 7:00 AM, Werner F. Bruhin wrote:
> On 18/02/2010 22:41, Werner F. Bruhin wrote:
>> Using numpy with "/arch nosse" solved the issue.
>>
>> Probably OT here, but does anyone know if numpy will in the future be
>> able to dynamically switch on/off the SSEx support?
> I am running again into crashes with matplotlib/numpy on Windows XP
> running on AMD Athlon type machiens.
>
> I distribute the application with py2exe, so on my machine I install
> numpy with "/arch nosse".
>
> This works on a test machine with my older program version which uses
> Python 2.5, matplotlib 0.99 and numpy 1.0.4, now with my newer stuff I
> use Python 2.6, still matplotlib 0.99 and numpy 1.3 (as there is no
> 1.0.4 for Py 2.6), with this configuration my program crashes on the
> Athlon CPU.
>
> Tried upgrading to 1.4.1 and 1.5.1 of numpy (still using /arch nosse)
> but still see the same crash with an error code of "0xc01d".
>
> Short term a 1.0.4 for Python 2.6 would be an o.k. work around, but I
> really like to get a something better.  Would an upgrade of matplotlib help?
>
> Werner
>

matplotlib-0.99.3.win32-py2.6 should work with 
numpy-1.4.1-win32-superpack-python2.6.exe

There was a bug prior to 0.99.2 (IIRC) that would crash on older Pentium 
computers.

If matplotlib-0.99.3 does crash with numpy-1.4.1, please send a small 
script and let us know exactly where and in which module it crashes, and 
the capabilities/model of your processor.

If possible, upgrade to numpy 1.6.1 and matplotlib 1.1.

Christoph

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plt.close(fig) error in python 3.2

2012-02-29 Thread Christoph Gohlke


On 2/29/2012 11:19 AM, josef.p...@gmail.com wrote:
> On Wed, Feb 29, 2012 at 2:09 PM, Skipper Seabold  wrote:
>> On Wed, Feb 29, 2012 at 2:02 PM,  wrote:
>> 
>>>
>>> I'm not able to build matplotlib myself.
>>>
>>
>> If you're interested, I've been able to build on windows since
>> Christophe provides the dependencies by doing the following
>>
>> http://old.nabble.com/Building-on-Windows-%28Was-Re%3A-Calling-all-Mac-OSX-users!%29-td32283791.html
>>
>> I have detailed instructions written down somewhere...
>
> I'd rather postpone (indefinitely?) the pleasure of building 64bit
> binaries on Windows. Especially for python 3.2, the main point is to
> test with publicly available binaries.
>
> Thanks,
>
> Josef
>
>>
>> Skipper
>

Updated installers for Python 3.x are at 
. Git ref d661a4871c.

Christoph

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plt.close(fig) error in python 3.2

2012-02-29 Thread Christoph Gohlke


On 2/29/2012 10:46 AM, Benjamin Root wrote:
>
>
> On Wed, Feb 29, 2012 at 7:32 AM,  > wrote:
>
> Sorry for reporting this here, it's the only way for matplotlib I'm
> signed up for.
>
> I'm testing scikits statsmodels on Python 3.2
>
> plt.close(fig) in the graphics tests raises an error, python 3.2,
> matplotlib 1.2.x from Gohlke for Win 64, nose 1.0.0
>
>   File
> "C:\Programs\Python32\lib\site-packages\matplotlib\_pylab_helpers.py",
> line 75, in destroy_fig
> for manager in Gcf.figs.values():
> RuntimeError: dictionary changed size during iteration
>
> https://github.com/statsmodels/statsmodels/issues/152
> 
> https://github.com/statsmodels/statsmodels/blob/master/scikits/statsmodels/graphics/tests/test_boxplots.py#L15
>
> replacing plt.close(fig) with plt.close('all') removes the test errors
> in python 3.2
>
> Since I'm not familiar with the matplotlib details, I don't know what
> this means.
>
> Josef
>
>
> Could you double-check exactly which version you have?  In the master
> branch, we made a change on Nov 14th to not delete dictionary items
> while iterating.  I suspect Gohlke's build was from before then.
>
> Ben Root
>

That build is from November 9, 2011, git ref 75c9beccc7 

 
plus some additional minor changes (indentation and urllib) I was 
working on at that time.

It should be easy to just patch the installed version in order to fix 
this specific issue without recompiling matplotlib 


Christoph

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Installation of matplotlib 2.7 issue

2012-01-18 Thread Christoph Gohlke


On 1/17/2012 5:04 PM, Mac Juneau wrote:
> Problem: Installation of matlibplot for Python 2.7's .exe file requires
> that Numby be installed first. But the Numby installation list does not
> include a version for Python 2.7. The highest available version is for
> Python 2.6.
> So, Numby 2.6 won't install because it can't find a Python 2.6 and
> matlibplot for Python 2.7 won't run because it can't find an installed
> Numby.
> Is there a work around?
>
>

Numpy-1.6.1 installers for Python 2.5 to 3.2 are at 


Christoph

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Create Graphs in Python 2.5.4

2012-01-11 Thread Christoph Gohlke


On 1/11/2012 7:37 AM, Vítor Carvalho wrote:
> Hi,
>
> Someone can help me to configure the python to create uma image graph
> with the matplotlib or can sugest other way to create one graph  in
> this version of python?
>
> I need use the Python 2.5.*
> I instaled the Python 2.5.4, the "numpy-1.3.0.win32-py2.5", the
> "matplotlib-1.1.0.win32-py2.5" and the "basemap-1.0.2.win32-py2.5".
>
>
> ### This is the code that I try to run #
>
> #set up matplotlib and the figure
> import matplotlib.pyplot as plt
> plt.figure
>
> #create data
> x_series = [0,1,2,3,4,5]
> y_series_1 = [x**2 for x in x_series]
> y_series_2 = [x**3 for x in x_series]
>
> #plot data
> plt.plot(x_series, y_series_1, label="x^2")
> plt.plot(x_series, y_series_2, label="x^3")
>
> #add in labels and title
> plt.xlabel("Small X Interval")
> plt.ylabel("Calculated Data")
> plt.title("Our Fantastic Graph")
>
> #add limits to the x and y axis
> plt.xlim(0, 6)
> plt.ylim(-5, 80)
>
> #create legend
> plt.legend(loc="upper left")
>
> #save figure to png
> plt.savefig("example.png")
>
>
> ### The error that I received ##
>
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
> (Intel)] on win32
> Type "copyright", "credits" or "license()" for more information.
>
>  
>  Personal firewall software may warn about the connection IDLE
>  makes to its subprocess using this computer's internal loopback
>  interface.  This connection is not visible on any external
>  interface and no data is sent to or received from the Internet.
>  
>
> IDLE 1.2.4   No Subprocess 

> Traceback (most recent call last):
>File "C:\Projeto\Scripts\teste.py", line 2, in
>  import matplotlib.pyplot as plt
>File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 23,
> in
>  from matplotlib.figure import Figure, figaspect
>File "C:\Python25\lib\site-packages\matplotlib\figure.py", line 16,
> in
>  import artist
>File "C:\Python25\lib\site-packages\matplotlib\artist.py", line 6, 
> in
>  from transforms import Bbox, IdentityTransform, TransformedBbox,
> TransformedPath
>File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line
> 34, in
>  from matplotlib._path import affine_transform
> ImportError: DLL load failed: The specified module could not be found.

>
>
>
>
>
> Best regards,
> Vítor Carvalho
>

The C++ runtime library msvcp71.dll is probably missing on your system. 
Try install "vc71crt-3052.4.win32-py2.5.‌exe" from 
.

Christoph


--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Python / Matplotlib Central

2011-11-13 Thread Christoph Gohlke


On 11/13/2011 8:38 AM, Rahul Mahajan wrote:
> Hi,
>
> Is there such a thing "Python / Matplotlib Central Exchange" similar to
> the "File Exchange on Matlab Central" (
> http://www.mathworks.com/matlabcentral/fileexchange/ )  that anyone is
> aware of which allows one to search for user-contributed functions /
> packages.
>
> Many Thanks!
>
>

http://scipy-central.org/

"A collection of code snippets, modules and links for solving scientific 
problems with SciPy and related Python tools."

Christoph

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug in set_autoscalez_on in mplot3d 1.1.0

2011-11-07 Thread Christoph Gohlke


On 11/6/2011 11:18 AM, krastanov.ste...@gmail.com wrote:
> /usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc in
> set_autoscale_on(self, b)
>  252 """
>  253 Axes.set_autoscale_on(self, b)
> --> 254 self.set_autoscalez_on(self, b)
>  255
>  256 def set_autoscalez_on(self, b) :
>
> TypeError: set_autoscalez_on() takes exactly 2 arguments (3 given)
>
>
> I believe there is one self too much.
>
> Regards
> Stefan
>

Opened a pull request at 
.

Christoph

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Build MPL with VS 2008 problem

2011-11-03 Thread Christoph Gohlke


On 11/3/2011 6:45 AM, Mads Ipsen wrote:
> On 11/02/2011 09:46 PM, Christoph Gohlke wrote:
>> On 11/2/2011 1:39 PM, Mads Ipsen wrote:
>>> On 11/02/2011 09:28 PM, Christoph Gohlke wrote:
>>>> On 11/2/2011 1:11 PM, Mads Ipsen wrote:
>>>>> On 11/02/2011 08:43 PM, Michael Droettboom wrote:
>>>>>> On 11/02/2011 01:34 PM, Mads Ipsen wrote:
>>>>>>> On 11/02/2011 05:50 PM, Michael Droettboom wrote:
>>>>>>>> On 11/02/2011 10:53 AM, Mads Ipsen wrote:
>>>>>>>>> Any clues to why ft2build.h cannot be located. The above docs says
>>>>>>>>> it should be part of the binary installer.
>>>>>>>> The binary for freetype is included with the installer, but the
>>>>>>>> headers (needed to build, but not to run) are not. Do you need to
>>>>>>>> build matplotlib from source, or just use it?
>>>>>>>>
>>>>>>>> Mike
>>>>>>> I need to built it from source.
>>>>>>>
>>>>>>> Mads
>>>>>> In that case, you will need to install the development packages for
>>>>>> freetype, libpng, libz, and numpy.
>>>>>>
>>>>>> I'm not a regular Windows user, so I don't know what the best practice
>>>>>> is for that these days. Some of the other members on this list can
>>>>>> hopefully jump in. There was also a thread on this list about
>>>>>> "Building on Windows"   from 08/18/2011 that might be helpful.
>>>>>>
>>>>>> Mike
>>>>>>
>>>>>> --
>>>>>> RSA(R) Conference 2012
>>>>>> Save $700 by Nov 18
>>>>>> Register now
>>>>>> http://p.sf.net/sfu/rsa-sfdev2dev1
>>>>>>
>>>>>> ___
>>>>>> Matplotlib-users mailing list
>>>>>> Matplotlib-users@lists.sourceforge.net  
>>>>>> <mailto:Matplotlib-users@lists.sourceforge.net>   
>>>>>> <mailto:Matplotlib-users@lists.sourceforge.net>
>>>>>> <mailto:Matplotlib-users@lists.sourceforge.net>
>>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>> I can't seem to find this thread anywhere. It it really that difficult
>>>>> to build on Windows? It most be documented somewhere what the prereqs are?
>>>>>
>>>> See<http://sourceforge.net/mailarchive/message.php?msg_id=27961105>   and
>>>> <http://matplotlib.sourceforge.net/users/installing.html#build-requirements>
>>>>
>>>> Prebuilt static link libraries for msvc compilers are available at
>>>> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>.
>>>>
>>>> It seems you are trying to compile from within cygwin, using the include
>>>> files provided by cygwin. That will probably not work.
>>>>
>>>> Christoph
>>>>
>>>>
>>>>
>>>>> Best regards,
>>>>>
>>>>> Mads
>>>>>
>>>> --
>>>> RSA(R) Conference 2012
>>>> Save $700 by Nov 18
>>>> Register now
>>>> http://p.sf.net/sfu/rsa-sfdev2dev1
>>>> ___
>>>> Matplotlib-users mailing list
>>>> Matplotlib-users@lists.sourceforge.net  
>>>> <mailto:Matplotlib-users@lists.sourceforge.net>   
>>>> <mailto:Matplotlib-users@lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>> I am building from the VS2008 command prompt. But thanks for the info.
>>> Will have a look.
>>>
>>> Best regards,
>>>
>>> Mads
>> OK. The cygwin in your home path looked suspicious:"c:\cygwin\home\mads
>> ipsen\"
>>
>> Christoph
>>
>> --
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforg

Re: [Matplotlib-users] Build MPL with VS 2008 problem

2011-11-02 Thread Christoph Gohlke


On 11/2/2011 1:39 PM, Mads Ipsen wrote:
> On 11/02/2011 09:28 PM, Christoph Gohlke wrote:
>> On 11/2/2011 1:11 PM, Mads Ipsen wrote:
>>> On 11/02/2011 08:43 PM, Michael Droettboom wrote:
>>>> On 11/02/2011 01:34 PM, Mads Ipsen wrote:
>>>>> On 11/02/2011 05:50 PM, Michael Droettboom wrote:
>>>>>> On 11/02/2011 10:53 AM, Mads Ipsen wrote:
>>>>>>> Any clues to why ft2build.h cannot be located. The above docs says
>>>>>>> it should be part of the binary installer.
>>>>>> The binary for freetype is included with the installer, but the
>>>>>> headers (needed to build, but not to run) are not. Do you need to
>>>>>> build matplotlib from source, or just use it?
>>>>>>
>>>>>> Mike
>>>>> I need to built it from source.
>>>>>
>>>>> Mads
>>>> In that case, you will need to install the development packages for
>>>> freetype, libpng, libz, and numpy.
>>>>
>>>> I'm not a regular Windows user, so I don't know what the best practice
>>>> is for that these days. Some of the other members on this list can
>>>> hopefully jump in. There was also a thread on this list about
>>>> "Building on Windows"  from 08/18/2011 that might be helpful.
>>>>
>>>> Mike
>>>>
>>>> --
>>>> RSA(R) Conference 2012
>>>> Save $700 by Nov 18
>>>> Register now
>>>> http://p.sf.net/sfu/rsa-sfdev2dev1
>>>>
>>>> ___
>>>> Matplotlib-users mailing list
>>>> Matplotlib-users@lists.sourceforge.net  
>>>> <mailto:Matplotlib-users@lists.sourceforge.net>   
>>>> <mailto:Matplotlib-users@lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>> I can't seem to find this thread anywhere. It it really that difficult
>>> to build on Windows? It most be documented somewhere what the prereqs are?
>>>
>> See<http://sourceforge.net/mailarchive/message.php?msg_id=27961105>  and
>> <http://matplotlib.sourceforge.net/users/installing.html#build-requirements>
>>
>> Prebuilt static link libraries for msvc compilers are available at
>> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>.
>>
>> It seems you are trying to compile from within cygwin, using the include
>> files provided by cygwin. That will probably not work.
>>
>> Christoph
>>
>>
>>
>>> Best regards,
>>>
>>> Mads
>>>
>> --
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net  
>> <mailto:Matplotlib-users@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> I am building from the VS2008 command prompt. But thanks for the info.
> Will have a look.
>
> Best regards,
>
> Mads

OK. The cygwin in your home path looked suspicious: "c:\cygwin\home\mads 
ipsen\"

Christoph

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Build MPL with VS 2008 problem

2011-11-02 Thread Christoph Gohlke


On 11/2/2011 1:11 PM, Mads Ipsen wrote:
> On 11/02/2011 08:43 PM, Michael Droettboom wrote:
>> On 11/02/2011 01:34 PM, Mads Ipsen wrote:
>>> On 11/02/2011 05:50 PM, Michael Droettboom wrote:
 On 11/02/2011 10:53 AM, Mads Ipsen wrote:
>
> Any clues to why ft2build.h cannot be located. The above docs says
> it should be part of the binary installer.

 The binary for freetype is included with the installer, but the
 headers (needed to build, but not to run) are not. Do you need to
 build matplotlib from source, or just use it?

 Mike
>>> I need to built it from source.
>>>
>>> Mads
>> In that case, you will need to install the development packages for
>> freetype, libpng, libz, and numpy.
>>
>> I'm not a regular Windows user, so I don't know what the best practice
>> is for that these days. Some of the other members on this list can
>> hopefully jump in. There was also a thread on this list about
>> "Building on Windows" from 08/18/2011 that might be helpful.
>>
>> Mike
>>
>> --
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>>
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net  
>> 
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> I can't seem to find this thread anywhere. It it really that difficult
> to build on Windows? It most be documented somewhere what the prereqs are?
>

See  and 


Prebuilt static link libraries for msvc compilers are available at 
.

It seems you are trying to compile from within cygwin, using the include 
files provided by cygwin. That will probably not work.

Christoph



> Best regards,
>
> Mads
>

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ANN: matplotlib-1.1.0

2011-10-11 Thread Christoph Gohlke
The minimum versions of numpy required for the matplotlib-1.1.0 Windows 
installers are:

numpy-1.4.1 win32-py2.5
numpy-1.5.1 win32-py2.6
numpy-1.5.1 win32-py2.7
numpy-1.6.1 win-amd64-py2.x

Christoph


On 10/11/2011 6:00 AM, John Hunter wrote:
> A new release of matplotlib is available for download at
>
>
> https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0
>
> There are lots of nifty new features like Sankey diagrams, an API for
> animations and movie making, enhanced 3D support, support for
> auto-layout of subplots with titles, xlabels and ylabels to prevent
> text from running off the edge of the figure (tight_layout), pyside
> supoprt, enhanced legends, and tons of other minor features and
> bug-fixes.  See what's new at
>
>http://matplotlib.sourceforge.net/users/whats_new.html
>
> and the CHANGELOG at
>
>https://github.com/matplotlib/matplotlib/blob/v1.1.x/CHANGELOG
>
> and the commit history at
>
>https://github.com/matplotlib/matplotlib/commits/v1.1.x/
>
> Please post issues on the github issue tracker and questions on the mailing 
> list
>
>https://github.com/matplotlib/matplotlib/issues
>
> Thanks to all the matplotlib developers who contributed to this
> release, with special thanks to Michael Droettboom, Eric Firing,
> Benjamin Root, Jouni Seppänen, Kevin Davies and Jae-Joon Lee for lots
> of code contributions and bug fixes and to Christoph Gohlke and
> Russell Owen for the windows and OX X binary installers.
>
> JDH
>


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib crash on Windows 2008 Server

2011-07-12 Thread Christoph Gohlke


On 7/7/2011 3:06 PM, Noah Aklilu wrote:
> Hello,
>
> I am using matplotlib as part of a data analysis tool, and I am having
> problems with a crash on Windows 2008 server when plotting data. The
> application use to run fine, though I guess there was a round of windows
> updates recently (including some VC++ 2008 runtime updates). No problems
> on Windows 7 professional with the same runtime updates.
>
> I have tracked the problem down to the function call to
> update_path_extents in the _path.pyd module from transforms.py (L821 in
> 1.0.1).
>
> Anyone else seeing this?


I can reproduce this. For me any matplotlib script crashes on Windows 
Server 2008 when frozen with py2exe and py2exe's "bundle_files" option 
is not 3 (the default). Frozen PIL scripts also crash. The executables 
work When bundle_files=3.

Christoph


>
> The event log shows that it is an uncaught VC++ exception based on this
> message:
>
> Log Name: Application
>
> Source: Application Error
>
> Date: 07/07/2011 3:11:40 PM
>
> Event ID: 1000
>
> Task Category: (100)
>
> Level: Error
>
> Keywords: Classic
>
> User: N/A
>
> Computer: TS1.synodon.com
>
> Description:
>
> Faulting application name: sensview.exe, version: 0.0.0.0, time stamp:
> 0x4918019c
>
> Faulting module name: KERNELBASE.dll, version: 6.1.7601.17514, time
> stamp: 0x4ce7bafa
>
> Exception code: 0xe06d7363
>
> Fault offset: 0xb727
>
> Faulting process id: 0x18d8
>
> Faulting application start time: 0x01cc3cea60fe867f
>
> Faulting application path: C:\Program Files (x86)\sensview\sensview.exe
>
> Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
>
> Report Id: b4b6d9f6-a8dd-11e0-bdde-002590135f53
>
> Event Xml:
>
> http://schemas.microsoft.com/win/2004/08/events/event";>
>
> 
>
> 
>
> 1000
>
> 2
>
> 100
>
> 0x80
>
> 
>
> 10539
>
> Application
>
> TS1.synodon.com
>
> 
>
> 
>
> 
>
> sensview.exe
>
> 0.0.0.0
>
> 4918019c
>
> KERNELBASE.dll
>
> 6.1.7601.17514
>
> 4ce7bafa
>
> e06d7363
>
> b727
>
> 18d8
>
> 01cc3cea60fe867f
>
> C:\Program Files (x86)\sensview\sensview.exe
>
> C:\Windows\syswow64\KERNELBASE.dll
>
> b4b6d9f6-a8dd-11e0-bdde-002590135f53
>
> 
>
> 
>
>
>
> --
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.0.1 installation problem

2011-02-20 Thread Christoph Gohlke
On 2/20/2011 12:25 AM, Richard D. Moores wrote:
> Windows Vista
> Python 2.6
>
> I downloaded matplotlib-1.0.1.win-amd64-py2.6.exe from
> http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/,
> but I get "Python version 2.6 required, which was not found in the
> registry".
>
> I do have Python 2.6, but its folder is C:\Python26. What to do?
>
> Thanks,
>
> Dick Moores
>

You likely have the 32 bit version of Python 2.6 installed. You need to 
download and install matplotlib-1.0.1.win32-py2.6.exe.

Christoph

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problems with latest Matplotlib 1.0, pyQt4 and py2exe

2011-02-14 Thread Christoph Gohlke


On 2/14/2011 12:41 PM, Stef Mientki wrote:
> Ran into the same problem,
> are there any hints to track down the problem.
>
> I tried to remove the MatPlotLib from py2exe and added MatPlatlib manual 
> afterwards,
> but still it point to the wrong directory.
>
> thanks,
> Stef Mientki
>
>
> On 26-12-2010 15:18, zb wrote:
>> Hi.
>>
>> First of all, I would like to thank the developers of this wonderful package.
>>
>> I started doing an app and I finally tried to compile it with py2exe. I run 
>> into some issues that I posted in the py2exe group here;
>>
>> http://sourceforge.net/mailarchive/forum.php?thread_name=ienv6p%24b42%241%40dough.gmane.org&forum_name=py2exe-users
>>
>> To make it work, I ended it up having to use an older version of matplotlib 
>> and numpy. I don't know if the developers of matplotlib are aware of these 
>> issues and I am posting here just in case they don't know.
>>
>> When I was trying to use version 1.0, I run into problems with the mpl data 
>> directory. The output of py2exe could only find the mpl-data dir at the root 
>> /dist of a drive. Then I decided to try a much earlier version of 
>> matplotlib, and I run into different set of problems. Finally, I tried 
>> matplotlib 0.99.1 and the problems went away (I didn't try version 0.99.3 
>> because its release date was too close to the version 1.0).
>>
>> I am just trying to make the developers aware of the problems and I hope to 
>> use newer versions in the future.
>>
>> Thanks for your attention
>>
>


I can not reproduce this problem with matplotlib 1.0.1, PyQt 4.8.3, 
py2exe-0.6.10dev, Python 2.7.1. The only thing I noticed is that some 
toolbar icons are not displayed.

Christoph

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with imshow

2011-02-09 Thread Christoph Gohlke



On 2/9/2011 4:29 PM, Benjamin Root wrote:

On Wed, Feb 9, 2011 at 1:50 AM, Eric Firing mailto:efir...@hawaii.edu>> wrote:

On 02/08/2011 02:39 PM, Christoph Gohlke wrote:
>

>
>  Please consider the attached patch for the _image.frombyte
function. It
>  avoids temporary copies in case of non-contiguous input arrays.
Copying
>  a 1024x1024 slice out of a contiguous 4096x4096 RGBA or RGB array is
>  about 7x faster (a common case for zooming/panning). Copying
contiguous
>  RGB input arrays is ~2x faster. Tested on win32-py2.7.
>
>  Christoph
>

Thank you!

Looks good, speeds up zooming and panning on large images as advertised.
  An 8000x8000 image is actually manageable now.
interpolation='nearest' is still very slow until the image is
substantially zoomed, but everything is quite quick with other
interpolation styles.  The slowness of 'nearest' looks like a basic
characteristic of the implementation.

I committed the patch in 8966.

Before that I found and committed a big speed-up in Normalize.

Eric


Bug Report:

At some point between the recent revision and r8934, setting the alpha
value to anythhing but None will cause the image to not show.  I suspect
it has something to do with some of the recent revisions.  Maybe the
alpha values were being converted into an integer, causing them to be
zero?  Then again, even setting alpha to 1 will cause the image to
disappear.

Ideas?  Thoughts?  I included an example script below.

Ben Root


Example script:


import numpy as np
import matplotlib.pyplot as plt

z = np.random.random((40, 50))

fig = plt.figure()
ax = fig.add_subplot(1, 2, 1)
ax.imshow(z, alpha=1.0)
ax.set_title('Blank!')

ax = fig.add_subplot(1, 2, 2)
ax.imshow(z, alpha=None)
ax.set_title("Not Blank")



plt.show()






This should fix it:

Index: lib/matplotlib/colors.py
===
--- lib/matplotlib/colors.py(revision 8967)
+++ lib/matplotlib/colors.py(working copy)
@@ -49,6 +49,7 @@
 'chartreuse' are supported.
 """
 import re
+import math
 import numpy as np
 from numpy import ma
 import matplotlib.cbook as cbook
@@ -547,6 +548,8 @@
 if alpha is not None:
 alpha = min(alpha, 1.0) # alpha must be between 0 and 1
 alpha = max(alpha, 0.0)
+if bytes:
+alpha = int(math.floor(alpha*255.999))
 if (lut[-1] == 0).all():
 lut[:-1, -1] = alpha
 # All zeros is taken as a flag for the default bad


Christoph
Index: lib/matplotlib/colors.py
===
--- lib/matplotlib/colors.py(revision 8967)
+++ lib/matplotlib/colors.py(working copy)
@@ -49,6 +49,7 @@
 'chartreuse' are supported.
 """
 import re
+import math
 import numpy as np
 from numpy import ma
 import matplotlib.cbook as cbook
@@ -547,6 +548,8 @@
 if alpha is not None:
 alpha = min(alpha, 1.0) # alpha must be between 0 and 1
 alpha = max(alpha, 0.0)
+if bytes:
+alpha = int(math.floor(alpha*255.999))
 if (lut[-1] == 0).all():
 lut[:-1, -1] = alpha
 # All zeros is taken as a flag for the default bad
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with imshow

2011-02-08 Thread Christoph Gohlke



On 2/5/2011 1:02 PM, Eric Firing wrote:

On 02/04/2011 02:03 PM, Christoph Gohlke wrote:
[...]


How about these changes to color.py (attached). This avoids copies, uses
in-place operations, and calculates single precision when normalizing
small integer and float32 arrays. Similar could be done for LogNorm. Do
masked arrays support in-place operations?

Christoph


Christoph,

Thank you.

Done (with slight modifications) in 8946 (trunk).

I was surprised by the speedup in normalizing large arrays when using
float32 versus float64.  A factor of 10 on my machine with (1000,1000),
timed with ipython %timeit.  Because of the way %timeit does multiple
tests, I suspect it may exaggerate cache effects.

Eric



Please consider the attached patch for the _image.frombyte function. It 
avoids temporary copies in case of non-contiguous input arrays. Copying 
a 1024x1024 slice out of a contiguous 4096x4096 RGBA or RGB array is 
about 7x faster (a common case for zooming/panning). Copying contiguous 
RGB input arrays is ~2x faster. Tested on win32-py2.7.


Christoph
Index: _image.cpp
===
--- _image.cpp  (revision 8964)
+++ _image.cpp  (working copy)
@@ -1083,7 +1083,7 @@
 Py::Object x = args[0];
 int isoutput = Py::Int(args[1]);
 
-PyArrayObject *A = (PyArrayObject *) PyArray_ContiguousFromObject(x.ptr(), 
PyArray_UBYTE, 3, 3);
+PyArrayObject *A = (PyArrayObject *) PyArray_FromObject(x.ptr(), 
PyArray_UBYTE, 3, 3);
 if (A == NULL)
 {
 throw Py::ValueError("Array must have 3 dimensions");
@@ -1102,35 +1102,86 @@
 
 agg::int8u *arrbuf;
 agg::int8u *buffer;
+agg::int8u *dstbuf;
 
 arrbuf = reinterpret_cast(A->data);
 
 size_t NUMBYTES(imo->colsIn * imo->rowsIn * imo->BPP);
-buffer = new agg::int8u[NUMBYTES];
+buffer = dstbuf = new agg::int8u[NUMBYTES];
 
 if (buffer == NULL) //todo: also handle allocation throw
 {
 throw Py::MemoryError("_image_module::frombyte could not allocate 
memory");
 }
 
-const size_t N = imo->rowsIn * imo->colsIn * imo->BPP;
-size_t i = 0;
-if (A->dimensions[2] == 4)
+if PyArray_ISCONTIGUOUS(A)
 {
-memmove(buffer, arrbuf, N);
+if (A->dimensions[2] == 4)
+{
+memmove(dstbuf, arrbuf, imo->rowsIn * imo->colsIn * 4);
+}
+else
+{
+size_t i = imo->rowsIn * imo->colsIn;
+while (i--)
+{
+*dstbuf++ = *arrbuf++;
+*dstbuf++ = *arrbuf++;
+*dstbuf++ = *arrbuf++;
+*dstbuf++ = 255;
+}
+}
 }
+else if ((A->strides[1] == 4) && (A->strides[2] == 1))
+{
+const size_t N = imo->colsIn * 4;
+const size_t stride = A->strides[0];
+for (size_t rownum = 0; rownum < imo->rowsIn; rownum++)
+{
+memmove(dstbuf, arrbuf, N);
+arrbuf += stride;
+dstbuf += N;
+}
+}
+else if ((A->strides[1] == 3) && (A->strides[2] == 1))
+{
+const size_t stride = A->strides[0] - imo->colsIn * 3;
+for (size_t rownum = 0; rownum < imo->rowsIn; rownum++)
+{
+for (size_t colnum = 0; colnum < imo->colsIn; colnum++)
+{
+*dstbuf++ = *arrbuf++;
+*dstbuf++ = *arrbuf++;
+*dstbuf++ = *arrbuf++;
+*dstbuf++ = 255;
+}
+arrbuf += stride;
+}
+}
 else
 {
-while (i < N)
+PyArrayIterObject *iter;
+iter = (PyArrayIterObject *)PyArray_IterNew((PyObject *)A);
+if (A->dimensions[2] == 4)
 {
-memmove(buffer, arrbuf, 3);
-buffer += 3;
-arrbuf += 3;
-*buffer++ = 255;
-i += 4;
+while (iter->index < iter->size) {
+*dstbuf++ = *((unsigned char *)iter->dataptr);
+PyArray_ITER_NEXT(iter);
+}
 }
-buffer -= N;
-arrbuf -= imo->rowsIn * imo->colsIn;
+else
+{
+while (iter->index < iter->size) {
+*dstbuf++ = *((unsigned char *)iter->dataptr);
+PyArray_ITER_NEXT(iter);
+*dstbuf++ = *((unsigned char *)iter->dataptr);
+PyArray_ITER_NEXT(iter);
+*dstbuf++ = *((unsigned char *)iter->dataptr);
+PyArray_ITER_NEXT(iter);
+*dstbuf++ = 255;
+}
+}
+Py_DECREF(iter);
 }
 
 if (isoutput)
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find an

Re: [Matplotlib-users] Trouble with imshow

2011-02-04 Thread Christoph Gohlke



On 2/4/2011 3:29 PM, Eric Firing wrote:

On 02/04/2011 12:33 PM, Christoph Gohlke wrote:



On 2/4/2011 2:14 PM, Eric Firing wrote:

On 02/04/2011 11:33 AM, Eric Firing wrote:

On 02/04/2011 10:28 AM, Christoph Gohlke wrote:



On 2/4/2011 11:54 AM, Eric Firing wrote:

On 02/03/2011 05:35 PM, Christoph Gohlke wrote:



On 2/3/2011 6:50 PM, Eric Firing wrote:

On 02/03/2011 03:04 PM, Benjamin Root wrote:


Also, not to sound too annoying, but has anyone considered the idea of
using compressed arrays for holding those rgba values?


I don't see how that really helps; as far as I know, a full rgba array
has to be passed into agg. What *does* help is using uint8 from start
to finish. It might also be possible to use some smart downsampling
before generating the rgba array, but the uint8 route seems to me the
first thing to attack.

Eric



Ben Root




Please review the attached patch. It avoids generating and storing
float64 rgba arrays and uses uint8 rgba instead. That's a huge memory
saving and also faster. I can't see any side effects as
_image.fromarray() converts the float64 input to uint8 anyway.


Christoph,

Thank you!  I haven't found anything wrong with that delightfully simple
patch, so I have committed it to the trunk.  Back in 2007 I added the
ability of colormapping to generate uint8 directly, precisely to enable
this sort of optimization.  Why it was not already being used in imshow,
I don't know--maybe I was going to do it, got sidetracked, and never
finished.

I suspect it won't be as simple as for the plain image, but there may be
opportunities for optimizing with uint8 in other image-like operations.



So far other attempts to optimize memory usage were thwarted by
matplotlib's internal use of masked arrays. As mentioned before, users
can provide their own normalized rgba arrays to avoid all this processing.



Did you see other potential low-hanging fruit that might be harvested
with some changes to the code associated with masked arrays?

Eric



The norm function currently converts the data to double precision
floating point and also creates temporary arrays that can be avoided.
For float32 and low precision integer images this seems overkill and one
could use float32. It might be possible to replace the norm function
with numpy.digitize if that works with masked arrays. Last, the
_image.frombyte function does a copy of 'strided arrays' (only relevant
when zooming/panning large images). I try to provide a patch for each.


masked arrays can be filled to create an ndarray before passing to
digitize; whether that will be faster, remains to be seen.  I've never
used digitize.


I didn't say that ("can be filled...") right.  I think one would need to
use the mask to put in the i_bad index where appropriate.  np.ma does
not have a digitize function.  I suspect it won't help much if at all in
Normalize, but it would be a natural for use in BoundaryNorm.

It looks easy to allow Normalize.__call__ to use float32 if that is what
it receives.

I don't see any unnecessary temporary array creation apart from the
conversion to float64, except for the generation of a masked array
regardless of input.  I don't think this costs much; if it gets an
ndarray it does not copy it, and it does not generate a full mask array.
 Still, the function probably could be sped up a bit by handling
masking more explicitly instead of letting ma do the work.



In class Normalize:
   result = 0.0 * val
and
   result = (val-vmin) / (vmax-vmin)


Eric



Regarding frombyte, I suspect you can't avoid the copy; the data
structure being passed to agg is just a string of bytes, as far as I can
see, so everything is based on having a simple contiguous array.



The PyArray_ContiguousFromObject call will return a copy if the input
array is not already contiguous.


Exactly.  I thought you were suggesting that this was not needed, but
maybe I misunderstood.

Eric


In fact I am suggesting that this is not needed. The copy-to-agg routine 
could be made 'stride aware' and use PyArray_FromObject. Not a very low 
hanging fruit but it seems fromarray() does this already. I'm not sure 
it's worth.


How about these changes to color.py (attached). This avoids copies, uses 
in-place operations, and calculates single precision when normalizing 
small integer and float32 arrays. Similar could be done for LogNorm. Do 
masked arrays support in-place operations?


Christoph

Index: colors.py
===
--- colors.py   (revision 8944)
+++ colors.py   (working copy)
@@ -514,15 +514,17 @@
 xma = ma.array(X, copy=True)
 xa = xma.filled(0)
 mask_bad = ma.getmask(xma)
+del xma
 if xa.dtype.char in np.typecodes['Float']:
 np.putmask(xa, xa==1.0, 0.999) #Treat 1.0 as slightly less 
than 1.
   

Re: [Matplotlib-users] Trouble with imshow

2011-02-04 Thread Christoph Gohlke


On 2/4/2011 2:14 PM, Eric Firing wrote:
> On 02/04/2011 11:33 AM, Eric Firing wrote:
>> On 02/04/2011 10:28 AM, Christoph Gohlke wrote:
>>>
>>>
>>> On 2/4/2011 11:54 AM, Eric Firing wrote:
>>>> On 02/03/2011 05:35 PM, Christoph Gohlke wrote:
>>>>>
>>>>>
>>>>> On 2/3/2011 6:50 PM, Eric Firing wrote:
>>>>>> On 02/03/2011 03:04 PM, Benjamin Root wrote:
>>>>>>
>>>>>>> Also, not to sound too annoying, but has anyone considered the idea of
>>>>>>> using compressed arrays for holding those rgba values?
>>>>>>
>>>>>> I don't see how that really helps; as far as I know, a full rgba array
>>>>>> has to be passed into agg. What *does* help is using uint8 from start
>>>>>> to finish. It might also be possible to use some smart downsampling
>>>>>> before generating the rgba array, but the uint8 route seems to me the
>>>>>> first thing to attack.
>>>>>>
>>>>>> Eric
>>>>>>
>>>>>>>
>>>>>>> Ben Root
>>>>>>
>>>>>
>>>>> Please review the attached patch. It avoids generating and storing
>>>>> float64 rgba arrays and uses uint8 rgba instead. That's a huge memory
>>>>> saving and also faster. I can't see any side effects as
>>>>> _image.fromarray() converts the float64 input to uint8 anyway.
>>>>
>>>> Christoph,
>>>>
>>>> Thank you!  I haven't found anything wrong with that delightfully simple
>>>> patch, so I have committed it to the trunk.  Back in 2007 I added the
>>>> ability of colormapping to generate uint8 directly, precisely to enable
>>>> this sort of optimization.  Why it was not already being used in imshow,
>>>> I don't know--maybe I was going to do it, got sidetracked, and never
>>>> finished.
>>>>
>>>> I suspect it won't be as simple as for the plain image, but there may be
>>>> opportunities for optimizing with uint8 in other image-like operations.
>>>>
>>>>>
>>>>> So far other attempts to optimize memory usage were thwarted by
>>>>> matplotlib's internal use of masked arrays. As mentioned before, users
>>>>> can provide their own normalized rgba arrays to avoid all this processing.
>>>>>
>>>>
>>>> Did you see other potential low-hanging fruit that might be harvested
>>>> with some changes to the code associated with masked arrays?
>>>>
>>>> Eric
>>>>
>>>
>>> The norm function currently converts the data to double precision
>>> floating point and also creates temporary arrays that can be avoided.
>>> For float32 and low precision integer images this seems overkill and one
>>> could use float32. It might be possible to replace the norm function
>>> with numpy.digitize if that works with masked arrays. Last, the
>>> _image.frombyte function does a copy of 'strided arrays' (only relevant
>>> when zooming/panning large images). I try to provide a patch for each.
>>
>> masked arrays can be filled to create an ndarray before passing to
>> digitize; whether that will be faster, remains to be seen.  I've never
>> used digitize.
>
> I didn't say that ("can be filled...") right.  I think one would need to
> use the mask to put in the i_bad index where appropriate.  np.ma does
> not have a digitize function.  I suspect it won't help much if at all in
> Normalize, but it would be a natural for use in BoundaryNorm.
>
> It looks easy to allow Normalize.__call__ to use float32 if that is what
> it receives.
>
> I don't see any unnecessary temporary array creation apart from the
> conversion to float64, except for the generation of a masked array
> regardless of input.  I don't think this costs much; if it gets an
> ndarray it does not copy it, and it does not generate a full mask array.
>Still, the function probably could be sped up a bit by handling
> masking more explicitly instead of letting ma do the work.
>

In class Normalize:
 result = 0.0 * val
and
 result = (val-vmin) / (vmax-vmin)

> Eric
>
>>
>> Regarding frombyte, I suspect you can't avoid the copy; the data
>> structure being passed to agg is just a string of bytes, as far as I can
>> see, so everything is based on having a simple contiguous array.
>>

The PyArray_ContiguousFromObject call will return a copy if the input 
array is not already contiguous.

Christoph

--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with imshow

2011-02-04 Thread Christoph Gohlke


On 2/4/2011 11:54 AM, Eric Firing wrote:
> On 02/03/2011 05:35 PM, Christoph Gohlke wrote:
>>
>>
>> On 2/3/2011 6:50 PM, Eric Firing wrote:
>>> On 02/03/2011 03:04 PM, Benjamin Root wrote:
>>>
>>>> Also, not to sound too annoying, but has anyone considered the idea of
>>>> using compressed arrays for holding those rgba values?
>>>
>>> I don't see how that really helps; as far as I know, a full rgba array
>>> has to be passed into agg. What *does* help is using uint8 from start
>>> to finish. It might also be possible to use some smart downsampling
>>> before generating the rgba array, but the uint8 route seems to me the
>>> first thing to attack.
>>>
>>> Eric
>>>
>>>>
>>>> Ben Root
>>>
>>
>> Please review the attached patch. It avoids generating and storing
>> float64 rgba arrays and uses uint8 rgba instead. That's a huge memory
>> saving and also faster. I can't see any side effects as
>> _image.fromarray() converts the float64 input to uint8 anyway.
>
> Christoph,
>
> Thank you!  I haven't found anything wrong with that delightfully simple
> patch, so I have committed it to the trunk.  Back in 2007 I added the
> ability of colormapping to generate uint8 directly, precisely to enable
> this sort of optimization.  Why it was not already being used in imshow,
> I don't know--maybe I was going to do it, got sidetracked, and never
> finished.
>
> I suspect it won't be as simple as for the plain image, but there may be
> opportunities for optimizing with uint8 in other image-like operations.
>
>>
>> So far other attempts to optimize memory usage were thwarted by
>> matplotlib's internal use of masked arrays. As mentioned before, users
>> can provide their own normalized rgba arrays to avoid all this processing.
>>
>
> Did you see other potential low-hanging fruit that might be harvested
> with some changes to the code associated with masked arrays?
>
> Eric
>

The norm function currently converts the data to double precision 
floating point and also creates temporary arrays that can be avoided. 
For float32 and low precision integer images this seems overkill and one 
could use float32. It might be possible to replace the norm function 
with numpy.digitize if that works with masked arrays. Last, the 
_image.frombyte function does a copy of 'strided arrays' (only relevant 
when zooming/panning large images). I try to provide a patch for each.

Christoph

--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with imshow

2011-02-03 Thread Christoph Gohlke



On 2/3/2011 6:50 PM, Eric Firing wrote:

On 02/03/2011 03:04 PM, Benjamin Root wrote:


Also, not to sound too annoying, but has anyone considered the idea of
using compressed arrays for holding those rgba values?


I don't see how that really helps; as far as I know, a full rgba array
has to be passed into agg.  What *does* help is using uint8 from start
to finish.  It might also be possible to use some smart downsampling
before generating the rgba array, but the uint8 route seems to me the
first thing to attack.

Eric



Ben Root




Please review the attached patch. It avoids generating and storing 
float64 rgba arrays and uses uint8 rgba instead. That's a huge memory 
saving and also faster. I can't see any side effects as 
_image.fromarray() converts the float64 input to uint8 anyway.


So far other attempts to optimize memory usage were thwarted by 
matplotlib's internal use of masked arrays. As mentioned before, users 
can provide their own normalized rgba arrays to avoid all this processing.


Christoph
Index: image.py
===
--- image.py(revision 8944)
+++ image.py(working copy)
@@ -198,11 +198,11 @@
 im.is_grayscale = False
 else:
 if self._rgbacache is None:
-x = self.to_rgba(self._A, self._alpha)
+x = self.to_rgba(self._A, self._alpha, True)
 self._rgbacache = x
 else:
 x = self._rgbacache
-im = _image.fromarray(x[yslice,xslice], 0)
+im = _image.frombyte(x[yslice,xslice,:], 0)
 if len(self._A.shape) == 2:
 im.is_grayscale = self.cmap.is_gray()
 else:
--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with imshow

2011-02-03 Thread Christoph Gohlke


On 2/3/2011 3:13 PM, Eric Firing wrote:
> On 02/03/2011 01:02 PM, Christoph Gohlke wrote:
>>
>>
>> On 2/3/2011 2:44 PM, Eric Firing wrote:
>>> On 02/03/2011 12:28 PM, Christoph Gohlke wrote:
>>>>
>>>>
>>>> On 2/3/2011 2:15 PM, Eric Firing wrote:
>>>>> On 02/03/2011 11:30 AM, Robert Abiad wrote:
>>>>>> On 2/3/2011 10:06 AM, Eric Firing wrote:
>>>>>>> On 02/02/2011 10:17 PM, Eric Firing wrote:
>>>>>>>> On 02/02/2011 08:38 PM, Robert Abiad wrote:
>>>>>>>>>
>>>>>>>> [...]
>>>>>>>>> I'll put it in as an enhancement, but I'm still unsure if there is a
>>>>>>>>> bug in
>>>>>>>>> there as well. Is there something I should be doing to clear memory
>>>>>>>>> after the
>>>>>>>>> first figure is closed other than close()? I don't understand why
>>>>>>>>> memory usage
>>>>>>>>> grows each time I replot, but I'm pretty sure it isn't desireable
>>>>>>>>> behavior. As
>>>>>>>>> I mentioned, this effect is worse with plot.
>>>>>>>>>
>>>>>>>>> So is this a bug or improper usage?
>>>>>>>>
>>>>>>>> I'm not quite sure, but I don't think there is a specifically
>>>>>>>> matplotlib
>>>>>>>> memory leak bug at work here. Are you using ipython, and if so, have
>>>>>>>> you
>>>>>>>> turned off the caching? In its default mode, ipython keeps lots of
>>>>>>>> references, thereby keeping memory in use. Also, memory management and
>>>>>>>> reporting can be a bit tricky and misleading.
>>>>>>>>
>>>>>>>> Nevertheless, the attached script may be illustrating the problem. Try
>>>>>>>> running it from the command line as-is (maybe shorten the loop--it
>>>>>>>> doesn't take 100 iterations to show the pattern) and then commenting
>>>>>>>> out
>>>>>>>> the line as indicated in the comment. It seems that if anything is done
>>>>>>>> that adds ever so slightly to memory use while the figure is displayed,
>>>>>>>> then when the figure is closed, its memory is not reused. I'm puzzled.
>>>>>>>
>>>>>>> I wasn't thinking straight--there is no mystery and no memory leak.
>>>>>>> Ignore my example script referred to above. It was saving rows of the z
>>>>>>> array, not single elements as I had intended, so of course memory use
>>>>>>> was growing substantially.
>>>>>>>
>>>>>>> Eric
>>>>>>>
>>>>>>
>>>>>> You may not see a memory leak, but I still can't get my memory back
>>>>>> without killing python. I
>>>>>> turned off the ipython caching and even ran without iPython on both
>>>>>> Windows and Ubuntu, but when I
>>>>>> use imshow(), followed by close('all') and another imshow(), I run out
>>>>>> of memory. I can see from
>>>>>> the OS that the memory does not come back after close() and that it
>>>>>> grows after the second imshow().
>>>>>>
>>>>>> Any other ideas? Looks like a bug to me otherwise.
>>>>>
>>>>> Except that I tried the same things and did not get quite the same
>>>>> result. Let's track this down. Please try the attached script, and see
>>>>> if the memory usage grows substantially, or just oscillates a bit.
>>>>>
>>>>> Eric
>>>>>
>>>>
>>>>
>>>> One thing I noticed is that if I add a "def __del__(self): print 'del'"
>>>> to image._AxesImageBase, it never gets called. _AxesImageBase keeps
>>>> float64 and uint8 rgba images in a cache, which is never freed.
>>>
>>> Adding a __del__ method defeats (or blocks) the garbage collection.
>>>
>>
>> Sorry, never heard of that. I thought __del__() is called when the
>> reference count reaches 0.
>
> It is, but if there are circular reference chains (cycles--and mpl is
>

Re: [Matplotlib-users] Trouble with imshow

2011-02-03 Thread Christoph Gohlke


On 2/3/2011 2:44 PM, Eric Firing wrote:
> On 02/03/2011 12:28 PM, Christoph Gohlke wrote:
>>
>>
>> On 2/3/2011 2:15 PM, Eric Firing wrote:
>>> On 02/03/2011 11:30 AM, Robert Abiad wrote:
>>>> On 2/3/2011 10:06 AM, Eric Firing wrote:
>>>>> On 02/02/2011 10:17 PM, Eric Firing wrote:
>>>>>> On 02/02/2011 08:38 PM, Robert Abiad wrote:
>>>>>>>
>>>>>> [...]
>>>>>>> I'll put it in as an enhancement, but I'm still unsure if there is a
>>>>>>> bug in
>>>>>>> there as well. Is there something I should be doing to clear memory
>>>>>>> after the
>>>>>>> first figure is closed other than close()? I don't understand why
>>>>>>> memory usage
>>>>>>> grows each time I replot, but I'm pretty sure it isn't desireable
>>>>>>> behavior. As
>>>>>>> I mentioned, this effect is worse with plot.
>>>>>>>
>>>>>>> So is this a bug or improper usage?
>>>>>>
>>>>>> I'm not quite sure, but I don't think there is a specifically
>>>>>> matplotlib
>>>>>> memory leak bug at work here. Are you using ipython, and if so, have
>>>>>> you
>>>>>> turned off the caching? In its default mode, ipython keeps lots of
>>>>>> references, thereby keeping memory in use. Also, memory management and
>>>>>> reporting can be a bit tricky and misleading.
>>>>>>
>>>>>> Nevertheless, the attached script may be illustrating the problem. Try
>>>>>> running it from the command line as-is (maybe shorten the loop--it
>>>>>> doesn't take 100 iterations to show the pattern) and then commenting
>>>>>> out
>>>>>> the line as indicated in the comment. It seems that if anything is done
>>>>>> that adds ever so slightly to memory use while the figure is displayed,
>>>>>> then when the figure is closed, its memory is not reused. I'm puzzled.
>>>>>
>>>>> I wasn't thinking straight--there is no mystery and no memory leak.
>>>>> Ignore my example script referred to above. It was saving rows of the z
>>>>> array, not single elements as I had intended, so of course memory use
>>>>> was growing substantially.
>>>>>
>>>>> Eric
>>>>>
>>>>
>>>> You may not see a memory leak, but I still can't get my memory back
>>>> without killing python. I
>>>> turned off the ipython caching and even ran without iPython on both
>>>> Windows and Ubuntu, but when I
>>>> use imshow(), followed by close('all') and another imshow(), I run out
>>>> of memory. I can see from
>>>> the OS that the memory does not come back after close() and that it
>>>> grows after the second imshow().
>>>>
>>>> Any other ideas? Looks like a bug to me otherwise.
>>>
>>> Except that I tried the same things and did not get quite the same
>>> result. Let's track this down. Please try the attached script, and see
>>> if the memory usage grows substantially, or just oscillates a bit.
>>>
>>> Eric
>>>
>>
>>
>> One thing I noticed is that if I add a "def __del__(self): print 'del'"
>> to image._AxesImageBase, it never gets called. _AxesImageBase keeps
>> float64 and uint8 rgba images in a cache, which is never freed.
>
> Adding a __del__ method defeats (or blocks) the garbage collection.
>

Sorry, never heard of that. I thought __del__() is called when the 
reference count reaches 0.

Christoph

> Since self._imcache is an instance attribute, when the instance is no
> longer referenced, it should get garbage-collected, provided there is no
> __del__ method.
>
> Eric
>
>>
>> Christoph
>>
>>
>> --
>> The modern datacenter depends on network connectivity to access resources
>> and provide services. The best practices for maximizing a physical server's
>> connectivity to a physical network are well understood - see how these
>> rules translate into the virtual world?
>> http://p.sf.net/sfu/oracle-sfdevnlfb
>> ___
>> Matplotlib-users mailing list
>> Matpl

Re: [Matplotlib-users] Trouble with imshow

2011-02-03 Thread Christoph Gohlke


On 2/3/2011 2:15 PM, Eric Firing wrote:
> On 02/03/2011 11:30 AM, Robert Abiad wrote:
>> On 2/3/2011 10:06 AM, Eric Firing wrote:
>>> On 02/02/2011 10:17 PM, Eric Firing wrote:
 On 02/02/2011 08:38 PM, Robert Abiad wrote:
>
 [...]
> I'll put it in as an enhancement, but I'm still unsure if there is a
> bug in
> there as well. Is there something I should be doing to clear memory
> after the
> first figure is closed other than close()? I don't understand why
> memory usage
> grows each time I replot, but I'm pretty sure it isn't desireable
> behavior. As
> I mentioned, this effect is worse with plot.
>
> So is this a bug or improper usage?

 I'm not quite sure, but I don't think there is a specifically
 matplotlib
 memory leak bug at work here. Are you using ipython, and if so, have
 you
 turned off the caching? In its default mode, ipython keeps lots of
 references, thereby keeping memory in use. Also, memory management and
 reporting can be a bit tricky and misleading.

 Nevertheless, the attached script may be illustrating the problem. Try
 running it from the command line as-is (maybe shorten the loop--it
 doesn't take 100 iterations to show the pattern) and then commenting
 out
 the line as indicated in the comment. It seems that if anything is done
 that adds ever so slightly to memory use while the figure is displayed,
 then when the figure is closed, its memory is not reused. I'm puzzled.
>>>
>>> I wasn't thinking straight--there is no mystery and no memory leak.
>>> Ignore my example script referred to above. It was saving rows of the z
>>> array, not single elements as I had intended, so of course memory use
>>> was growing substantially.
>>>
>>> Eric
>>>
>>
>> You may not see a memory leak, but I still can't get my memory back
>> without killing python. I
>> turned off the ipython caching and even ran without iPython on both
>> Windows and Ubuntu, but when I
>> use imshow(), followed by close('all') and another imshow(), I run out
>> of memory. I can see from
>> the OS that the memory does not come back after close() and that it
>> grows after the second imshow().
>>
>> Any other ideas? Looks like a bug to me otherwise.
>
> Except that I tried the same things and did not get quite the same
> result. Let's track this down. Please try the attached script, and see
> if the memory usage grows substantially, or just oscillates a bit.
>
> Eric
>


One thing I noticed is that if I add a "def __del__(self): print 'del'" 
to image._AxesImageBase, it never gets called. _AxesImageBase keeps 
float64 and uint8 rgba images in a cache, which is never freed.

Christoph


--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with imshow

2011-02-03 Thread Christoph Gohlke
As a workaround you could do your own normalization and color mapping 
and pass a uint8 RGB image to imshow. That avoids matplotlib's norm 
function. The following example saves almost 500 MB for plotting a 16 MB 
uint8 greyscale image, as compared to passing img directly to imshow:


import numpy
from matplotlib import pyplot

img = numpy.random.randint(0, 255, (4096, 4096)).astype('uint8')
lut = pyplot.cm.gray(numpy.arange(255), bytes=True)
rgb = lut.take(img, axis=0)
del img
pyplot.imshow(rgb)
pyplot.show()


Christoph


On 2/2/2011 11:00 PM, gary ruben wrote:
> Christoph, if you're looking at special casing uint8's, you might want
> to keep in mind that uint16 greyscale images are also quite common as
> camera outputs in experimental setups. I think that the solution to
> this should ideally minimise memory usage for any greyscale image, be
> it uint8, uint16, float32 or float64. i.e. avoiding conversion to RGBA
> for any single-plane 2D array type would be best IMHO,
>
> Gary R.
>
> On Thu, Feb 3, 2011 at 5:38 PM, Robert Abiad  wrote:
>>
>>
>> On 2/2/2011 6:06 PM, Eric Firing wrote:
>>> On 02/02/2011 03:08 PM, Robert Abiad wrote:
>>>> On 2/2/2011 3:59 PM, Christoph Gohlke wrote:
>>>>> On 2/2/2011 3:33 PM, Robert Abiad wrote:
>>>>>> Hello All,
>>>>>>
>>>>>> I'm very new to python, so bear with me.
>>>>>>
>>>>>> I'd like to use python to do my image processing, but I'm running into 
>>>>>> behavior that doesn't make
>>>>>> sense to me.  I'm using Windows 7 Pro (64-bit) with 4 gigs of memory, 
>>>>>> python 2.6.6, and the newest
>>>>>> versions of ipython, pyfits, matplotlib (1.0.1), numpy (1.5.1), scipy.  
>>>>>> I'm loading in a fits file
>>>>>> that's 26 MB (~16 Mpixels).  When I load my image in ImageJ, I can see 
>>>>>> memory usage go up by 50MB,
>>>>>> but when I try displaying the image using imshow(), my memory usage goes 
>>>>>> up by around 500MB, each
>>>>>> time.  If I close the figure and replot it, imshow() crashes.  I don't 
>>>>>> know if I'm doing something
>>>>>> wrong, or if it's a new or known bug.  I tried the same thing on Linux 
>>>>>> and got the same result.
>>>>>> Here's a transcript.
>>>>>>
>>>>>> Welcome to pylab, a matplotlib-based Python environment.
>>>>>> For more information, type 'help(pylab)'.
>>>>>>
>>>>>> In [1]: import pyfits
>>>>>>
>>>>>> In [2]: from Tkinter import *
>>>>>>
>>>>>> In [3]: import tkFileDialog
>>>>>>
>>>>>> In [4]: image=pyfits.getdata(tkFileDialog.askopenfilename())
>>>>>>
>>>>>> In [5]: imshow(image)
>>>>>> Out[5]:
>>>>>>
>>>>>> In [6]: close()
>>>>>>
>>>>>> In [7]: imshow(image,origin='lower')
>>>>>> Out[7]:
>>>>>>
>>>>>> In [8]: close()
>>>>>>
>>>>>> In [9]: imshow(image[100:3600,100:3600],origin='lower')
>>>>>> Out[9]:
>>>>>>
>>>>>> In [10]: Exception in Tkinter callback
>>>>>> Traceback (most recent call last):
>>>>>> File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 1410, in 
>>>>>> __call__
>>>>>>   return self.func(*args)
>>>>>> File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 495, in 
>>>>>> callit
>>>>>>   func(*args)
>>>>>> File 
>>>>>> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py",
>>>>>>  line 263, in
>>>>>> idle_draw
>>>>>>   self.draw()
>>>>>> File 
>>>>>> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py",
>>>>>>  line 248, in draw
>>>>>>   FigureCanvasAgg.draw(self)
>>>>>> File 
>>>>>> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>>>>> line 394, in draw
>>>>>>   se

Re: [Matplotlib-users] Trouble with imshow

2011-02-02 Thread Christoph Gohlke


On 2/2/2011 8:22 PM, Benjamin Root wrote:
> On Wed, Feb 2, 2011 at 8:06 PM, Eric Firing  <mailto:efir...@hawaii.edu>> wrote:
>
> On 02/02/2011 03:08 PM, Robert Abiad wrote:
> >  On 2/2/2011 3:59 PM, Christoph Gohlke wrote:
> > > On 2/2/2011 3:33 PM, Robert Abiad wrote:
> > >> Hello All,
> > >>
> > >> I'm very new to python, so bear with me.
> > >>
> > >> I'd like to use python to do my image processing, but I'm
> running into behavior that doesn't make
> > >> sense to me.  I'm using Windows 7 Pro (64-bit) with 4 gigs of
> memory, python 2.6.6, and the newest
> > >> versions of ipython, pyfits, matplotlib (1.0.1), numpy (1.5.1),
> scipy.  I'm loading in a fits file
> > >> that's 26 MB (~16 Mpixels).  When I load my image in ImageJ, I
> can see memory usage go up by 50MB,
> > >> but when I try displaying the image using imshow(), my memory
> usage goes up by around 500MB, each
> > >> time.  If I close the figure and replot it, imshow() crashes.  I
> don't know if I'm doing something
> > >> wrong, or if it's a new or known bug.  I tried the same thing on
> Linux and got the same result.
> > >> Here's a transcript.
> > >>
> > >>   Welcome to pylab, a matplotlib-based Python environment.
> > >>   For more information, type 'help(pylab)'.
> > >>
> > >> In [1]: import pyfits
> > >>
> > >> In [2]: from Tkinter import *
> > >>
> > >> In [3]: import tkFileDialog
> > >>
> > >> In [4]: image=pyfits.getdata(tkFileDialog.askopenfilename())
> > >>
> > >> In [5]: imshow(image)
> > >> Out[5]:
> > >>
> > >> In [6]: close()
> > >>
> > >> In [7]: imshow(image,origin='lower')
> > >> Out[7]:
> > >>
> > >> In [8]: close()
> > >>
> > >> In [9]: imshow(image[100:3600,100:3600],origin='lower')
> > >> Out[9]:
> > >>
> > >> In [10]: Exception in Tkinter callback
> > >> Traceback (most recent call last):
> > >>   File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 1410,
> in __call__
> > >> return self.func(*args)
> > >>   File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 495,
> in callit
> > >> func(*args)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 263, in
> > >> idle_draw
> > >> self.draw()
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 248, in draw
> > >> FigureCanvasAgg.draw(self)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 394, in draw
> > >> self.figure.draw(self.renderer)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55,
> in draw_wrapper
> > >> draw(artist, renderer, *args, **kwargs)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\figure.py", line 798,
> in draw
> > >> func(*args)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55,
> in draw_wrapper
> > >> draw(artist, renderer, *args, **kwargs)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\axes.py", line 1946,
> in draw
> > >> a.draw(renderer)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55,
> in draw_wrapper
> > >> draw(artist, renderer, *args, **kwargs)
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 354,
> in draw
> > >> im = self.make_image(renderer.get_image_magnification())
> > >>   File
> "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 569,
> in make_image

Re: [Matplotlib-users] Trouble with imshow

2011-02-02 Thread Christoph Gohlke



On 2/2/2011 6:06 PM, Eric Firing wrote:

On 02/02/2011 03:08 PM, Robert Abiad wrote:

On 2/2/2011 3:59 PM, Christoph Gohlke wrote:

On 2/2/2011 3:33 PM, Robert Abiad wrote:

Hello All,

I'm very new to python, so bear with me.

I'd like to use python to do my image processing, but I'm running into behavior 
that doesn't make
sense to me.  I'm using Windows 7 Pro (64-bit) with 4 gigs of memory, python 
2.6.6, and the newest
versions of ipython, pyfits, matplotlib (1.0.1), numpy (1.5.1), scipy.  I'm 
loading in a fits file
that's 26 MB (~16 Mpixels).  When I load my image in ImageJ, I can see memory 
usage go up by 50MB,
but when I try displaying the image using imshow(), my memory usage goes up by 
around 500MB, each
time.  If I close the figure and replot it, imshow() crashes.  I don't know if 
I'm doing something
wrong, or if it's a new or known bug.  I tried the same thing on Linux and got 
the same result.
Here's a transcript.

   Welcome to pylab, a matplotlib-based Python environment.
   For more information, type 'help(pylab)'.

In [1]: import pyfits

In [2]: from Tkinter import *

In [3]: import tkFileDialog

In [4]: image=pyfits.getdata(tkFileDialog.askopenfilename())

In [5]: imshow(image)
Out[5]:

In [6]: close()

In [7]: imshow(image,origin='lower')
Out[7]:

In [8]: close()

In [9]: imshow(image[100:3600,100:3600],origin='lower')
Out[9]:

In [10]: Exception in Tkinter callback
Traceback (most recent call last):
   File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 1410, in __call__
 return self.func(*args)
   File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 495, in callit
 func(*args)
   File 
"C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 
263, in
idle_draw
 self.draw()
   File 
"C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 
248, in draw
 FigureCanvasAgg.draw(self)
   File 
"C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_agg.py", line 
394, in draw
 self.figure.draw(self.renderer)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55, 
in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\figure.py", line 
798, in draw
 func(*args)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55, 
in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\axes.py", line 1946, 
in draw
 a.draw(renderer)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55, 
in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 354, 
in draw
 im = self.make_image(renderer.get_image_magnification())
   File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 569, 
in make_image
 transformed_viewLim)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 201, 
in _get_unsampled_image
 x = self.to_rgba(self._A, self._alpha)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\cm.py", line 193, in 
to_rgba
 x = self.norm(x)
   File "C:\app\Python2.6\lib\site-packages\matplotlib\colors.py", line 
820, in __call__
 result = (val-vmin) / (vmax-vmin)
   File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 3673, 
in __div__
 return divide(self, other)
   File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 1077, 
in __call__
 m |= filled(domain(da, db), True)
   File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 772, in 
__call__
 return umath.absolute(a) * self.tolerance>= umath.absolute(b)
MemoryError


Thanks for any help,
-robert




These are previous discussions on the issue:

<http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg14727.html>
<http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg19815.html>
<http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg19614.html>

Christoph



The first 2 discussions lead to suggestions of more memory on a 64-bit 
installation, but that
doesn't seem like a great solution.  I use other image processing software 
(ImageJ and IDL) and
neither has any trouble with my images.  As I mentioned ImageJ uses 1/10th the 
memory for the same
display, or about 1 byte of memory for 1 byte of image.  I think matplotlib 
should aim for the same.
I also think it should free up memory when the image is closed, but maybe 
I'm not doing th

Re: [Matplotlib-users] Trouble with imshow

2011-02-02 Thread Christoph Gohlke


On 2/2/2011 5:08 PM, Robert Abiad wrote:
> On 2/2/2011 3:59 PM, Christoph Gohlke wrote:
>> On 2/2/2011 3:33 PM, Robert Abiad wrote:
>>> Hello All,
>>>
>>> I'm very new to python, so bear with me.
>>>
>>> I'd like to use python to do my image processing, but I'm running into 
>>> behavior that doesn't make
>>> sense to me.  I'm using Windows 7 Pro (64-bit) with 4 gigs of memory, 
>>> python 2.6.6, and the newest
>>> versions of ipython, pyfits, matplotlib (1.0.1), numpy (1.5.1), scipy.  I'm 
>>> loading in a fits file
>>> that's 26 MB (~16 Mpixels).  When I load my image in ImageJ, I can see 
>>> memory usage go up by 50MB,
>>> but when I try displaying the image using imshow(), my memory usage goes up 
>>> by around 500MB, each
>>> time.  If I close the figure and replot it, imshow() crashes.  I don't know 
>>> if I'm doing something
>>> wrong, or if it's a new or known bug.  I tried the same thing on Linux and 
>>> got the same result.
>>> Here's a transcript.
>>>
>>>   Welcome to pylab, a matplotlib-based Python environment.
>>>   For more information, type 'help(pylab)'.
>>>
>>> In [1]: import pyfits
>>>
>>> In [2]: from Tkinter import *
>>>
>>> In [3]: import tkFileDialog
>>>
>>> In [4]: image=pyfits.getdata(tkFileDialog.askopenfilename())
>>>
>>> In [5]: imshow(image)
>>> Out[5]:
>>>
>>> In [6]: close()
>>>
>>> In [7]: imshow(image,origin='lower')
>>> Out[7]:
>>>
>>> In [8]: close()
>>>
>>> In [9]: imshow(image[100:3600,100:3600],origin='lower')
>>> Out[9]:
>>>
>>> In [10]: Exception in Tkinter callback
>>> Traceback (most recent call last):
>>>   File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 1410, in __call__
>>> return self.func(*args)
>>>   File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 495, in callit
>>> func(*args)
>>>   File 
>>> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
>>> line 263, in
>>> idle_draw
>>> self.draw()
>>>   File 
>>> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
>>> line 248, in draw
>>> FigureCanvasAgg.draw(self)
>>>   File 
>>> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>> line 394, in draw
>>> self.figure.draw(self.renderer)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 
>>> 55, in draw_wrapper
>>> draw(artist, renderer, *args, **kwargs)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\figure.py", line 
>>> 798, in draw
>>> func(*args)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 
>>> 55, in draw_wrapper
>>> draw(artist, renderer, *args, **kwargs)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\axes.py", line 
>>> 1946, in draw
>>> a.draw(renderer)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 
>>> 55, in draw_wrapper
>>> draw(artist, renderer, *args, **kwargs)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 
>>> 354, in draw
>>> im = self.make_image(renderer.get_image_magnification())
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 
>>> 569, in make_image
>>> transformed_viewLim)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 
>>> 201, in _get_unsampled_image
>>> x = self.to_rgba(self._A, self._alpha)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\cm.py", line 193, 
>>> in to_rgba
>>> x = self.norm(x)
>>>   File "C:\app\Python2.6\lib\site-packages\matplotlib\colors.py", line 
>>> 820, in __call__
>>> result = (val-vmin) / (vmax-vmin)
>>>   File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 
>>> 3673, in __div__
>>> return divide(self, other)
>>>   File &

Re: [Matplotlib-users] Trouble with imshow

2011-02-02 Thread Christoph Gohlke
On 2/2/2011 3:33 PM, Robert Abiad wrote:
> Hello All,
>
> I'm very new to python, so bear with me.
>
> I'd like to use python to do my image processing, but I'm running into 
> behavior that doesn't make
> sense to me.  I'm using Windows 7 Pro (64-bit) with 4 gigs of memory, python 
> 2.6.6, and the newest
> versions of ipython, pyfits, matplotlib (1.0.1), numpy (1.5.1), scipy.  I'm 
> loading in a fits file
> that's 26 MB (~16 Mpixels).  When I load my image in ImageJ, I can see memory 
> usage go up by 50MB,
> but when I try displaying the image using imshow(), my memory usage goes up 
> by around 500MB, each
> time.  If I close the figure and replot it, imshow() crashes.  I don't know 
> if I'm doing something
> wrong, or if it's a new or known bug.  I tried the same thing on Linux and 
> got the same result.
> Here's a transcript.
>
> Welcome to pylab, a matplotlib-based Python environment.
> For more information, type 'help(pylab)'.
>
> In [1]: import pyfits
>
> In [2]: from Tkinter import *
>
> In [3]: import tkFileDialog
>
> In [4]: image=pyfits.getdata(tkFileDialog.askopenfilename())
>
> In [5]: imshow(image)
> Out[5]:
>
> In [6]: close()
>
> In [7]: imshow(image,origin='lower')
> Out[7]:
>
> In [8]: close()
>
> In [9]: imshow(image[100:3600,100:3600],origin='lower')
> Out[9]:
>
> In [10]: Exception in Tkinter callback
> Traceback (most recent call last):
> File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 1410, in __call__
>   return self.func(*args)
> File "C:\app\Python2.6\lib\lib-tk\Tkinter.py", line 495, in callit
>   func(*args)
> File 
> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
> line 263, in
> idle_draw
>   self.draw()
> File 
> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
> line 248, in draw
>   FigureCanvasAgg.draw(self)
> File 
> "C:\app\Python2.6\lib\site-packages\matplotlib\backends\backend_agg.py", line 
> 394, in draw
>   self.figure.draw(self.renderer)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55, 
> in draw_wrapper
>   draw(artist, renderer, *args, **kwargs)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\figure.py", line 798, 
> in draw
>   func(*args)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55, 
> in draw_wrapper
>   draw(artist, renderer, *args, **kwargs)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\axes.py", line 1946, 
> in draw
>   a.draw(renderer)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\artist.py", line 55, 
> in draw_wrapper
>   draw(artist, renderer, *args, **kwargs)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 354, 
> in draw
>   im = self.make_image(renderer.get_image_magnification())
> File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 569, 
> in make_image
>   transformed_viewLim)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\image.py", line 201, 
> in _get_unsampled_image
>   x = self.to_rgba(self._A, self._alpha)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\cm.py", line 193, in 
> to_rgba
>   x = self.norm(x)
> File "C:\app\Python2.6\lib\site-packages\matplotlib\colors.py", line 820, 
> in __call__
>   result = (val-vmin) / (vmax-vmin)
> File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 3673, in 
> __div__
>   return divide(self, other)
> File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 1077, in 
> __call__
>   m |= filled(domain(da, db), True)
> File "C:\app\Python2.6\lib\site-packages\numpy\ma\core.py", line 772, in 
> __call__
>   return umath.absolute(a) * self.tolerance>= umath.absolute(b)
> MemoryError
>
>
> Thanks for any help,
> -robert
>


These are previous discussions on the issue:





Christoph

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Req: Matplotlib compatibility problem - help please!

2011-01-20 Thread Christoph Gohlke
Try the solution proposed at 


Christoph


On 1/20/2011 2:42 PM, David Williams wrote:
> Hi folks
>
> I am teaching myself Python by working
> through Hans Petter Langtangen's
> excellent book "Primer on Scientific
> Programming in Python".
>
> The exercises in chapter 4 of the book
> require the student to use Python with
> the freely downloadable tools
> MatplotLib and SciTools to plot graphs
> of mathematical functions.
>
> Despite downloading and installing
> numerous different versions of Python
> 2.x, MatPlotLib and SciTools, I am
> unable to find a combination which
> will work together without crashing.
>
> I'm currently using a Windows XP
> laptop with:
> Python 2.6.6
> IDLE 2.6.6
> MatplotLib 0.99,3 win32 Py2.6
> Scitools from
> scipy-0.80-win32-superpack-python 2.6
>
> When I try to run a simple script to
> test the plotting functions, I get the
> error messages attached below.
>
> I don't want to use Python 3, as there
> still seem to be some teething
> problems with this, and many of the
> modules that I've already written or
> need to use are not compatible with
> Python 3.x.
>
> I've emailed the author, but have not
> yet had a reply.
>
> I'd be very grateful if you could
> explain why I get the error messages
> shown below, what is a compatible
> combination of versions of Python 2.x,
> MatPlotLib and Scitools; and the URL
> of sites where I can download these.
>
> Many thanks in anticipation
>
>
> Dave
> (UK)
>
> =
> Test script:
>
>  1. from scitools.std import *
>  2.
>  3. def f(t):
>  4. return t**2*exp(-t**2)
>  5.
>  6. t = linspace(0,3,51)
>  7. y = zeros(len(t))
>  8. for i in xrange(len(t)):
>  9. y[i] = f(t[i])
> 10.
> 11. plot(t,y)
> 12.
> 13.
>
> ===
>

> scitools.easyviz backend is matplotlib
>
> Traceback (most recent call last):
> File "C:\Python\Dave_Book
> Exercises\4_3_2 Plot test_DW.py", line
> 11, in
> plot(t,y)
> File
> "C:\Python26\lib\site-packages\scitools\easyviz\common.py",
> line 3060, in plot
> self._replot()
> File
> "C:\Python26\lib\site-packages\scitools\easyviz\matplotlib_.py",
> line 906, in _replot
> self._g.draw()
> File
> "C:\Python26\lib\site-packages\matplotlib\pyplot.py",
> line 352, in draw
> get_current_fig_manager().canvas.draw()
> File
> "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 215, in draw
> FigureCanvasAgg.draw(self)
> File
> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 314, in draw
> self.figure.draw(self.renderer)
> File
> "C:\Python26\lib\site-packages\matplotlib\artist.py",
> line 46, in draw_wrapper
> draw(artist, renderer, *args,
> **kwargs)
> File
> "C:\Python26\lib\site-packages\matplotlib\figure.py",
> line 773, in draw
> for a in self.axes: a.draw(renderer)
> File
> "C:\Python26\lib\site-packages\matplotlib\artist.py",
> line 46, in draw_wrapper
> draw(artist, renderer, *args,
> **kwargs)
> File
> "C:\Python26\lib\site-packages\matplotlib\axes.py",
> line 1735, in draw
> a.draw(renderer)
> File
> "C:\Python26\lib\site-packages\matplotlib\artist.py",
> line 46, in draw_wrapper
> draw(artist, renderer, *args,
> **kwargs)
> File
> "C:\Python26\lib\site-packages\matplotlib\axis.py",
> line 742, in draw
> tick.draw(renderer)
> File
> "C:\Python26\lib\site-packages\matplotlib\artist.py",
> line 46, in draw_wrapper
> draw(artist, renderer, *args,
> **kwargs)
> File
> "C:\Python26\lib\site-packages\matplotlib\axis.py",
> line 196, in draw
> self.label1.draw(renderer)
> File
> "C:\Python26\lib\site-packages\matplotlib\text.py",
> line 518, in draw
> bbox, info =
> self._get_layout(renderer)
> File
> "C:\Python26\lib\site-packages\matplotlib\text.py",
> line 280, in _get_layout
> clean_line, self._fontproperties,
> ismath=ismath)
> File
> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 148, in
> get_text_width_height_descent
> texmanager = self.get_texmanager()
> File
> "C:\Python26\lib\site-packages\matplotlib\backend_bases.py",
> line 374, in get_texmanager
> from matplotlib.texmanager import
> TexManager
> File
> "C:\Python26\lib\site-packages\matplotlib\texmanager.py",
> line 72, in
> class TexManager:
> File
> "C:\Python26\lib\site-packages\matplotlib\texmanager.py",
> line 94, in TexManager
> _dvipng_hack_alpha =
> dvipng_hack_alpha()
> File
> "C:\Python26\lib\site-packages\matplotlib\texmanager.py",
> line 68, in dvipng_hack_alpha
> raise RuntimeError('Could not obtain
> dvipng version')
> RuntimeError: Could not obtain dvipng
> version

>
> --
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> February 28th, 

Re: [Matplotlib-users] MemoryError with import matplotlib

2011-01-14 Thread Christoph Gohlke
The zeros(...) statement needs a contiguous block of > 800 MB RAM and 
the conversion another contiguous block of > 400 MB. Memory allocated 
during the matplotlib import statement could easily fragment the 
available memory such that no 800 + 400 MB blocks exist. Try monitoring 
your memory usage and import matplotlib after allocating/converting the 
array. Anyway, you'll be better off using a 64 bit system if you deal 
with such amount of data.

Christoph

On 1/14/2011 12:17 PM, sprobst wrote:
>
> Dear Christoph,
>
> It is not a memory problem, because before the programm starts I have more
> than 1.3 GB free memory left. And on the other hand it depends on the import
> line! There seems to be some interference of the packages. My Python version
> is 2.6 (needed by another programm), perhaps that also makes the difference.
>
> But thank you for the quick answer!
>Stefan
>

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] MemoryError with import matplotlib

2011-01-14 Thread Christoph Gohlke
Works for me on Windows 7 64 bit with 32 bit Python. I believe you 
simply run out of memory. On a 32 bit Windows OS, Python can only use 2 
GB, which it has to share with other all processes. 
zeros((300,300,300,4),dtype=float64) requires ~820MB of contiguous 
memory, which might not be available even if you have >1 GB free RAM. 
Better use a 64 bit OS and Python.

Christoph

On 1/14/2011 11:40 AM, sprobst wrote:
>
> Hi all,
>
> I tried to plot parts of a large 3D array with each 4 float64 entries.
> Loading the array with numpy.fromfile and performing a type conversion
> afterwards ends up in a MemoryError.
>
> The following code reproduces the error:
> ***
> import gc
>
> from os import path
> from numpy import zeros, empty, float32, float64, fromfile
>
> # With the imports of the next three lines a memory error occurs
> #import matplotlib
> #matplotlib.use("AGG")
> #import matplotlib.pylab as plt
>
> _filename = "mt.dat"
>
> if (path.exists(_filename)==False):
>   print "Write file ..."
>   _mtf = file(_filename, "wb")
>   _mtd = zeros( (300,300,300,4),dtype=float64)
>   _mtd.tofile(_mtf)
>   _mtf.close()
>   
>   _mtd = empty((0))
>   gc.collect();
>
> print "Try to read file ..."
>
> _mtf = file(_filename, "rb")
> # The memory error occurs with the type conversion to float 64,
> # but only if mathplotlib is imported!
> _mtd = fromfile(_mtf,float64).astype(float32)
> _mtf.close()
>
> print "Successful read:",_mtd.shape
>
> # Here some plot stuff would be :)
> ***
>
> If the import of matplotlib is not included, no error occures otherwise it
> will not work. Perhaps anybody can help me (I tested it only on a Windows XP
> 32Bit).
>
>   Best regards and thank you
>Stefan

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] new 1.0.1 and py2exe build fails

2011-01-06 Thread Christoph Gohlke
Please post a minimal script that fails and details about your setup. I 
do not have any problem with mpl 1.0.1 and py2exe.

Christoph

On 1/6/2011 4:48 PM, zb wrote:
> Hi
>
> I decided to give a quick try to 1.0.1 and py2exe and see what happens. When 
> I try to start the compiled exe program I get this error log:
>
> Traceback (most recent call last):
>File "artisan.pyw", line 122, in
>File "zipextimporter.pyo", line 82, in load_module
>File "matplotlib\figure.pyo", line 18, in
>File "zipextimporter.pyo", line 82, in load_module
>File "matplotlib\axes.pyo", line 332, in
>File "matplotlib\axes.pyo", line 2014, in Axes
>File "matplotlib\docstring.pyo", line 103, in dedent_interpd
>File "matplotlib\docstring.pyo", line 36, in __call__
> KeyError: 'Line2D'
>
>
> It seems as if I did not include something important in the setup.py.
>
>
> How could I modify the setup.py file to make it work?
>
>
> Thanks for any suggestions.
>
>
> #  setup.py  
>
>
> from distutils.core import setup
> import matplotlib as mpl
> import py2exe
>
> INCLUDES = [
>  "sip",
>  "serial"
>  ]
>
> EXCLUDES = ['_tkagg',
>  '_ps',
>  '_fltkagg',
>  'Tkinter',
>  'Tkconstants',
>  '_cairo',
>  '_gtk',
>  'gtkcairo',
>  'pydoc',
>  'sqlite3',
>  'bsddb',
>  'curses',
>  'tcl',
>  '_wxagg',
>  '_gtagg',
>  '_cocoaagg',
>  '_wx']
>
> setup(
>  windows=[{"script" : "E:\\Artisan\\artisan\\trunk\\artisan.pyw"}],
>  data_files = mpl.get_py2exe_datafiles(),
>  zipfile = None,
>  options={"py2exe" :{
>  "packages": ['matplotlib','pytz'],
>  "compressed": True,
>  "unbuffered": True,
>  "optimize":1,
>  "bundle_files": 1,
>  "dll_excludes":[
>  'tcl84.dll','tk84.dll','libgdk-win32-2.0-0.dll',
>  
> 'libgdk_pixbuf-2.0-0.dll','libgobject-2.0-0.dll'],
>  "includes" : INCLUDES,
>  "excludes" : EXCLUDES}
>   }
>  )
>
>
>
>
>
>
>
> --
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Python 3

2010-12-23 Thread Christoph Gohlke


On 12/23/2010 1:01 PM, Robert Young wrote:
> Hi, I have used Matplotlib extensively now for 2 years with python 2.x.
> I recently needed to move to python 3.1 which was greatly facilitated by
> numpy and scipy being ported to python 3. I was lucky in that all I have
> to change is many print statements. All on a Windows OS.
>
> But my progress is severely limited by having no port of Matplotlib to
> python 3. I am definitely a user so have contributed twice to Matplotlib
> development.
>
> Plea: If the stars align properly, I would be so grateful for a port of
> matplotlib to python 3.
>
> Thanks for hearing me.
>

Did you try the py3k branch at 
? It 
does work for simple plots.

--
Christoph

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] help requested

2010-12-17 Thread Christoph Gohlke
Unofficial matplotlib binaries for Python 2.7 for Windows are available 
at .

Christoph

On 12/11/2010 11:55 PM, Abdul Rasheed wrote:
> hi all
> i am new to networkx and Matplotlib. I downloaded networkx1.3 under
> python 2.7.1 for windows xp. when i tried to install matplotlib, it
> requires python 2.6 only. What shall i do in this situation? kindly
> suggest me to have successful installation of matplotlib. Awaiting for
> your replies. thanking you in advance.
>
> */With Warm Wishes and Regards / *
> 
> A. Abdul Rasheed, M.C.A., M.E., Ph.D.,
> Assistant Professor,
> Department of Computer Applications,
> Valliammai Engineering College,
> SRM Nagar, Kattankulathur - 603 203.
> Kancheepuram District. Tamil Nadu. INDIA.
> Contact: 91 - 44 - 27454784 Ext: 451 (O) / 996 23 000 55
>
>

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib Windows binaries - problem

2010-11-26 Thread Christoph Gohlke


On 11/26/2010 2:28 AM, Fred Pollard wrote:
> Hi,
> I'm trying to install matplotlib on a windows machine at work to try and
> demonstrate its usefulness.  I have Python 2.6 installed and managed to
> use the numpy binary install without admin priviledges.
> The matplotlib binary installer, however, requires admin priviledges,
> and I don't understand why - is an alternative installer available,
> because otherwise, I'll have to drop matplotlib and Python for somethign
> else, as IT will take a month or two to install it for me.
> I know I could build it myself, but the same restrictions are causing
> problems getting the pre-requisites installed!
> Cheers,
> Fred
>
>

The matplotlib installers for Windows are executable ZIP files generated 
by Python's builtin distutils package with the 
--user-access-control=auto option. See the following links for previous 
discussions and a workaround for your problem.





Christoph

--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Cygwin Install

2010-08-28 Thread Christoph Gohlke


On 8/27/2010 10:13 PM, Adam Gustafson wrote:
> I found a web page in which someone has done the horrible task of
> figuring out how the hell you compile in Cygwin.  Details below:
>
> http://innuendopoly.org/arch/matplotlib-cygwin
>
> In short, the Cygwin compile runs into TONS of errors as is, and it
> seems the matplotlib developers aren't really supporting it.  Trying
> their techniques to see if it works, but so far looking good
>

What a friendly message... Matplotlib builds and works fine on cygwin 
when disabling the tkagg backend in setup.cfg.

--
Christoph

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] DLL load failed

2010-08-16 Thread Christoph Gohlke


On 8/15/2010 2:06 PM, Paweł Roman wrote:
> Hi,
>
> I have matplotlib 1.0 for python 2.5 (installed from
> matplotlib-1.0.0.win32-py2.5.exe
> ).
> I'm using windows7 64 bit. When I try to import anything, e.g.
>
> from matplotlib.figure import Figure
>
> I'm getting this error:
>
> Traceback (most recent call last):
>File "", line 1, in 
>File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 16,
> in >
>  import artist
>File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 6, in
> 
>
>  from transforms import Bbox, IdentityTransform, TransformedBbox,
> Transformed
> Path
>File "C:\Python25\Lib\site-packages\matplotlib\transforms.py", line
> 34, in  dule>
>  from matplotlib._path import affine_transform
> ImportError: DLL load failed: The specified module could not be found.
>
> When I run this code in python interpreter, I get another clue: windows
> (?) displays the following message in the popup window: The program
> can't start because MSVCP71.dll is missing from your computer. Try
> reinstalling the program to fix this problem.
>
> I have another computer with windows XP 32 bit and it works fine from
> there. I know about other computer with 32 bit system where it also
> works without problems. I've found a ticket in a bug tracker from 2008
> with identical error but no replies. I've downloaded this MSVCP71.dll
> from the internet and put it in windows\system32 but it didnt help
> (still the same error). Seems like the problem with 64 bit windows. But
> is it only me? Can anyone help me with this?
>
> Thanks
>
> Paweł
>

Try to place MSVCP71.dll in C:\Windows\SysWOW64. Windows\system32 is for 
64 bit files only on a 64 bit Windows OS.

--
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-11 Thread Christoph Gohlke
Again, please post a complete script that can reproduce the problem. 
Since you do not need a GUI did you try to use the Agg backend?

Christoph



On 8/11/2010 2:31 PM, stetrick wrote:
>
> I removed and reinstalled everything, and I'm still getting it.
>
> I am using the multiprocessing lib.  Each process then produces a graph with
> matplotlib, which is only done with Savefig (never interactively displaced
> during the creation process).   I have nothing special in the configuration
> - just using the 64-bit windows defaults.
>
> Probably some setup thing.
>
>
> Christoph Gohlke wrote:
>>
>>
>>
>>
>>>> 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
>>
>>
>

--
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] show() blocks script execution for TkAgg from ipython -pylab

2010-08-11 Thread Christoph Gohlke
Ryan: you could try matplotlib-1.0.0.svn.win32-py2.6.exe from 
http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib .It was built this 
morning from svn.

Christoph

On 8/11/2010 7:26 AM, Ryan Krauss wrote:
> 0.99.3 is more or less fine, but there is an annoying exception window
> that pops up if you close IPython with a plot window open (using the
> TkAgg backend).  But in my mind this is less bothersome than having to
> close all the plot windows every time I run a script (I tend to write
> scripts that generate 5-10 plots at a minimum).
>
> If I could easily build an installer from svn, I would try it.  I
> don't have any microsoft compilers installed on my windows computers.
>
> Thanks again,
>
> Ryan
>
> On Wed, Aug 11, 2010 at 9:09 AM, Ryan Krauss  wrote:
>> Thanks.
>>
>> I need to role out a python install for my students.  Classes start in
>> a week and a half.  What should I do?  The installation for most of
>> them needs to be fairly simple.
>>
>> Thanks,
>>
>> Ryan
>>
>> On Wed, Aug 11, 2010 at 2:25 AM, Eric Firing  wrote:
>>> On 08/10/2010 05:43 PM, Ryan Krauss wrote:
 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?
>>>
>>> This was fixed three weeks ago in svn, both the maintenance branch and
>>> the trunk.  I made some changes in show() shortly before 1.0, trying to
>>> get uniform and reasonable behavior in all backends, and I didn't quite
>>> succeed.  I think I got it all straightened out--but only after the
>>> release, unfortunately.  I hope it won't be too long before a 1.0.1
>>> bugfix release can be made, but I am aware of no schedule.
>>>
>>> Eric
>>>

 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] 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
>> <http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg15342.html>
>>
>> --
>> 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 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 
<http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg15342.html>

--
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 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] where to find python eggs for matplotlib 1.0.0?

2010-07-17 Thread Christoph Gohlke
The matplotlib installers for Windows are built with the 
user-access-control=auto option. Otherwise they would not work correctly 
with UAC on Windows Vista and 7. See also 
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg13466.html.
 


I can provide eggs for the next release.

Python bdist_wininst installers are valid ZIP files. You can open 
matplotlib-1.0.0.win32-py2.6.exe with a ZIP program, e.g. WinRAR, and 
extract the directories/files found under PLATLIB into 
C:\Python26\Lib\site-packages.

Christoph


On 7/17/2010 4:14 AM, Pavlo Shchelokovskyy wrote:
> Hi all,
> on my workplace I use matplotlib in restricted Windows environment.
> Since couple of versions matplotlib Windows installer needs elevated
> user privileges to work (why?), but installation from Python eggs was
> working just fine. However I can not find any eggs for latest
> matplotlib, and those on PyPI are for previous release, i.e. 0.99.3.
> So can somebody point me to Python eggs for matplotlib on Python 2.6
> under Windows? Or how can I build one, for example from working
> installation of matplotlib 1.0.0 on the identical platform?
>
> Best regards,
> Pavlo Shchelokovskyy
>

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Where is the widgets ...???

2010-07-11 Thread Christoph Gohlke
Again, please post a complete free-standing example that replicates the 
problem, otherwise we can not help you. The binaries you are using are 
as close to any later official binaries as possible at this point and 
they pass all the example tests for the agg, cairo, and pdf backends.

Christoph


On 7/11/2010 12:12 PM, Ademir Francisco da Silva wrote:
>Em 11/07/2010 13:56, John Hunter escreveu:
>> On Sun, Jul 11, 2010 at 11:15 AM, Ademir Francisco da Silva
>>> Case closed. Finally I find it..., but for my success I have taken off the
>>> #  of the  #interactive  : False  on the line #37 from this file
>>> matplotlib\\mpl-data\\matplotlibrc  and everything works fine now.
>> I don't think this flag will affect whether or nor widgets is
>> imported.  Are you sure you haven't made some other changes?
>>
>>> But I have another important question for all of you..., recently I have
>>> changed my Python's version from 2.6.5 to 2.7 and since I did it my
>>> widgets.Cursor and widgets.Button do not work, so anyone have a idea about
>>> this behavior to tell me, please ???
>>>
>>> Further information ...
>>> My code is the same and before it works fine but now it just not works ...,
>>> just take a look in the excerpt of my code below ...
>>>
>>> widgets.Cursor( axe, useblit = True, color = self.cor[ 477 ][ 1 ], lw = 2 )
>>> widgets.Button( pyplot.axes( [ .91, .1, .08, .06 ] ), self.textName[ 19 ],
>>>  color = self.cor[ 403 ][ 1 ], hovercolor = 
>>> self.cor[
>>> 46 ][ 1 ] ).\
>>>  on_clicked( self.button_12Click )
>>>
>>> How may I fix it, please ???
>> Did you compile matplotlib for python2.7 yourself -- we haven't
>> released any binaries yet for that version.  Can you paste a complete
>> free-standing example that replicates the problem as wee as the output
>> of your script on your system when you pass in the --verbose-helpful
>> flag?
>>
>> JDH
>>
>>
> Hi John ...,
>
> I am just take that binarie from this internet address
> http://www.lfd.uci.edu/~gohlke/pythonlibs/
> H..., so I was wondering that the problem is it and I will have to
> wait for the official version of the matplotlib binaries for the Python
> 2.7( win64 ). Sucks...!
> I hope to have that binaries asap and after the installation of it I
> will verify if that problem continues.
>
> anyway I really enjoyed your prompt aid ..., Thanks.
>
>
> Cheers,
>
>
> --
> Ademir Francisco da Silva
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 1.0 and Python 2.7

2010-07-06 Thread Christoph Gohlke


On 7/6/2010 9:40 PM, David Grudoski wrote:
> Can I install Matplotlib 1.0 for Python 2.7?
> And will it work?
> Thanks
>

Matplotlib 1.0 works well with Python 2.7. However, no official version 
of NumPy has been released for Python 2.7 yet. NumPy 1.4.1 is not quite 
compatible with Python 2.7 and numpy 2.0.dev is a moving target. That's 
why there are no official installers of matplotlib for Python 2.7 yet.

You can try install NumPy 2.0.dev and matplotlib 1.0 from sources as 
described in  and 
. If you are 
using Windows, experimental installers for Python 2.7 can be found at 
.

--Christoph

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] two enhancements for mpl 1.0

2010-07-02 Thread Christoph Gohlke

Hello,

may I suggest two enhancements for the upcoming matplotlib 1.0 release.

The first is related to bug #3011650 and fix r8379.
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=revision&revision=8379

Texmanager.py, which is imported during the import of matplotlib, does 
call subprocess.Popen('dvipng'...) on every import. This can 
significantly add to the startup time of scripts. Given that most 
scripts don't use TeX, can the Popen() call be deferred to runtime?  On 
my system (Python 2.6 for Windows, mpl 1.0rc1, MiKTeX 2.8) the 
'backend_driver.py agg' tests are run about 8% (20s) faster with the 
following patch.


Index: lib/matplotlib/texmanager.py
===
--- lib/matplotlib/texmanager.py(revision 8481)
+++ lib/matplotlib/texmanager.py(working copy)
@@ -91,7 +91,7 @@
 if not os.path.exists(texcache):
 os.mkdir(texcache)

-_dvipng_hack_alpha = dvipng_hack_alpha()
+_dvipng_hack_alpha = None

 # mappable cache of
 rgba_arrayd = {}
@@ -516,6 +516,8 @@
 if rcParams['text.dvipnghack'] is not None:
 hack = rcParams['text.dvipnghack']
 else:
+if self._dvipng_hack_alpha is None:
+self._dvipng_hack_alpha = dvipng_hack_alpha()
 hack = self._dvipng_hack_alpha

 if hack:


The second enhancement, a quick fix for placing images of extreme aspect 
ratio, is to allow 'panchor' and 'fraction' arguments in colorbar().

http://sourceforge.net/tracker/?func=detail&aid=3016948&group_id=80706&atid=560723

Thanks,

Christoph
Index: lib/matplotlib/texmanager.py
===
--- lib/matplotlib/texmanager.py(revision 8481)
+++ lib/matplotlib/texmanager.py(working copy)
@@ -91,7 +91,7 @@
 if not os.path.exists(texcache):
 os.mkdir(texcache)

-_dvipng_hack_alpha = dvipng_hack_alpha()
+_dvipng_hack_alpha = None

 # mappable cache of
 rgba_arrayd = {}
@@ -516,6 +516,8 @@
 if rcParams['text.dvipnghack'] is not None:
 hack = rcParams['text.dvipnghack']
 else:
+if self._dvipng_hack_alpha is None:
+self._dvipng_hack_alpha = dvipng_hack_alpha()
 hack = self._dvipng_hack_alpha

 if hack:
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] basemap broken with matplotlib 0.99.3?

2010-06-25 Thread Christoph Gohlke
IIRC basemap contains Cython code, which would need to be "recythonized" 
with the latest Cython version in order to work with numpy 1.4.1. If you 
don't mind trying developer releases, use basemap 0.99.5 from 
, which should work 
with numpy 1.4.1.

Christoph


On 6/25/2010 11:21 AM, phob...@geosyntec.com wrote:
> Bill,
>
> Unfortunately, I don't have a solution for you. I just wanted to chime in and 
> say that I'm getting the same error. I'm on XP, py2.6, mpl0.99.3, np1.4.1, 
> sp0.8.0b1. Basemap came from the latest Windows binary on Sourceforge.
> -paul
>
>> -Original Message-
>> From: Bill Eaton [mailto:e...@aeroantenna.com]
>> Sent: Wednesday, June 23, 2010 8:24 AM
>> To: matplotlib-users@lists.sourceforge.net
>> Subject: [Matplotlib-users] basemap broken with matplotlib 0.99.3?
>>
>> I stumbled across a basemap demo a couple of days ago and was immediately
>> enchanted.
>>
>> I can't get it to install nicely on a Windoze box with matplotlib 0.99.3.
>> When I try the famous
>>from mpl_toolkits.basemap import Basemap
>> directive, I get
>>In [1]: from mpl_toolkits.basemap import Basemap
>> -
>> --
>> ValueErrorTraceback (most recent call
>> last)
>>
>> C:\Documents and Settings\Bill.DC1\  in()
>>
>> C:\Python26\lib\site-packages\mpl_toolkits\basemap\__init__.py in
>> ()
>>   36 from matplotlib.lines import Line2D
>>   37 from matplotlib.transforms import Bbox
>> --->  38 import pyproj, sys, os, math, dbflib
>>   39 from proj import Proj
>>   40 import numpy as np
>>
>> C:\Python26\lib\site-packages\mpl_toolkits\basemap\pyproj.py in
>> ()
>>   46 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """
>>   47
>> --->  48 from _proj import Proj as _Proj
>>   49 from _geod import Geod as _Geod
>>   50 from _proj import _transform
>>
>> C:\Documents and Settings\Bill.DC1\c_numpy.pxd in _proj
>> (src/_proj.c:3234)()
>>
>> ValueError: numpy.dtype does not appear to be the correct type object
>>
>> I tried manually installing many of the prerequisites (which should be
>> bundled) and also reinstalling MPL. But still no joy.
>>
>> On my Linux box running 0.99.0, I was able to install basemap and run one
>> of
>> the example codes. Works quite nicely.
>>
>>
>>
>>
>> -
>> -
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit.  See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> --
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Animation crashes on Windows

2010-06-24 Thread Christoph Gohlke


On 6/24/2010 9:49 AM, João Luís Silva wrote:
> Hi,
>
> This simple script will animate correctly on Linux, but will not work on
> Windows (mpl 0.99.3) and at the end will crash with a message box
> (unknown software exception (0x4015) at the location 0x1e05b62a) and
> prints to the console:
>
> Fatal Python error: PyEval_RestoreThread: NULL tstate
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
>


I can not reproduce this bug with matplotlib 1.0dev on Windows. So this 
is apparently fixed in svn trunk, probably by 

 
which is related to 


Christoph

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] Basemap r8403 and numpy 2.0

2010-06-10 Thread Christoph Gohlke


On 6/10/2010 10:14 AM, Pierre GM wrote:
> On Jun 10, 2010, at 12:51 PM, Jeff Whitaker wrote:
>> On 6/10/10 10:40 AM, Pierre GM wrote:
>>> All,
>>> Sorry, it's been a while since I've been using Basemap. I was just trying 
>>> to update my local svn directory to r8403 and reinstall basemap, but an 
>>> import fail w/ the following message:
>>> """
>>> Traceback (most recent call last):
>>>File "", line 1, in
>>>File "~/basemap-dev/lib/mpl_toolkits/basemap/__init__.py", line 43, 
>>> in
>>>  import _geoslib, netcdftime
>>>File "_geoslib.pyx", line 13, in _geoslib (src/_geoslib.c:4014)
>>> ValueError: numpy.ndarray does not appear to be the correct type object
>>> """
>>> I'm using numpy 2.0.0r8460 (development version). basemap can be 
>>> successfully imported w/ the latest stable version, though. What am I doing 
>>> wrong ?
>>> Thx in advance.
>>> P.
>>>
>>
>> Pierre:  That should have been fixed with a recompile of the _geoslib C 
>> extension  Are you sure you deleted the build directory before reinstalling 
>> basemap?
>
>
> I did. Do I have to recompile geos ? It should be independent of numpy, right 
> ? So I shouldn't have to touch it ?
> As far as I can tell, the setup picks up the proper versions of numpy and 
> Python...

Try to regenerate the c files from _geod.pyx, _proj.pyx, and 
_geoslib.pyx, using Cython-0.12.1. For example:

python -c "from Cython.Compiler.Main import main; main(command_line=1)" 
_geod.pyx

--
Christoph

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo raises ZeroDivisionError

2010-06-09 Thread Christoph Gohlke


On 6/9/2010 8:50 AM, David Goldsmith wrote:
> On Wed, Jun 9, 2010 at 12:18 AM, Christoph Gohlke  <mailto:cgoh...@uci.edu>> wrote:
>
>
> On 6/8/2010 11:25 PM, David Goldsmith wrote:
>
> On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke
> mailto:cgoh...@uci.edu>
> <mailto:cgoh...@uci.edu <mailto:cgoh...@uci.edu>>> wrote:
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> mailto:d.l.goldsm...@gmail.com>
> <mailto:d.l.goldsm...@gmail.com
> <mailto:d.l.goldsm...@gmail.com>>>  wrote:
>
> On Tue, Jun 8, 2010 at 9:52 AM, David
> Goldsmith <mailto:d.l.goldsm...@gmail.com>
> <mailto:d.l.goldsm...@gmail.com <mailto:d.l.goldsm...@gmail.com>>>
>
> wrote:
>
>
> - Forwarded message --
> From: SourceForge.net <mailto:nore...@sourceforge.net>
> <mailto:nore...@sourceforge.net <mailto:nore...@sourceforge.net>>>
> Date: Mon, Jun 7, 2010 at 6:06 AM
> Subject: [ matplotlib-Bugs-2949906 ]
> finance.quotes_historical_yahoo
> raises ZeroDivisionError
> To: nore...@sourceforge.net
> <mailto:nore...@sourceforge.net> <mailto:nore...@sourceforge.net
> <mailto:nore...@sourceforge.net>>
>
> Bugs item #2949906, was opened at 2010-02-11 13:44
> Message generated for change (Comment added)
> made by jdh2358
> You can respond by visiting:
>
> 
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> 
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>
> 
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> 
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>>
>
> Category: None
> Group: None
> Status: Closed
> Resolution: Duplicate
> Priority: 5
> Private: No
> Submitted By: David Goldsmith (olydlg)
>
> Assigned to: John Hunter (jdh2358)
>
> Summary: finance.quotes_historical_yahoo raises
> ZeroDivisionError
>
> Comment By: John Hunter (jdh2358)
>
> Date: 2010-06-07 08:06
>
> Message:
> This is fixed in svn 8392.  Look for it in the
> upcoming
> release.  Please
> test from svn if you are able
>
> 
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>
> Thanks for the report,
> JDH
>
> Hi, John, etc.  I checked-out current revision
> (8396 I
> believe), tried to
> build using python setup.py build, got error:
> Unable to
> find vcvarsall.bat.
> Googled, determined that it was something I'm
> supposed
> to get w/ a VC
> runtime, so grabbed the most recent version
> (VC2010 or
> some such),
> installed, determined that I now have a
> vcvarsall.bat
> and added it's
> location to my path, but am still getting the error.
>   Any ideas?
> Windows 7 home prem. 64 bit.  Python 2.6.  Thanks!
>
> DG
>
>
> Oh, and the error happens after building
> 'matplotlib.ft2font' extension.
> Thanks again,
>
>
> Perhaps Christoph, who builds the win32 binaries, can
> let you know
> what he does.  It's never as simple a python setup.py
> install,
> though.
>   You may want to look in the release/win32 d

Re: [Matplotlib-users] [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo raises ZeroDivisionError

2010-06-09 Thread Christoph Gohlke


On 6/8/2010 11:25 PM, David Goldsmith wrote:
> On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke  <mailto:cgoh...@uci.edu>> wrote:
>
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> mailto:d.l.goldsm...@gmail.com>>  wrote:
>
> On Tue, Jun 8, 2010 at 9:52 AM, David
> Goldsmith <mailto:d.l.goldsm...@gmail.com>>
> wrote:
>
>
> - Forwarded message --
> From: SourceForge.net <mailto:nore...@sourceforge.net>>
> Date: Mon, Jun 7, 2010 at 6:06 AM
> Subject: [ matplotlib-Bugs-2949906 ]
> finance.quotes_historical_yahoo
> raises ZeroDivisionError
> To: nore...@sourceforge.net <mailto:nore...@sourceforge.net>
>
> Bugs item #2949906, was opened at 2010-02-11 13:44
> Message generated for change (Comment added) made by jdh2358
> You can respond by visiting:
>
> 
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> 
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>
>
> Category: None
> Group: None
> Status: Closed
> Resolution: Duplicate
> Priority: 5
> Private: No
> Submitted By: David Goldsmith (olydlg)
>
> Assigned to: John Hunter (jdh2358)
>
> Summary: finance.quotes_historical_yahoo raises
> ZeroDivisionError
>
> Comment By: John Hunter (jdh2358)
>
> Date: 2010-06-07 08:06
>
> Message:
> This is fixed in svn 8392.  Look for it in the upcoming
> release.  Please
> test from svn if you are able
>
> 
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>
> Thanks for the report,
> JDH
>
> Hi, John, etc.  I checked-out current revision (8396 I
> believe), tried to
> build using python setup.py build, got error: Unable to
> find vcvarsall.bat.
> Googled, determined that it was something I'm supposed
> to get w/ a VC
> runtime, so grabbed the most recent version (VC2010 or
> some such),
> installed, determined that I now have a vcvarsall.bat
> and added it's
> location to my path, but am still getting the error.
>   Any ideas?
> Windows 7 home prem. 64 bit.  Python 2.6.  Thanks!
>
> DG
>
>
> Oh, and the error happens after building
> 'matplotlib.ft2font' extension.
> Thanks again,
>
>
> Perhaps Christoph, who builds the win32 binaries, can let you know
> what he does.  It's never as simple a python setup.py install,
> though.
>   You may want to look in the release/win32 directory at the
> README.txt
> and Makefile.
>
>
> You need Visual Studio 2008 (MSVC9) to compile extensions for Python
>  >=2.6 on Windows. "python setup.py build" works once you have built
> the prerequisites. See
> <http://matplotlib.sourceforge.net/users/installing.html>.  I link
> against the static libraries of libpng, zlib, and freetype,
>
>
> I don't already have those - where do I get them, please?
>

http://www.libpng.org/pub/png/libpng.html
http://freetype.sourceforge.net/
http://www.zlib.net/

It is best to build those libraries yourself, with exactly the same 
compiler and runtime that was used to build Python. Anything else is 
prone to crash.

--
Christoph

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo raises ZeroDivisionError

2010-06-09 Thread Christoph Gohlke


On 6/8/2010 11:10 PM, David Goldsmith wrote:
> On Tue, Jun 8, 2010 at 11:21 AM, Christoph Gohlke  <mailto:cgoh...@uci.edu>> wrote:
>
>
> On 6/8/2010 10:39 AM, John Hunter wrote:
>
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
> mailto:d.l.goldsm...@gmail.com>>  wrote:
>
> On Tue, Jun 8, 2010 at 9:52 AM, David
> Goldsmith <mailto:d.l.goldsm...@gmail.com>>
> wrote:
>
>
> - Forwarded message --
> From: SourceForge.net <mailto:nore...@sourceforge.net>>
> Date: Mon, Jun 7, 2010 at 6:06 AM
> Subject: [ matplotlib-Bugs-2949906 ]
> finance.quotes_historical_yahoo
> raises ZeroDivisionError
> To: nore...@sourceforge.net <mailto:nore...@sourceforge.net>
>
> Bugs item #2949906, was opened at 2010-02-11 13:44
> Message generated for change (Comment added) made by jdh2358
> You can respond by visiting:
>
> 
> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
> 
> <https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706>
>
> Category: None
> Group: None
> Status: Closed
> Resolution: Duplicate
> Priority: 5
> Private: No
> Submitted By: David Goldsmith (olydlg)
>
> Assigned to: John Hunter (jdh2358)
>
> Summary: finance.quotes_historical_yahoo raises
> ZeroDivisionError
>
> Comment By: John Hunter (jdh2358)
>
> Date: 2010-06-07 08:06
>
> Message:
> This is fixed in svn 8392.  Look for it in the upcoming
> release.  Please
> test from svn if you are able
>
> 
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>
> Thanks for the report,
> JDH
>
> Hi, John, etc.  I checked-out current revision (8396 I
> believe), tried to
> build using python setup.py build, got error: Unable to
> find vcvarsall.bat.
> Googled, determined that it was something I'm supposed
> to get w/ a VC
> runtime, so grabbed the most recent version (VC2010 or
> some such),
> installed, determined that I now have a vcvarsall.bat
> and added it's
> location to my path, but am still getting the error.
>   Any ideas?
> Windows 7 home prem. 64 bit.  Python 2.6.  Thanks!
>
> DG
>
>
> Oh, and the error happens after building
> 'matplotlib.ft2font' extension.
> Thanks again,
>
>
> Perhaps Christoph, who builds the win32 binaries, can let you know
> what he does.  It's never as simple a python setup.py install,
> though.
>   You may want to look in the release/win32 directory at the
> README.txt
> and Makefile.
>
>
> You need Visual Studio 2008 (MSVC9) to compile extensions for Python
>  >=2.6 on Windows. "python setup.py build" works once you have built
> the prerequisites. See
> <http://matplotlib.sourceforge.net/users/installing.html>.
>
>
> Compared to what you've written here, those instructions are incomplete
> and/or out-of-date.
>
> DG
>
>   I link against the static libraries of libpng, zlib, and freetype,
> compiled with the /MD switch. You may have to adjust your %LIB% and
> %INCLUDE% environment variables and rename the lib files in order to
> be found by the matplotlib build system.
>

The instructions on that page (reasonably) assume that the developer has 
a working Python build system and knows how to build the required 3rd 
party libraries. This is not matplotlib specific information and is 
better described in the documentation for Python and the libraries.

-- 
Christoph

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo raises ZeroDivisionError

2010-06-08 Thread Christoph Gohlke


On 6/8/2010 10:39 AM, John Hunter wrote:
> On Tue, Jun 8, 2010 at 11:53 AM, David Goldsmith
>   wrote:
>> On Tue, Jun 8, 2010 at 9:52 AM, David Goldsmith
>> wrote:
>>>
>>> - Forwarded message --
>>> From: SourceForge.net
>>> Date: Mon, Jun 7, 2010 at 6:06 AM
>>> Subject: [ matplotlib-Bugs-2949906 ] finance.quotes_historical_yahoo
>>> raises ZeroDivisionError
>>> To: nore...@sourceforge.net
>>>
>>> Bugs item #2949906, was opened at 2010-02-11 13:44
>>> Message generated for change (Comment added) made by jdh2358
>>> You can respond by visiting:
>>>
>>> https://sourceforge.net/tracker/?func=detail&atid=560720&aid=2949906&group_id=80706
>>>
>>> Category: None
>>> Group: None
>>> Status: Closed
>>> Resolution: Duplicate
>>> Priority: 5
>>> Private: No
>>> Submitted By: David Goldsmith (olydlg)
 Assigned to: John Hunter (jdh2358)
>>> Summary: finance.quotes_historical_yahoo raises ZeroDivisionError
 Comment By: John Hunter (jdh2358)
>>> Date: 2010-06-07 08:06
>>>
>>> Message:
>>> This is fixed in svn 8392.  Look for it in the upcoming release.  Please
>>> test from svn if you are able
>>>
>>> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn
>>>
>>> Thanks for the report,
>>> JDH
>>>
>>> Hi, John, etc.  I checked-out current revision (8396 I believe), tried to
>>> build using python setup.py build, got error: Unable to find vcvarsall.bat.
>>> Googled, determined that it was something I'm supposed to get w/ a VC
>>> runtime, so grabbed the most recent version (VC2010 or some such),
>>> installed, determined that I now have a vcvarsall.bat and added it's
>>> location to my path, but am still getting the error.  Any ideas?
>>> Windows 7 home prem. 64 bit.  Python 2.6.  Thanks!
>>>
>>> DG
>>
>> Oh, and the error happens after building 'matplotlib.ft2font' extension.
>> Thanks again,
>
> Perhaps Christoph, who builds the win32 binaries, can let you know
> what he does.  It's never as simple a python setup.py install, though.
>   You may want to look in the release/win32 directory at the README.txt
> and Makefile.
>

You need Visual Studio 2008 (MSVC9) to compile extensions for Python 
 >=2.6 on Windows. "python setup.py build" works once you have built the 
prerequisites. See 
.  I link 
against the static libraries of libpng, zlib, and freetype, compiled 
with the /MD switch. You may have to adjust your %LIB% and %INCLUDE% 
environment variables and rename the lib files in order to be found by 
the matplotlib build system.

-- Christoph

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] leading whitespace in text

2010-06-03 Thread Christoph Gohlke


On 6/3/2010 5:20 PM, phob...@geosyntec.com wrote:
>> -Original Message-
>> From: Christoph Gohlke [mailto:cgoh...@uci.edu]
>> Sent: Sunday, May 30, 2010 3:41 PM
>> To: matplotlib-users@lists.sourceforge.net
>> Subject: [Matplotlib-users] leading whitespace in text
>>
>> Hello,
>>
>> consider the following simple code:
>>
>> import matplotlib
>> from matplotlib import pyplot
>> pyplot.text(0, 0, "<--", family='monospace')
>> pyplot.show()
>>
>> Using matplotlib-0.99.3.win32-py2.6, the text '<--' is drawn with an
>> x-offset from the y-axis, as expected from the presence of leading
>> whitespace.
>>
>> Using matplotlib-1.0.svn.win32-py2.6 rev 8347, the leading whitespace is
>> apparently removed from the text and '<--' is drawn right at the y-axis
>> with no x-offset.
>>
>> In both cases the font is monospace.
>>
>> Is this change intended or a regression in 1.0svn?
>
> Christoph,
>
> I haven't had a chance to try this out with my machine that has MPL 1.0svn on 
> it, but is there any chance that you have mpl.rcParams['text.usetex'] = True 
> when you get the error?
>


Hi Paul,

no, usetex is not set, I made sure of that. I have traced this to a 
recent commit and opened a ticket on SF.

<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/src/ft2font.cpp?r1=7635&r2=7838>
<http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/src/ft2font.cpp?r1=7838&r2=7839>

<http://sourceforge.net/tracker/?func=detail&aid=3010045&group_id=80706&atid=560720>

-- 
Christoph

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 0.99.3 win32 py2.6 crashes on import

2010-05-31 Thread Christoph Gohlke


On 5/31/2010 7:45 PM, John Hunter wrote:
> On Mon, May 31, 2010 at 7:56 PM, Christoph Gohlke  wrote:
>
>> John: I rebuilt the 32 bit binaries for Python 2.5 and 2.6 against numpy
>> 1.3.0. They do also work with numpy 1.4.1. Please consider uploading these
>> binaries to the SF site. I also noticced that the eggs on the SF download
>> site are corrupted, showing only 1.6 KB. The updated files are at
>> <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Thanks.
>
> Hey Christoph -- I just updated the win32 binaries again.  Thanks for
> the rebuild.  The sf upload page is extremely fragile and flaky, so
> I'm not surprised a corrupted binary got uploaded.  I made sure the
> uploads completed this time -- hopefully they are now good but take a
> look.
>


looks good to me.

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 0.99.3 win32 py2.6 crashes on import

2010-05-31 Thread Christoph Gohlke


On 5/31/2010 4:53 PM, Craig McQueen wrote:
> Christoph Gohlke wrote:
>>
>> On 5/31/2010 1:53 AM, Craig McQueen wrote:
>>> I just installed matplotlib-0.99.3.win32-py2.6.exe on this Win2000 PC.
>>> When I try:
>>> from matplotlib import pyplot as plt
>>>
>>> it crashes Python with an apparent NULL-pointer reference. If I run
>>> python -v
>>>
>>> then it crashes just after:
>>> # c:\python26\lib\site-packages\matplotlib\transforms.pyc matches
>>> c:\python26\li
>>> b\site-packages\matplotlib\transforms.py
>>> import matplotlib.transforms # precompiled from
>>> c:\python26\lib\site-packages\ma
>>> tplotlib\transforms.pyc
>>>
>>> matplotlib-0.99.1.win32-py2.6.exe worked fine on this PC.
>>>
>>> Regards,
>>> Craig McQueen
>>
>>
>> I can not reproduce the crash in a Virtual Machine with Windows 2000
>> SP4, Python 2.6.5, numpy 1.4.1, and matplotlib 0.99.3.
>>
>> Exactly which versions are you using, and how did you install Python
>> (for all users?). What is your CPU?
>>
>> matplotlib-0.99.3.win32-py2.6 was built against numpy 1.4.1, libpng
>> 1.4.2 and zlib 1.2.5, while matplotlib-0.99.1.win32-py2.6 was built
>> against numpy 1.3.0, libpng 1.2.3x, and zlib 1.2.3.
>>
>> Christoph
>>
>
> Ah--installing numpy 1.4.1 fixed the issue. I had numpy 1.3.0 installed
> before that.
>
> Thanks for such a helpful response. I wasn't aware that matplotlib is
> "built against" a particular version of numpy (not quite sure what that
> means either, unless numpy provides a direct C API as well as the Python
> API; please excuse my ignorance).
>
> (To answer your questions in case that's still useful somehow... I'm
> using Windows 2000 SP4, Python 2.6.5, on a Pentium 4 PC. I installed
> Python for all users.)
>
> Thanks and regards,
> Craig McQueen
>

Yes, numpy has a C API, which is used by MPL.

I can confirm the crashes with numpy 1.3.

John: I rebuilt the 32 bit binaries for Python 2.5 and 2.6 against numpy 
1.3.0. They do also work with numpy 1.4.1. Please consider uploading 
these binaries to the SF site. I also noticced that the eggs on the SF 
download site are corrupted, showing only 1.6 KB. The updated files are 
at <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>. Thanks.

--
Christoph




--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 0.99.3 win32 py2.6 crashes on import

2010-05-31 Thread Christoph Gohlke


On 5/31/2010 1:53 AM, Craig McQueen wrote:
>   I just installed matplotlib-0.99.3.win32-py2.6.exe on this Win2000 PC.
> When I try:
>  from matplotlib import pyplot as plt
>
> it crashes Python with an apparent NULL-pointer reference. If I run
>  python -v
>
> then it crashes just after:
> # c:\python26\lib\site-packages\matplotlib\transforms.pyc matches
> c:\python26\li
> b\site-packages\matplotlib\transforms.py
> import matplotlib.transforms # precompiled from
> c:\python26\lib\site-packages\ma
> tplotlib\transforms.pyc
>
> matplotlib-0.99.1.win32-py2.6.exe worked fine on this PC.
>
> Regards,
> Craig McQueen


I can not reproduce the crash in a Virtual Machine with Windows 2000 
SP4, Python 2.6.5, numpy 1.4.1, and matplotlib 0.99.3.

Exactly which versions are you using, and how did you install Python 
(for all users?). What is your CPU?

matplotlib-0.99.3.win32-py2.6 was built against numpy 1.4.1, libpng 
1.4.2 and zlib 1.2.5, while matplotlib-0.99.1.win32-py2.6 was built 
against numpy 1.3.0, libpng 1.2.3x, and zlib 1.2.3.

Christoph

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] leading whitespace in text

2010-05-30 Thread Christoph Gohlke
Hello,

consider the following simple code:

import matplotlib
from matplotlib import pyplot
pyplot.text(0, 0, "<--", family='monospace')
pyplot.show()

Using matplotlib-0.99.3.win32-py2.6, the text '<--' is drawn with an 
x-offset from the y-axis, as expected from the presence of leading 
whitespace.

Using matplotlib-1.0.svn.win32-py2.6 rev 8347, the leading whitespace is 
apparently removed from the text and '<--' is drawn right at the y-axis 
with no x-offset.

In both cases the font is monospace.

Is this change intended or a regression in 1.0svn?

Thank you.

--
Christoph

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] py2exe and matplotlib errors when executing exe

2010-05-17 Thread Christoph Gohlke
This is probably the docstring problem mentioned at the bottom of 
.

--
Christoph

On 5/17/2010 4:07 PM, New2Python wrote:
>
> Hi All,
>
> I hope someone can help, I have run into a few problems when trying to
> execute an exe file created when I use py2exe with matplotlib.
> I have python2.5, matplotlib v0.99.1 and py2exe from GUI2Exe v0.5.0
> optimisation is python -OO
> the files compile correctly however when I execute the exe I get an error as
> shown below
> this is an extract
>
>File "matplotlib\mlab.pyo", line 380, in
> TypeError: unsupported operand type(s) for %: 'NoneType' and 'dict'
>
> the traceback points to this line of my code
>
> from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
>
> does anyone know how to solve this, i have seen references made to numpy but
> not matplotlib
>
> Regards
>
> Marco
>

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem with Basemap and Python 2.6 under Windows XP

2010-04-19 Thread Christoph Gohlke
I can not reproduce this with 32-bit Python 2.6.5, numpy 1.3.0, 
matplotlib 0.99.1 and basemap 0.99.4 on Windows 7/C2Q. However, the 
basemap 0.99.4 binary does not work with numpy 1.4.x. Depending on how 
you installed Python you might also need to install the "Microsoft 
Visual C++ 2008 redistributable package" separately. IIRC, geoslib was 
compiled with SSE2 enabled and will fail to load on older CPUs (this 
might cause the -1073741795 error). If you don't mind using developer 
versions, updated installers of matplotlib and basemap, compiled against 
numpy 1.4.1rc, are available at 
<http://www.lfd.uci.edu/~gohlke/pythonlibs/>.

-- 
Christoph Gohlke
Laboratory for Fluorescence Dynamics
University of California, Irvine


On 4/19/2010 5:11 PM, Mauro Cavalcanti wrote:
> Dear Jeff and ALL,
>
> I have recently installed Python 2.6.5 (the "official" version
> downloaded from python.org) on a Windows XP machine (running Win XP
> Professional Edition with Service Pack 2), after removing the previous
> version of the interpreter (Python 2.5) and all associated libraries
> (including the installed versions of MPL and Basemap for Python 2.5).
>
> After that, I installed Matplotlib 0.98.5.3 for Python 2.6 and Basemap
> 0.99.4 (as this is the only version with a distribution package for
> Windows compatible with Python 2.6).
>
> Then, when I tried to import Basemap, I got the following error:
>
> C:/Python26/pythonw.exe -u -i
>
> Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
> (Intel)] on win32
>
> Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import sys, os, wx
>
>>>> from mpl_toolkits.basemap import Basemap
>
> Traceback (most recent call last):
>
>File "", line 1, in
>
>File "C:\Python26\lib\site-packages\mpl_toolkits\basemap\__init__.py",
> line 43, in
>
>  import _geoslib, netcdftime
>
> ImportError: DLL load failed with error code -1073741795
>
>
> BTW, you may be musing why have I installed MPL 0.98.5 instead of the
> latest version (0.99.1). It happens that before installing the older
> version, I had indeed installed the latest version -- but in that
> case, when attempting to import Basemap, I got one of that nasty error
> reporting dialogue boxes of Win XP and Python not even issued an
> informative message!
>
> Well, from the traceback message above, it seems that the interpreter
> is not finding some required libraries, but shouldn't they be packaged
> with Basemap for Windows (as stated in the documentation)?
>
> Last, but not least, I should remark that I have never had any of
> these problems under either Python 2.5 or Python 2.4.
>
> Thanks in advance for any hints you can provide.
>
> Best regards,
>

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib 0.99.3rc1 release candidate for testing

2010-03-09 Thread Christoph Gohlke
Hey, no offense to the numpy developers! They are doing a great job and 
the Python 3 support in the numpy 2.0 release is well worth the wait. 
What I meant was that ATM there is no officially released numpy version 
that one can use to build an official win-amd64 matplotlib binary (same 
for any other scientific python package). Matplotlib works good on 64 
bit when compiled against numpy 1.4.0svn.

Christoph

On 3/9/2010 9:08 AM, John Hunter wrote:
> "Given the numpy
> 1.4.0 ABI mess, I do not think 64 bit Windows binaries should be
> released at the moment. There was supposed to be a numpy 1.4.1 release
> a month ago, but it is still not out. I can create 64 bit binaries
> with GTK/Qt/Cairo support once numpy 1.4.1/2.0 is released."

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Error build from SVN on Windows XP

2010-02-25 Thread Christoph Gohlke
You need Visual Studio 2008 (MSVC9) to compile extensions for Python 2.6 
on Windows. The Express edition should work 
.

Christoph

On 2/25/2010 3:16 PM, Ben Axelrod wrote:
>
> I am getting the same error.
>
> Here is my console output:
>
> C:\Projects\matplotlib>python setup.py build
> basedirlist is: ['win32_static']
> 
> BUILDING MATPLOTLIB
>  matplotlib: 1.0.svn
>  python: 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC
>  v.1500 32 bit (Intel)]
>platform: win32
> Windows version: (5, 1, 2600, 2, 'Service Pack 3')
>
> REQUIRED DEPENDENCIES
>   numpy: 1.4.0
>   freetype2: found, but unknown version (no pkg-config)
>  * WARNING: Could not find 'freetype2' headers in any
>  * of '.', '.\freetype2'.
>
> OPTIONAL BACKEND DEPENDENCIES
>  libpng: found, but unknown version (no pkg-config)
>  * Could not find 'libpng' headers in any of '.'
> Tkinter: no
>  * Tkinter present, but header files are not found.
>  * You may need to install development packages.
>wxPython: 2.8.10.1
>  * WxAgg extension not required for wxPython>= 2.8
>Gtk+: no
>  * Building for Gtk+ requires pygtk; you must be able
>  * to "import gtk" in your build/install environment
> Mac OS X native: no
>  Qt: no
> Qt4: no
>   Cairo: no
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>datetime: present, version unknown
>dateutil: matplotlib will provide
>pytz: 2008c
>
> OPTIONAL USETEX DEPENDENCIES
>  dvipng: file.
> ghostscript: 'gswin32c' is not recognized as an internal or
>  external command,  operable program or batch file.
>   latex: no
>
> [Edit setup.cfg to suppress the above messages]
> 
> pymods ['pylab']
> packages ['matplotlib', 'matplotlib.backends',
> 'matplotlib.backends.qt4_editor', 'matplotlib.projections',
> 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests',
> 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid',
> 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab',
> 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra',
> 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
> 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
> running build
> running build_py
> copying lib\matplotlib\mpl-data\matplotlibrc ->
> build\lib.win32-2.6\matplotlib\mpl-data
> copying lib\matplotlib\mpl-data\matplotlib.conf ->
> build\lib.win32-2.6\matplotlib\mpl-data
> running build_ext
> building 'matplotlib.ft2font' extension
> error: Unable to find vcvarsall.bat
>
> I found that I do have a vcvarsall.bat file.  it is located here:
>
> "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
>
> I thought this might be a bug in freetype2, so i downloaded the latest
> windows version from:
> http://gnuwin32.sourceforge.net/packages/freetype.htm
> with no luck.  setup.py still says it can't verify my freetype2 version.
>
> After grepping through lots of code, I found that vcvarsall.bat is only
> listed in these files:
>
> C:\Python26\Lib\distutils\msvc9compiler.py
> C:\Python26\Lib\distutils\tests\test_msvc9compiler.py
> C:\Python26\Lib\site-packages\numpy\distutils\command\config.py
> C:\Python26\Lib\site-packages\numpy\distutils\fcompiler\compaq.py
>
> And after looking at some code comments, I think this is either a bug in
> python 2.6.4, or python 2.6 requires Visual Studio 2008.  I only have Visual
> Studio 2005 installed.
>
> Any thoughts?
> Thanks,
> -Ben
>
>
> PHobson wrote:
>>
>> Whenever I try to build from source, I get an error saying that it can't
>> find vcvarsall.bat. Here are the last few lines of the output from DOS:
>> copying lib\pytz\zoneinfo\US\Pacific ->
>> build\lib.win32-2.6\pytz\zoneinfo\US
>> copying lib\pytz\zoneinfo\US\Pacific-New ->
>> build\lib.win32-2.6\pytz\zoneinfo\US
>> copying lib\pytz\zoneinfo\US\Samoa ->  build\lib.win32-2.6\pytz\zoneinfo\US
>> copying lib\dateutil\zoneinfo\zoneinfo-2008e.tar.gz ->
>> build\lib.win32-2.6\dateutil\zoneinfo
>> running build_ext
>> building 'matplotlib.ft2font' extension
>> error: Unable to find vcvarsall.bat
>>
>> Now I can't import pyplot. Any thoughts?
>>
>> Thanks,
>>
>> Paul M. Hobson
>> Senior Staff Engineer
>> --
>> Geosyntec Consultants
>> 55 SW Yamhill St, Ste 200
>> Portland, OR 97204
>> Phone: 503.222.9518
>> www.geosyntec.com


-

Re: [Matplotlib-users] py2exe message" RuntimeError: Could not find the matplotlib data files"?

2010-02-19 Thread Christoph Gohlke
 leads me to
.

- Christoph

On 2/19/2010 7:11 PM, Wayne Watson wrote:
>  OK, I'm on Win7.  From the py2exe tutorial,  I've found that  hello.exe
> works as expected by the tutorial. That file is in the dist folder.
> I've now tried this program, pylab_scatter.py:
> 
> #!/usr/bin/env python
> from pylab import *
> 
> N = 30
> x = 0.9*rand(N)
> y = 0.9*rand(N)
> area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses
> scatter(x,y,s=area, marker='^', c='r')
> 
> show()
> 
> It runs properly in IDLE.
> ==
> It appears to compile properly. Now from the cmd prompt window:
> C:\Users\Wayne\Sandia_Meteors\Sentinel_Development\Learn_Python\Py2exe_Test\dist>pylab_scatter.exe
> Traceback (most recent call last):
>   File "pylab_scatter.py", line 2, in 
>   File "pylab.pyc", line 1, in 
>   File "matplotlib\__init__.pyc", line 677, in 
>   File "matplotlib\__init__.pyc", line 598, in rc_params
>   File "matplotlib\__init__.pyc", line 552, in matplotlib_fname
>   File "matplotlib\__init__.pyc", line 242, in wrapper
>   File "matplotlib\__init__.pyc", line 482, in _get_data_path_cached
>   File "matplotlib\__init__.pyc", line 478, in _get_data_path
> RuntimeError: Could not find the matplotlib data files 
> <---What is this?
> 
> C:\Users\Wayne\Sandia_Meteors\Sentinel_Development\Learn_Python\Py2exe_Test\dist>
> ==
> I Googled this  py2exe message "RuntimeError: Could not find the
> matplotlib data files". As of yet, it does not look like a solution ia
> available for matplotlib.
> 
> -- 
> "There is nothing so annoying as to have two people 
>  talking when you're busy interrupting." -- Mark Twain
> 
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> 
> 
> 
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Christoph Gohlke
To close this thread: the PyEval_RestoreThread crash is a known bug in
the tkagg backend on Windows. See line 375 of backend_tkagg.py:

def show(self):
"""
this function doesn't segfault but causes the
PyEval_RestoreThread: NULL state bug on win32
"""

-- Christoph

On 2/9/2010 10:26 AM, Christoph Gohlke wrote:
> Change the last line to pylab.show() and it should work.
> 
> Anyway, this example should not crash the interpreter. I can reproduce
> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
> 
> The shortest example that crashes is:
> 
> python -c "import pylab;pylab.subplot(111).figure.show()"
> 
> or on the interactive prompt:
> 
>>>> import pylab
>>>> pylab.subplot(111).figure.show()
>>>> exit()
> Fatal Python error: PyEval_RestoreThread: NULL tstate
> 
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> 
> 
> -- Christoph
> 
> On 2/9/2010 7:57 AM, Lee Boger wrote:
>> > 
>> > Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
>> > came with dSPACE software package
>> > 
>> > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>> > sourceforge.net
>> > 
>> > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
>> > sourceforge.net
>> > 
>> > Executing the following simple "log plot" script within PythonWin:
>> > 
>> > *from* matplotlib *import* pylab
>> > 
>> > # Create some artificial data.
>> > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
>> > 17, 18, 19, 20]
>> > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
>> > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>> > spec_frequency = [6, 8]
>> > spec_results = [-3.0, -3.0]
>> > 
>> > # Plot
>> > figure = pylab.subplot(111)
>> > figure.semilogx()
>> > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>> > edgecolors='none')
>> > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
>> > edgecolors='none')
>> > figure.grid(True)
>> > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
>> > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
>> > 
>> > figure.figure.savefig('log_plot')
>> > figure.figure.show()
>> > 
>> > 
>> > Plots a figure on the screen that looks correct, then the following
>> > error (when I click OK, PythonWin closes)
>> > 
>> > 
>> > 
>> > Any advice would be appreciated. Maybe it's an installation or setup
>> > issue, but I'm pretty knew to Python programming and don't know how to
>> > debug this.
>> > 
>> > Lee Boger

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Christoph Gohlke
I can now reproduce this. It seems the same old problem that PythonWin
can not reliably run matplotlib because successive runs of the script
use the same interpreter. Ipython should work. Append pylab.close() to
your script; at least it will not crash on the second run.

-- Christoph

On 2/9/2010 10:44 AM, Lee Boger wrote:
> 
> Although, if I close the figure then re-run the script, a new figure
> pops up but it doesn't have any data plotted. Interpreter is now locked
> up. I'm still not fixing it completely. There is also no figure stored
> as a file log_plot.
> 
> Lee
> 
> 
> *Christoph Gohlke *
> 
> 02/09/2010 01:23 PM
> 
>   
> To
>   Lee Boger 
> cc
>   
> Subject
>   Re: [Matplotlib-users] Runtime Error - Need Advice
> 
> 
>   
> 
> 
> Caterpillar: Confidential GreenRetain Until: 03/11/2010
> 
> 
> 
> 
> Change the last line to pylab.show() and it should work.
> 
> Anyway, this example should not crash the interpreter. I can reproduce
> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
> 
> The shortest example that crashes is:
> 
> python -c "import pylab;pylab.subplot(111).figure.show()"
> 
> or on the interactive prompt:
> 
>>>> import pylab
>>>> pylab.subplot(111).figure.show()
>>>> exit()
> Fatal Python error: PyEval_RestoreThread: NULL tstate
> 
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> 
> 
> -- Christoph
> 
> On 2/9/2010 7:57 AM, Lee Boger wrote:
>>
>> Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
>> came with dSPACE software package
>>
>> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>> sourceforge.net
>>
>> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
>> sourceforge.net
>>
>> Executing the following simple "log plot" script within PythonWin:
>>
>> *from* matplotlib *import* pylab
>>
>> # Create some artificial data.
>> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
>> 17, 18, 19, 20]
>> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
>> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>> spec_frequency = [6, 8]
>> spec_results = [-3.0, -3.0]
>>
>> # Plot
>> figure = pylab.subplot(111)
>> figure.semilogx()
>> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>> edgecolors='none')
>> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
>> edgecolors='none')
>> figure.grid(True)
>> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
>> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
>>
>> figure.figure.savefig('log_plot')
>> figure.figure.show()
>>
>>
>> Plots a figure on the screen that looks correct, then the following
>> error (when I click OK, PythonWin closes)
>>
>>
>>
>> Any advice would be appreciated. Maybe it's an installation or setup
>> issue, but I'm pretty knew to Python programming and don't know how to
>> debug this.
>>
>> Lee Boger
>>
>>
>>
>> --
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the
> business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>>
>>
>>
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Christoph Gohlke
I am not sure what's going on. The script you posted imports pylab in
the first line. It should be defined. The scrit works just fine after
the proposed changes, even from Pythonwin. Did you completely quit
Pythonwin after the crashes and made sure no corrupted python instance
was left running? Please send the version string of your python
installation.

Christoph

On 2/9/2010 11:10 AM, Lee Boger wrote:
> 
> Per another suggestion, I did uninstall numpy 1.4 and installed numpy
> 1.3, but got the same results. Using pylab.savefig('log_plot) resulted
> in the following error:
> 
> Traceback (most recent call last):
>   File "C:\Program Files\Common
> Files\dSPACE\Python25\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
> line 310, in RunScript
> exec codeObject in __main__.__dict__
>   File "C:\Documents and Settings\BogerLC\My Documents\Script2.py", line
> 20, in 
> pylab.savefig('log_plot')
> NameError: name 'pylab' is not defined
> 
> Using pyplot.savefig('log_plot') does not have an error, but I still get
> no file saved. Maybe it is a "backend" thing, which I know nothing
> about. I'll look into it. Thanks.
> 
> Lee
> 
> 
> *Christoph Gohlke *
> 
> 02/09/2010 02:03 PM
> 
>   
> To
>   matplotlib-users 
> cc
>   
> Subject
>   Re: [Matplotlib-users] Runtime Error - Need Advice
> 
> 
>   
> 
> 
> Caterpillar: Confidential GreenRetain Until: 03/11/2010
> 
> 
> 
> 
> Use pylab.savefig('log_plot'). Also saving the figure to file and
> showing it interactively in the same script might involve switching
> backends, which might not work as expected.
> 
> It is advisable to downgrade to numpy 1.3.
> 
> -- Christoph
> 
> On 2/9/2010 10:44 AM, Lee Boger wrote:
>>
>> Although, if I close the figure then re-run the script, a new figure
>> pops up but it doesn't have any data plotted. Interpreter is now locked
>> up. I'm still not fixing it completely. There is also no figure stored
>> as a file log_plot.
>>
>> Lee
>>
>>
>> *Christoph Gohlke *
>>
>> 02/09/2010 01:23 PM
>>
>>  
>> To
>>  Lee Boger 
>> cc
>>  
>> Subject
>>  Re: [Matplotlib-users] Runtime Error - Need Advice
>>
>>
>>  
>>
>>
>> Caterpillar: Confidential GreenRetain Until: 03/11/2010
>>
>>
>>
>>
>> Change the last line to pylab.show() and it should work.
>>
>> Anyway, this example should not crash the interpreter. I can reproduce
>> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
>> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
>>
>> The shortest example that crashes is:
>>
>> python -c "import pylab;pylab.subplot(111).figure.show()"
>>
>> or on the interactive prompt:
>>
>>>>> import pylab
>>>>> pylab.subplot(111).figure.show()
>>>>> exit()
>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>>
>> This application has requested the Runtime to terminate it in an unusual
>> way.
>> Please contact the application's support team for more information.
>>
>>
>> -- Christoph
>>
>> On 2/9/2010 7:57 AM, Lee Boger wrote:
>>>
>>> Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
>>> came with dSPACE software package
>>>
>>> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>>> sourceforge.net
>>>
>>> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
>>> sourceforge.net
>>>
>>> Executing the following simple "log plot" script within PythonWin:
>>>
>>> *from* matplotlib *import* pylab
>>>
>>> # Create some artificial data.
>>> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
>>> 17, 18, 19, 20]
>>> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
>>> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>>> spec_frequency = [6, 8]
>>> spec_results = [-3.0, -3.0]
>>>
>>> # Plot
>>> figure = pylab.subplot(111)
>>> figure.semilogx()
>>> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>>> edgecolors='none')
>>> figure.scatter(spec_frequency, spec_results, s=40, c=

Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Christoph Gohlke
Use pylab.savefig('log_plot'). Also saving the figure to file and
showing it interactively in the same script might involve switching
backends, which might not work as expected.

It is advisable to downgrade to numpy 1.3.

-- Christoph

On 2/9/2010 10:44 AM, Lee Boger wrote:
> 
> Although, if I close the figure then re-run the script, a new figure
> pops up but it doesn't have any data plotted. Interpreter is now locked
> up. I'm still not fixing it completely. There is also no figure stored
> as a file log_plot.
> 
> Lee
> 
> 
> *Christoph Gohlke *
> 
> 02/09/2010 01:23 PM
> 
>   
> To
>   Lee Boger 
> cc
>   
> Subject
>   Re: [Matplotlib-users] Runtime Error - Need Advice
> 
> 
>   
> 
> 
> Caterpillar: Confidential GreenRetain Until: 03/11/2010
> 
> 
> 
> 
> Change the last line to pylab.show() and it should work.
> 
> Anyway, this example should not crash the interpreter. I can reproduce
> the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
> mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.
> 
> The shortest example that crashes is:
> 
> python -c "import pylab;pylab.subplot(111).figure.show()"
> 
> or on the interactive prompt:
> 
>>>> import pylab
>>>> pylab.subplot(111).figure.show()
>>>> exit()
> Fatal Python error: PyEval_RestoreThread: NULL tstate
> 
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> 
> 
> -- Christoph
> 
> On 2/9/2010 7:57 AM, Lee Boger wrote:
>>
>> Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
>> came with dSPACE software package
>>
>> Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
>> sourceforge.net
>>
>> Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
>> sourceforge.net
>>
>> Executing the following simple "log plot" script within PythonWin:
>>
>> *from* matplotlib *import* pylab
>>
>> # Create some artificial data.
>> test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
>> 17, 18, 19, 20]
>> test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
>> -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
>> spec_frequency = [6, 8]
>> spec_results = [-3.0, -3.0]
>>
>> # Plot
>> figure = pylab.subplot(111)
>> figure.semilogx()
>> figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
>> edgecolors='none')
>> figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
>> edgecolors='none')
>> figure.grid(True)
>> figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
>> figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
>>
>> figure.figure.savefig('log_plot')
>> figure.figure.show()
>>
>>
>> Plots a figure on the screen that looks correct, then the following
>> error (when I click OK, PythonWin closes)
>>
>>
>>
>> Any advice would be appreciated. Maybe it's an installation or setup
>> issue, but I'm pretty knew to Python programming and don't know how to
>> debug this.
>>
>> Lee Boger
>>
>>
>>
>> --
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the
> business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>>
>>
>>
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Christoph Gohlke
Change the last line to pylab.show() and it should work.

Anyway, this example should not crash the interpreter. I can reproduce
the crash on Python 2.4, 2.5, and 2.6 (32 and 64 bit) on Windows with
mpl 0.99.1 but not on Ubuntu 9.1 with mpl 0.99.0.

The shortest example that crashes is:

python -c "import pylab;pylab.subplot(111).figure.show()"

or on the interactive prompt:

>>> import pylab
>>> pylab.subplot(111).figure.show()
>>> exit()
Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.


-- Christoph

On 2/9/2010 7:57 AM, Lee Boger wrote:
> > 
> > Windows XP Professional with Python 2.5 installed (pywin32 build 210) -
> > came with dSPACE software package
> > 
> > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from
> > sourceforge.net
> > 
> > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from
> > sourceforge.net
> > 
> > Executing the following simple "log plot" script within PythonWin:
> > 
> > *from* matplotlib *import* pylab
> > 
> > # Create some artificial data.
> > test_frequency = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
> > 17, 18, 19, 20]
> > test_results = [-0.2, -0.7, -1.0, -1.5, -2.0, -2.5, -3.0, -3.5, -4, -5,
> > -6, -7.1, -8, -9, -10, -11, -12, -15, -20, -25]
> > spec_frequency = [6, 8]
> > spec_results = [-3.0, -3.0]
> > 
> > # Plot
> > figure = pylab.subplot(111)
> > figure.semilogx()
> > figure.scatter(test_frequency, test_results, s=20, c='b', marker='s',
> > edgecolors='none')
> > figure.scatter(spec_frequency, spec_results, s=40, c='g', marker='s',
> > edgecolors='none')
> > figure.grid(True)
> > figure.set_xlabel(r"Frequency (Hz)", fontsize = 12)
> > figure.set_ylabel(r"Actuator Response (db)", fontsize = 12)
> > 
> > figure.figure.savefig('log_plot')
> > figure.figure.show()
> > 
> > 
> > Plots a figure on the screen that looks correct, then the following
> > error (when I click OK, PythonWin closes)
> > 
> > 
> > 
> > Any advice would be appreciated. Maybe it's an installation or setup
> > issue, but I'm pretty knew to Python programming and don't know how to
> > debug this.
> > 
> > Lee Boger


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Uninstalling MatPlotLib (win7)? {Site-Packages?]

2010-02-06 Thread Christoph Gohlke
Depending on the version and installer used, manually remove

C:\Python25\Lib\site-packages\pylab.py
C:\Python25\Lib\site-packages\matplotlib
C:\Python25\Lib\site-packages\mpl_toolkits
C:\Python25\Lib\site-packages\matplotlib*.egg-info
C:\Python25\Removematplotlib.exe
C:\Python25\matplotlib-wininst.log

The packages dateutil and pytz are also installed along with matplotlib
but might be used by other packages too.

Christoph


On 2/5/2010 12:11 PM, Wayne Watson wrote:
> I'm working in IDLE in Win7. It seems to me it gets stuck in 
> site-packages under C:\Python25. Maybe this is as simple as deleting the 
> entry?
> 
> Well, yes there's a MPL folder under site-packages and an info MPL file 
> of 540 bytes. There  are  also pylab.py, pyc,and py0 files under site. 
> What to do next?
> 
> On 2/5/2010 7:13 AM, Wayne Watson wrote:
>> I should have installed  numpy first, and got some errors installing
>> MPL. I don't see an uninstall in Control Panel Add/Rmv.
>>
> 

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Importing pyplot crashes python

2010-01-22 Thread Christoph Gohlke
What does the command `python.exe -v -c "from matplotlib import pylab"`
say?

MPL 0.99.1 contains a bug (#2903460) that crashes the _path module on
slow Pentium CPUs (at least when using Python 2.6). A updated installer
is available at .

It might help to add the path where python.exe is installed to the
Windows search path. E.g. try `SET PATH=C:\Python25;%PATH%` before
running your program.

Christoph


On 1/21/2010 11:06 PM, Brendan Barnwell wrote:
> Hi,
> 
>   I decided to upgrade to matoplotlib 0.99.1.  I'm on Windows XP.  I 
> downloaded matplotlib-0.99.1.win32-py2.5.exe and ran it.  It seemed to 
> install.  Now when I try "from matplotlib import pyplot", Python 
> crashes with one of those "pythonw has encountered a problem and needs 
> to close" messages.  I tried uninstalling matplotlib, and I also 
> uninstalled SciPy and upgraded that to the latest version (0.7.1) and 
> then reinstalled matplotlib.  Still crashes.  Importing numpy on its 
> own works, as does importing matplotlib on its own.
> 
>   How can I fix this problem?
> 
> Thanks,

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem with import pylab

2010-01-18 Thread Christoph Gohlke
The extension _TKAGG.PYD depends on TK84.DLL, TCL84.DLL, MSVCP71.DLL, 
and MSVCR71.DLL. Make sure all these files are located in the Windows 
search path, e.g. in one of the directories listed in the PATH 
environment variable.

Christoph

On 1/18/2010 1:45 PM, H L wrote:
>
> Thanks. I ran the Simple Hello World program (section 25.1.2.2 at
> http://docs.python.org/library/tkinter.html) without any problem, so I
> guess Tk installation itself is ok.
> Someone has experience with getting matplotlib work with Tk?
>
>
> --- On *Sun, 1/17/10, Erik Tollerud //* wrote:
>
>
> From: Erik Tollerud 
> Subject: Re: [Matplotlib-users] problem with import pylab
> To: "H L" 
> Date: Sunday, January 17, 2010, 9:18 PM
>
> Just based on the traceback, the problem seems to be in Tk - does
> anything in tk work for you? (e.g. any of the builtin python gui
> stuff) You might try installing wx and changing your matplotlibrc
> file to have the line "backend:WxAgg" in it. I've never tried using
> the wx backend on windows (anyone done this?), but presumably it
> should work...
>
> On Fri, Jan 15, 2010 at 5:47 PM, H L  > wrote:
>
> Hello:
> I am having problem with "import pylab". I attached the
> traceback below. I have googled on the web but haven't found a
> solution. Can someone here help?
> I have ActivePython 2.5, numpy-1.4.0-win32, and
> matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
> --
> Traceback (most recent call last):
> File "", line 1, in 
> File "C:\Python25\lib\site-packages\pylab.py", line 1, in 
> from matplotlib.pylab import *
> File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line
> 247, in 
> from matplotlib.pyplot import *
> File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line
> 78, in 
> new_figure_manager, draw_if_interactive, show = pylab_setup()
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py",
> line 25, in pylab_setup
> globals(),locals(),[backend_name])
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 8, in 
> import tkagg # Paint image to Tk photo blitter extension
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py",
> line 1, in 
> import _tkagg
> ImportError: DLL load failed: The specified module could not be
> found.
> Thanks.
> HL
>
>
>
> 
> --
> Throughout its 18-year history, RSA Conference consistently
> attracts the
> world's best and brightest in the field, creating opportunities
> for Conference
> attendees to learn about information security's most important
> issues through
> interactions with peers, luminaries and emerging and established
> companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> 
> 
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
>
> --
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] can't find mplot3d

2010-01-05 Thread Christoph Gohlke


On 1/5/2010 10:00 AM, georgeflecom...@comcast.net wrote:
> mplot3d is not in ...\site-packages\mpl_toolkits and
>
> easy_install dies looking for it. see attached err.txt
>


This might be due to a bug in setuptools 0.6c11 
. Try upgrading to setuptools 
0.6c12 or distribute , or use 
the matplotlib installer from 
.

Christoph

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Christoph Gohlke
Hello,

switching to 64-bit Python and OS might help. I can display 8bit images 
up to 8459x8459 with imshow on Windows 7 64-bit with 8GB RAM. Python 
then uses about 5.5 GB RAM according to task manager. A 8460x8460 or 
larger 8bit images crash Python (definitely a bug). The 32-bit 
interpreter starts throwing MemoryErrors around 4350x4350 pixels. The 
exact limits will depend on the application, OS, and free RAM.

Christoph

On 12/15/2009 9:15 AM, Wellenreuther, Gerd wrote:
> Well, I am trying to create an overlay, *one* picture showing all 34
> images. So I am only trying to create a single figure.
>
> I just attached an example so you can get an idea (it was downsampled
> for mailing, the original picture has ca. 5500 x 6500 pixels). In the
> end, I just want to save the image to the disk, so I am using 'Agg' as
> the backend - hope this also saves me some memory.
>
> And about "old" images: I am always starting a completely new
> python-process for each stitching (one at a time).
>
> Cheers, Gerd
>
> Perry Greenfield wrote:
>> Are you clearing the figure after each image display? The figure
>> retains references to the image if you don't do a clf() and thus you
>> will eventually run out of memory, even if you delete the images (they
>> don't go away while matplotlib is using them).
>>
>> Perry
>>
>> On Dec 15, 2009, at 10:32 AM, Wellenreuther, Gerd wrote:
>>
>>> Dear all,
>>>
>>> I am trying to write a script to be used with our microscope, stitching
>>> images of various magnifications together to yield a big picture of a
>>> sample. The preprocessing involves operations like rotating the picture
>>> etc., and finally those pictures are being plotted using imshow.
>>>
>>> Unfortunately, I am running into memory problems, e.g.:
>>>
 C:\Python26\lib\site-packages\PIL\Image.py:1264: DeprecationWarning:
 integer argument expected, got float
 im = self.im.stretch(size, resample)
 Traceback (most recent call last):
 File "F:\Procs\Find_dendrites.py", line 1093, in 
 file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=600)

 File "F:\Procs\Find_dendrites.py", line 1052, in process_images
 scale,aspect_ratio,dpi,left,right,bottom,top)
 File "F:\Procs\Find_dendrites.py", line 145, in stitch_images
 pylab.draw()
 File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 352,
 in draw
 get_current_fig_manager().canvas.draw()
 File
 "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
 line 313, in draw
 self.renderer = self.get_renderer()
 File
 "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
 line 324, in get_renderer
 self.renderer = RendererAgg(w, h, self.figure.dpi)
 File
 "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
 line 59, in __init__
 self._renderer = _RendererAgg(int(width), int(height), dpi,
 debug=False)
 RuntimeError: Could not allocate memory for image
>>>
>>> or
>>>
 Traceback (most recent call last):
 File "F:\Procs\Find_dendrites.py", line 1093, in 
 file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=75)

 File "F:\Procs\Find_dendrites.py", line 1052, in process_images
 scale,aspect_ratio,dpi,left,right,bottom,top)
 File "F:\Procs\Find_dendrites.py", line 142, in stitch_images
 pylab.imshow(rotated_images[i],aspect='auto')
 File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line
 2046, in imshow
 ret = ax.imshow(X, cmap, norm, aspect, interpolation, alpha, vmin,
 vmax, origin, extent, shape, filternorm, filterrad, imlim, resample,
 url, **kwargs)
 File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 6275,
 in imshow
 im.set_data(X)
 File "C:\Python26\lib\site-packages\matplotlib\image.py", line 291,
 in set_data
 self._A = pil_to_array(A)
 File "C:\Python26\lib\site-packages\matplotlib\image.py", line 856,
 in pil_to_array
 x = toarray(im)
 File "C:\Python26\lib\site-packages\matplotlib\image.py", line 831,
 in toarray
 x = np.fromstring(x_str,np.uint8)
 MemoryError
>>>
>>>
>>> I already implemented some downscaling of the original images (ca. 3200
>>> x 2400 pixels), to roughly match the figures dpi-setting. But this does
>>> not seem to be the only issue. The script does work for dpi of 600 or
>>> 150 for 11 individual images, yielding e.g. a 23 MB file with 600 dpi
>>> and 36 Megapixels. But it fails for e.g. 35 images even for 75 dpi.
>>>
>>> I was trying to throw away any unneccessary data using del + triggering
>>> the garbage collection, but this did not help beyond a certain point.
>>> Maybe somebody could tell me what kind of limitations there are using
>>> imshow to plot a lot of images together, and how to improve?
>>>
>>> Some more info: I am using Windows. Just by judging from t

Re: [Matplotlib-users] _path.so: undefined symbol: PyArray_API

2009-11-25 Thread Christoph Gohlke
Revision 7985 contains a typo (see bug tracker). Try replace the string 
PY_ARRAYAUNIQUE_SYMBOL with PY_ARRAY_UNIQUE_SYMBOL in setupext.py.

Christoph

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Unable to import matplotlib.pylab in Windows

2009-11-24 Thread Christoph Gohlke
I was able to reproduce your problem on one of our Pentium III computers 
and traced it down to a bug in the _path module initialization function 
(will file a separate bug report). Please try again installing the 
updated  from 
.

Christoph

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Unable to import matplotlib.pylab in Windows

2009-11-23 Thread Christoph Gohlke
Should have asked this before: Does your computer's CPU have SSE2 
extensions? You can use CPU-Z .

It is OK that Dependency Walker does not find MSVCR90.DLL and 
MSVCP90.DLL for a PYD extension. The extension will use whatever 
VC90.CRT python26.dll uses at runtime.

I am not able to reproduce your problem using a fresh Windows XP SP3, 
Python 2.6.4, numpy 1.3.0, matplotlib 0.99.1 installation in VirtualPC.

If you don't mind, would you try installing 
 from 
. This build has 
SSE2 disabled and a manifest for VC90.CRT embedded, which explicitly 
specifies the VC90.CRT to use.

Christoph

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Unable to import matplotlib.pylab in Windows

2009-11-23 Thread Christoph Gohlke
Please check if there are python26.dll or "Microsoft.VC90.CRT.manifest" 
files left in your Python directory. If yes, remove those files.

If that does not help, run Dependency Walker on python26.dll (should be 
in your system folder), enable "Full Paths" view and report the 
MSVCR90.DLL path. It should be 


I assume the missing DWMAPI.DLL and EFSADU.DLL dependencies come from 
IE7/8 and can be ignored.

Christoph

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Unable to import matplotlib.pylab in Windows

2009-11-22 Thread Christoph Gohlke
Try installing the Microsoft Visual C++ 2008 Redistributable Package (x86)
.
This is usually installed during the installation of Python in the 
"Install For All Users" mode.

Christoph

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ImportError- No toolkits.basemap

2009-10-03 Thread Christoph Gohlke
Try changing the line

from matplotlib.toolkits.basemap import Basemap

to

from mpl_toolkits.basemap import Basemap

- Christoph

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


  1   2   >