Re: [Matplotlib-users] Matplotlib and Numfocus Fiscal Sponsorship Agreement (FSA)

2015-01-20 Thread Michiel de Hoon
+1

Best,
-Michiel


On Wed, 1/21/15, Michael Droettboom md...@stsci.edu wrote:

 Subject: [Matplotlib-users] Matplotlib and Numfocus Fiscal Sponsorship 
Agreement (FSA)
 To: matplotlib-de...@lists.sourceforge.net 
matplotlib-de...@lists.sourceforge.net, matplotlib-users 
matplotlib-users@lists.sourceforge.net
 Date: Wednesday, January 21, 2015, 12:48 AM
 
 
   
 
 
   
   
 
 
   Matplotlib
   is a widely used, well regarded, and powerful
 visualization
   library that has dominated the Python
 visualization stack for
   over a decade. However, to maintain that position,
 matplotlib
   must continue to evolve. Complementary or
 alternative
   libraries are appearing at an increasing rate,
 including
   browser-based plotting and GPU acceleration. To
 maintain its
   leadership position for the next decade,
 Matplotlib must
   interface with these alternatives while
 simultaneously
   expanding its capabilities and becoming easier to
 use and
   learn.
   
 
   Matplotlib’s
   large existing user base (greater than 50,000)
 means that new
   developments need to be carefully balanced with
 maintaining
   existing interfaces.  With the large user and
 code base comes
   a significant maintenance and user-support burden.
  These
   responsibilities currently account for a majority
 of the
   core-developer time spent on matplotlib and has
 resulted in
   both the code base and community being in a
 healthier state
   than ever before. Even 6 years ago there was no
 automated
   testing to speak of and the number of contributors
 continues
   to soar on github. However, this effort is, for
 the most part,
   done on a volunteer basis in the nights and
 weekends of the
   core developers.  To go beyond this maintenance
 level—to make
   step-change improvements for the benefit of
 matplotlib’s
   users—will require funding for full-time
 developers. Inspired
   and encouraged by the example of IPython, we would
 like to
   begin the process of fundraising.
   
 
   Managing
   funding on the needed scale is a complex and
 time-consuming
   process.  Thankfully, NumFOCUS, a 501(c)3 charity
 organisation
   co-founded by John Hunter, offers a fiscal
 sponsorship
   agreement to minimize the administrative and legal
 burden on
   open source projects. We would like to enlist
 NumFOCUS as our
   agents in all legal and financial matters,
 including banking,
   accepting donations as a non-profit, payroll, and
 access to
   legal counsel.  As part of the agreement,
 NumFOCUS would
   charge a percentage of all funds raised to cover
 their costs.
    The full text of the agreement is
 attached.
   
 
   To
   comply with the legal and accounting requirements
 of a
   non-profit, matplotlib needs to form an
 administrative body to
   interact with NumFOCUS and direct the disbursement
 of any
   funds.  The proposed initial members of the body,
 are myself
   (Mike Droettboom), Eric Firing, Phil Elson, and
 Thomas
   Caswell, with Thomas acting as the point of
 contact with
   NumFOCUS.
   
 
   In
   practice, signing an FSA will have very little
 impact on the
   matplotlib project itself - it will still be
 BSD-licensed and
   community-driven as it has always been, and the
 only
   motivation for doing this is to give us an
 opportunity to
   apply for funding to do more work on matplotlib.
 We'd like to
   canvas the community's opinion on the matter,
 but to put a
   concrete timeline on the discussion, we would like
 to propose
   signing an FSA with NumFOCUS in 3 weeks (Feb 10th
 2015) unless
   there is a major community discomfort with us
 doing so. 
 
 
   
 
   Cheers,
 
   Michael Droettboom
 
 
 
 
 
 -- 
 Michael Droettboom
 Science Software Branch
 Space Telescope Science Institute
 
 http://www.droettboom.com
   
 
 
 -Inline Attachment Follows-
 
 --
 New Year. New Location. New Benefits. New Data Center in
 Ashburn, VA.
 GigeNET is offering a free month of service with a new
 server in Ashburn.
 Choose from 2 high performing configs, both with 100TB of
 bandwidth.
 Higher redundancy.Lower latency.Increased
 capacity.Completely compliant.
 http://p.sf.net/sfu/gigenet
 -Inline Attachment Follows-
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 

Re: [Matplotlib-users] Which api to learn?

2014-05-01 Thread Michiel de Hoon
99.9% of the time I am using pyplot, as it usually does what I want without me 
having to understand an api.
I don't care so much if pyplot agrees with matlab or not, but it should be 
something easy that new users can pick up quickly.

Best,
-Michiel


On Wed, 4/30/14, Neal Becker ndbeck...@gmail.com wrote:

 Subject: [Matplotlib-users] Which api to learn?
 To: matplotlib-users@lists.sourceforge.net
 Date: Wednesday, April 30, 2014, 7:49 AM
 
 I've never used matlab (and hope
 never to have to).  But I've been using pyplot 
 api for mpl for quite a while.
 
 Is there any good reason to move to the native mpl api and
 drop pyplot?  I ask 
 because as I understand, pyplot is intended as a matlab
 workalike, and since I 
 never learned matlab I have no need for that crutch. 
 OTOH, I'm quite used to 
 the pyplot api at this point.
 
 
 --
 Accelerate Dev Cycles with Automated Cross-Browser Testing
 - For FREE
 Instantly run your Selenium tests across 300+ browser/OS
 combos.  Get 
 unparalleled scalability from the best Selenium testing
 platform available.
 Simple to use. Nothing to install. Get started now for
 free.
 http://p.sf.net/sfu/SauceLabs
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 

--
Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free.
http://p.sf.net/sfu/SauceLabs
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Animate on Mac O$

2014-03-14 Thread Michiel de Hoon
Hi Ryan,

In matplotlib, drawing is done as part of the call to figure.draw(renderer).
The MacOSX backend makes this call from the event loop callback
(i.e., the drawRect function in src/_macosx.m). Outside of the event loop
callback, the graphics context (CGContextRef on Macs) is undefined, and
no drawing can take place.

In the animations module, event_source is a timer that periodically calls
_step, which calls _draw_next_frame, which calls _post_draw to do the
blitting. But since the timer lives outside if the event loop, blitting will 
fail on
Macs; there simply is no graphics context to draw to.

The solution is to split the blitting into two parts:
- A front-end blitting function that tells matplotlib to blit
(this is the function called by the timer)
- A back-end blitting function that does the actual blitting
(as part of the call to figure.draw(renderer);
the back-end blitting function is implemented in the backend).

In a sense, this is the same as for the other graphics functions
(e.g. there is a front-end plot function, and a back-end draw_path 
function).

See the discussion here for more information:
https://github.com/matplotlib/matplotlib/issues/531
(this discussion also went into other issues though).

Best,
-Michiel.


On Thu, 3/13/14, Ryan May rma...@gmail.com wrote:

 Subject: Re: [Matplotlib-users] Animate on Mac O$
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: Christophe Bal projet...@gmail.com, Matplotlib 
matplotlib-users@lists.sourceforge.net
 Date: Thursday, March 13, 2014, 8:29 PM
 
  On Mar 13, 2014, at 17:55,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
  
  The problems with animations on Mac
  are not so much related to the backend,
  but to the animations code itself. Animations
  with the MacOSX backend cannot be fixed
  without redesigning the animations module.
 
 Can you give me a better idea why you think so? I wrote the
 original and have a Mac now...
 
 Ryan

--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] OS X Mavericks: CGContextErase warning

2013-11-05 Thread Michiel de Hoon
Which backend are you using? With the Mac OS X native backend on OS X 
Mavericks, I have not seen this warning.
Best,
-Michiel.


On Mon, 10/28/13, Bedartha Goswami gosw...@pik-potsdam.de wrote:

 Subject: [Matplotlib-users]  OS X Mavericks: CGContextErase warning
 To: matplotlib-users@lists.sourceforge.net
 Date: Monday, October 28, 2013, 7:23 AM
 
 I installed OS X Mavericks a few days
 ago and I am running Mapllotlib Version 1.3.1.
 Everything works fine except that I get a warning every time
 i use the pyplot.show() command.
 
 here is what it looks like:
 
 Python[27325] Error: The function `CGContextErase'
 is obsolete and will be removed in an upcoming update.
 Unfortunately, this application, or a library it uses, is
 using this obsolete function, and is thereby contributing to
 an overall degradation of system performance.
 ---
 
 I thought I should ask if this is serious and also if
 something can be done about it.
 
 Best,
 Bedartha
 
 
 -Inline Attachment Follows-
 
 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application
 performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more.
 Get the most from 
 the latest Intel processors and coprocessors. See abstracts
 and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60135991iu=/4140/ostg.clktrk
 -Inline Attachment Follows-
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 

--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to update matplotlib's imshow() window interactively?

2013-07-25 Thread Michiel de Hoon
Depending on the backend, you may be able to use
f = plt.figure()
f.canvas.flush_events()

Also, I would suggest to clear the image each time you go through the loop, 
otherwise you'll end up with a huge number of images on top of each other.

Best,
-Michiel.





 From: zsero zsolt@gmail.com
To: matplotlib-users@lists.sourceforge.net 
Sent: Thursday, July 25, 2013 12:05 AM
Subject: [Matplotlib-users] How to update matplotlib's imshow() window  
interactively?
 


I'm working on some computer vision algorithm and I'd like to show how a numpy 
array changes in each step. What works now is that if I have a simple imshow( 
array ) at the end of my code, the window displays and shows the final image. 
However what I'd like to do is to update and display the imshow window as the 
image changes in each iteration. So for example I'd like to do: 
import numpy as np
import matplotlib.pyplot as plt
import time array = np.zeros( (100, 100), np.uint8 ) for i in xrange( 0, 100 ): 
for j in xrange( 0, 50 ): array[j, i] = 1 #_show_updated_window_briefly_ 
plt.imshow( array ) time.sleep(0.1)
The problem is that this way, the Matplotlib window doesn't get activated, only 
once the whole computation is finished. I've tried both native matplotlib and 
pyplot, but the results are the same. For plotting commands I found an .ion() 
switch, but here it doesn't seem to work. Q1. What is the best way to 
continuously display updates to a numpy array (actually a uint8 greyscale 
image)? Q2. Is it possible to do this with an animation function, like in the 
dynamic image example? I'd like to call a function inside a loop, thus I don't 
know how to achieve this with an animation function. 

 View this message in context: How to update matplotlib's imshow() window 
interactively?
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fwd: Matplotlib backend issue

2013-07-20 Thread Michiel de Hoon

The MacOSX backend itself does not use X11. So I would suggest to check which 
modules get loaded when you import pyplot, and see which one of those causes 
X11 to open.
-Michiel


--
On Fri, Jul 19, 2013 4:14 PM EDT Tommy Grav wrote:

I just installed matplotlib on a new MacBook Pro

ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:20:15) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type help, copyright, credits or license for more information.
 import numpy
 numpy.__version__
'1.7.1'
 import matplotlib
 matplotlib.__version__
'1.2.1'
 matplotlib.matplotlib_fname()
'/Users/tgrav/.matplotlib/matplotlibrc'
 

That works fine. However, when I try to do

import matplotlib.pyplot as plt

it tries to open X11, which I have not installed and would like to 
try to avoid. The matplotlibrc file has

backend : MacOSX 

Anyone know why it is still trying to open X11 and how I can avoid that?


--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Fwd: Matplotlib backend issue

2013-07-20 Thread Michiel de Hoon


Hi Tommy,

Look inside the pyplot.py module. I don't have the code in front of me now, but 
I guess it's a module that loads a bunch of other modules, and one of those 
wants to use X11. This should not depend on whether the developers‘ tools are 
present.
-michiel 


--
On Sat, Jul 20, 2013 9:16 AM EDT Tommy Grav wrote:


On Jul 20, 2013, at 9:09 AM, Michiel de Hoon mjldeh...@yahoo.com wrote:

 
 The MacOSX backend itself does not use X11. So I would suggest to check 
 which modules get loaded when you import pyplot, and see which one of those 
 causes X11 to open.

Thanks. How do I check which modules get loaded? When I import pyplot a window 
pops up that explains that X11 is no longer part of the Mac OS X distribution 
and the python shell exits to the prompt.

Also are there anything I need to do to make MacOSX available to matplotlib. I 
have installed XCode, but I notice that there is no longer a /Developer 
directory at the root level (all developer code resources are not part of 
XCode application). Could this be causing matplotlib to not find the MacOSX 
environment? Or am I missing a path or keyword in my bash environment perhaps?

Cheers
 Tommy
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] timer objects in macosx backend

2013-07-20 Thread Michiel de Hoon
See pull request 2233:
https://github.com/matplotlib/matplotlib/pull/2233

This pull request adds a .stop() method to timers in the MacOSX backend.

Best,
-Michiel.




 From: Michiel de Hoon mjldeh...@yahoo.com
To: Brendan Barnwell brenb...@brenbarn.net; 
matplotlib-users@lists.sourceforge.net 
matplotlib-users@lists.sourceforge.net 
Sent: Friday, July 19, 2013 10:44 AM
Subject: Re: [Matplotlib-users] timer objects in macosx backend
 


Hi Brendan, Justin,
Thanks for your reply. I agree then that a .stop() method is needed. This is 
not very difficult; I'll try and implement it over the weekend.
Best,
-Michiel.





 From: Brendan Barnwell brenb...@brenbarn.net
To: matplotlib-users@lists.sourceforge.net 
Sent: Friday, July 19, 2013 3:54 AM
Subject: Re: [Matplotlib-users] timer objects in macosx backend
 

On 2013-07-18 06:56, Justin Lazear wrote: Hi Michiel,

 On my system, deleting the timer has no effect and the timer continues
 to send events. The __del__ method seems to call the same unimplemented
 _timer_stop method. Regardless, something else has a reference to the
 timer (MPL event loop maybe?) and __del__ is not being called once the
 timer has been started. It's not clear to me what should be 
stopping the
 timer in that case.

 Does del t stop the timer on your system? If so, could we hunt down 
what
 is happening after you delete the name t that is causing the timer 
to stop?

 I would personally prefer an explicit .stop() method, since I would
 prefer not to rely on the garbage collector's behavior being consistent
 (hard to make sure nothing else is holding a reference to timer) when
 there is a very
 well-defined function that does what I want.

    Relying on del t can't be the right solution, since like you note, 
it only deletes the name, not the object.  If you create multiple 
references to a timer and only del some of them, e.g.:

t = fig.canvas.new_timer()
x = t
del t

Then the object's __del__ will definitely not be called yet.  It makes 
sense to have a way to stop the timer directly, regardless of how many 
names are pointing to it.

-- 
Brendan Barnwell
Do not follow where the path may lead.  Go, instead, where there is 
no path, and leave a trail.
    --author unknown

--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in
 seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] timer objects in macosx backend

2013-07-18 Thread Michiel de Hoon
Hi Brendan, Justin,
Thanks for your reply. I agree then that a .stop() method is needed. This is 
not very difficult; I'll try and implement it over the weekend.
Best,
-Michiel.





 From: Brendan Barnwell brenb...@brenbarn.net
To: matplotlib-users@lists.sourceforge.net 
Sent: Friday, July 19, 2013 3:54 AM
Subject: Re: [Matplotlib-users] timer objects in macosx backend
 

On 2013-07-18 06:56, Justin Lazear wrote: Hi Michiel,

 On my system, deleting the timer has no effect and the timer continues
 to send events. The __del__ method seems to call the same unimplemented
 _timer_stop method. Regardless, something else has a reference to the
 timer (MPL event loop maybe?) and __del__ is not being called once the
 timer has been started. It's not clear to me what should be 
stopping the
 timer in that case.

 Does del t stop the timer on your system? If so, could we hunt down 
what
 is happening after you delete the name t that is causing the timer 
to stop?

 I would personally prefer an explicit .stop() method, since I would
 prefer not to rely on the garbage collector's behavior being consistent
 (hard to make sure nothing else is holding a reference to timer) when
 there is a very well-defined function that does what I want.

    Relying on del t can't be the right solution, since like you note, 
it only deletes the name, not the object.  If you create multiple 
references to a timer and only del some of them, e.g.:

t = fig.canvas.new_timer()
x = t
del t

Then the object's __del__ will definitely not be called yet.  It makes 
sense to have a way to stop the timer directly, regardless of how many 
names are pointing to it.

-- 
Brendan Barnwell
Do not follow where the path may lead.  Go, instead, where there is 
no path, and leave a trail.
    --author unknown

--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] timer objects in macosx backend

2013-07-17 Thread Michiel de Hoon
Hi Justin,

The .stop() method was indeed never implemented for Timer objects in the MacOSX 
backend.
I am not sure if a .stop() method is really needed, because deleting the timer 
has the same effect as stopping the timer.
Is there some reason you prefer
 t.stop()
instead of
 del t
?

Best,
-Michiel





 From: Justin Lazear jlaz...@gmail.com
To: Matplotlib-users@lists.sourceforge.net 
Sent: Thursday, July 18, 2013 12:13 AM
Subject: [Matplotlib-users] timer objects in macosx backend
 


Hi all,

I'm using a timer object to interact with the MPL event loop on my
OS X laptop. However, it seems to be missing a few key methods that
are making using it a little difficult. In particular, I can't find
a way to stop the timer from sending events:

        $ ipython --pylab

In [1]: def fun():
   ...: for i in range(5):
   ...: print We're having fun!; yield
   ...: for i in range(5):
   ...: print Too much fun...; yield
   ...: while True:
   ...: print Stop the fun! No more!; yield

In [2]: f = fun().next

In [3]: fig = plt.figure()

In [4]: t = fig.canvas.new_timer()

In [5]: t.add_callback(f)

In [6]: t.start()

In [7]: t.stop()

In [8]: del t  # It's all over now...

It looks like the stop method may never have been implemented:


In [3]: t.stop??
Type:   instancemethod
String Form:bound method TimerMac.stop of Timer object
  0x106ba33b0 wrapping CFRunLoopTimerRef 0x0
File:  
  /usr/local/lib/python2.7/site-packages/matplotlib/backend_bases.py
Definition: t.stop(self)
Source:
    def stop(self):
    '''
    Stop the timer.
    '''
    self._timer_stop()

In [4]: t._timer_stop??
Type:   instancemethod
String Form:bound method TimerMac._timer_stop of Timer object
  0x106ba33b0 wrapping CFRunLoopTimerRef 0x0
File:  
  /usr/local/lib/python2.7/site-packages/matplotlib/backend_bases.py
Definition: t._timer_stop(self)
Source:
    def _timer_stop(self):
    pass

I'm able to remove the callback function from the timer's callback
list, but I suspect that won't stop the events from being triggered.
But I'd really prefer to completely stop the timer events, since in
my application I may end up going through many timers. 

Is this the expected behavior? Is there an easy fix I'm overlooking?

Version info:


In [3]: sys.version
Out[3]: '2.7.3 (default, Feb 19 2013, 18:00:31) \n[GCC 4.2.1
  Compatible Apple LLVM 4.2 (clang-425.0.24)]'

In [4]: mpl.__version__
Out[4]: '1.2.0'

Thanks,
Justin

--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] matshow unequal element sizes

2013-06-06 Thread Michiel de Hoon
Hi all,

I am trying to draw a heatmap using matshow, which I then save as a PDF.
If I then zoom in in the PDF, I notice that different rows have different 
sizes, and different columns have different sizes. It seems that some 
rows/columns have twice the height/width as other rows/columns.
Attached is a screenshot of part of the PDF after zooming in.
Is there some way to force all rows / columns to have the same height/width?

Best,
-Michiel.
attachment: image.PNG--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matshow unequal element sizes

2013-06-06 Thread Michiel de Hoon
Thanks! Using pcolor indeed solved the problem. Now my rows and columns are all 
nice and even.

Best,
-Michiel.





 From: Benjamin Root ben.r...@ou.edu
To: Michael Droettboom md...@stsci.edu 
Cc: Matplotlib Users matplotlib-users@lists.sourceforge.net 
Sent: Friday, June 7, 2013 1:40 AM
Subject: Re: [Matplotlib-users] matshow unequal element sizes
 




On Thu, Jun 6, 2013 at 10:14 AM, Michael Droettboom md...@stsci.edu wrote:

By default (when interpolation=nearest) matplotlib is performing nearest 
neighbor interpolation on the image to the request PDF dpi before storing it in 
the file.  This results in rows and columns of unequal size because the ratio 
from the original image to the destination resolution is likely not integral.

You can set interpolation=none, which will pass the original
  image as-is on to the file, but then we can't control the
  interpolation mode (since there's no way to tell the PDF viewer
  what sort of interpolation to perform), so that (usually) will
  result in bicubic interpolation, which is probably not what you
  want.

Mike



From experience, it seems that pcolor() or pcolormesh() works best for pdf's 
because it saves the polygons.  You might need some tweaking to get it exactly 
right, but at least the pdf viewer won't smudge it all out.


Cheers!
Ben Root

--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] key_press_events on macosx

2013-06-05 Thread Michiel de Hoon
The script works for me with matplotlib-1.2.1 both with Python2 and with 
Python3 with the MacOSX backend.
To rule out the usual culprit, is your Python3 installed as a framework?

Best,
-MIchiel.





- Original Message -
From: Scott Lasley slas...@space.umd.edu
To: matplotlib-users@lists.sourceforge.net 
matplotlib-users@lists.sourceforge.net
Cc: 
Sent: Thursday, June 6, 2013 4:50 AM
Subject: Re: [Matplotlib-users] key_press_events on macosx


On Jun 5, 2013, at 2:51 PM, Matt Terry matt.te...@gmail.com wrote:

 Hi,
 I'm working on a TextBox widget and have run into problems registering 
 key_press_events with the macosx backend.  button_press_events work, but 
 key_press_events fail to trigger.  If I change backends to tkAgg, everything 
 triggers as expected.
 
 Can anyone reproduce this?
 Run the following script; click the figure and bang on the keyboard.  Mouse 
 clicks and keyboard clicks should echo on the screen.  I'm using mpl 1.2.1 
 with Anaconda.
 
 -matt
 
 import pylab as plt
 plt.switch_backend('macosx')
 
 
 def print_event(event):
     print 'event', event
 
 ax = plt.subplot(111)
 fig = ax.figure
 
 x = range(10)
 ax.plot(x, x)
 # mouse clicks work on tkAgg  macosx
 fig.canvas.mpl_connect('button_press_event', print_event)
 # key presses only work on tkAgg
 fig.canvas.mpl_connect('key_press_event', print_event)
 
 plt.show()

key_press_events in the script fail on my mac running OS X 10.8, python 3.3.2 
from python.org and with both matplotlib 1.2.1 installed with pip and 
matplotlib-1.3.0rc2 from the matplotlib.org download page

They do work with the latest matplotlib 1.4 from github

hth,
Scott
--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Pan/Zoom can't work with blitting

2013-04-11 Thread Michiel de Hoon
Hi Clare,

Which backend are you using, and can you show an example script?

The blitting functions are a bit unusual as they try to draw stuff to the 
figure outside of the event loop. This is e.g. causing problems with 
animations, which makes use of the blitting functions. We have been looking at 
that recently (see https://github.com/matplotlib/matplotlib/issues/531) but we 
haven't come up with a solution yet. Solving this issue may also fix your 
problem (which sounds like an event loop problem), so you may want to follow 
issue 531.

Best,
-Michiel.

--- On Thu, 4/11/13, Clare Soh clare07112...@gmail.com wrote:

From: Clare Soh clare07112...@gmail.com
Subject: [Matplotlib-users] Pan/Zoom can't work with blitting
To: matplotlib-users@lists.sourceforge.net 
matplotlib-users@lists.sourceforge.net
Date: Thursday, April 11, 2013, 5:19 AM

Hi,
 
To improve plotting speed, I decided to use blitting(canvas.copy_from_bbox(), 
canvas.restore_region()  canvas.blit()) instead of canvas.draw(), however 
panning  zooming stops working after this change. Now, when I click on the 
'Pan/Zoom' button or the 'Zoom to rectangle' button on the Navigation Toolbar, 
my plot becomes empty. I don't know what's going wrong, can someone please 
point me in the right direction?

 
Thank you,
Clare.

-Inline Attachment Follows-

--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
-Inline Attachment Follows-

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis  visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Accelerating PDF saved plots

2012-07-09 Thread Michiel de Hoon
Hi Eric, Jouni,

Thanks for your replies. I opened an issue here:

https://github.com/matplotlib/matplotlib/issues/992

and wrote an outline of how the PDF backend can be simplified by making use of 
gc.restore to keep track of the graphics context. In essence the PDF backend 
would then follow the same logic as the Cairo and Mac OS X backends, so it may 
be good to compare to these (especially the Cairo backend, since it's written 
in pure Python and easy to understand).

Best,
-Michiel.



--- On Sun, 7/8/12, Eric Firing efir...@hawaii.edu wrote:

 From: Eric Firing efir...@hawaii.edu
 Subject: Re: [Matplotlib-users] Accelerating PDF saved plots
 To: matplotlib-users@lists.sourceforge.net
 Date: Sunday, July 8, 2012, 2:20 AM
 On 2012/07/07 7:14 PM, Michiel de
 Hoon wrote:
  Hi,
 
    What kind of outputs can these backends
 create?
 
  The Mac OS X backend can create PDFs, but it simply
 uses the pdf backend
  to do so, so that wouldn't help you.
  The cairo backend can create PDFs by using cairo, so
 that could be worth
  trying.
 
    Could make a simple speed comparison between
 these backends
    and the original script that uses the PDF
 backend.
 
  That would be useful, but keep in mind that there would
 be three options
  to compare:
  1) The current PDF backend;
  2) A modified PDF backend;
  3) The cairo backend creating PDFs.
  Since we don't have 2) yet, we cannot do the full
 comparison yet, but
  still it would be good to know if it is faster to
 create PDFs by using
  cairo compared to the current PDF backend.
 
    I am assuming the changes you mention
 require quite some work
    to make the PDFbackend running faster.
 
  I think it is not so bad, since it's mainly a matter of
 removing the
  stuff from the PDF backend that is no longer needed. Do
 we have a
  maintainer for the PDF backend? Because I would rather
 rely on him/her
  to make the changes to this backend. Otherwise, I can
 give it a try, but
  probably I won't be able to find the time for it within
 this month.
 
 
 It would be a good idea to enter a Github ticket for this,
 referring to 
 this email thread.
 
 Mike D. and Jouni S. have done most of the work on the pdf
 backend.
 
 Eric
 
  Best,
  -Michiel.
 
 
 
  --- On *Sat, 7/7/12, Gökhan Sever /gokhanse...@gmail.com/*
 wrote:
 
 
      From: Gökhan Sever gokhanse...@gmail.com
      Subject: Re: [Matplotlib-users]
 Accelerating PDF saved plots
      To: Michiel de Hoon mjldeh...@yahoo.com
      Cc: matplotlib-users@lists.sourceforge.net
      Date: Saturday, July 7, 2012,
 9:05 PM
 
      Hi,
 
      What kind of outputs can these
 backends create? I don't use MAC, so
      my question is particularly for
 the Cairo backend. Could make a
      simple speed comparison between
 these backends and the original
      script that uses the PDF
 backend. I am assuming the changes you
      mention require quite some work
 to make the PDFbackend running faster.
 
      Thanks.
 
      On Sat, Jul 7, 2012 at 9:40 AM,
 Michiel de Hoon mjldeh...@yahoo.com
      /mc/compose?to=mjldeh...@yahoo.com
 wrote:
 
          One reason behind
 the lengthy plot creation times is likely the
          PDF backend
 itself.
 
          Whereas the Mac
 OS X and the Cairo backends make use of new_gc
          and gc.restore to
 keep track of the graphics context, the PDF
          backend uses
 check_gc and an internal stack of graphics
          contexts. Since
 nowadays matplotlib has gc.restore
          functionality, I
 don't think that that is needed any more.
 
          See this revision
 for when gc.restore was added to matplotlib:
 
          
 http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=revisionrevision=7112
 
          In the same
 revision the Mac OS X and Cairo backends were
          modified to make
 use of gc.restore. The PDF backend (and the
          postscript
 backend also, btw) can be simplified in the same way
          to speed up these
 backends, as well as to reduce the output file
          sizes.
 
          Best,
          -Michiel.
 
          --- On *Thu,
 7/5/12, Gökhan Sever /gokhanse...@gmail.com
      
    /mc/compose?to=gokhanse...@gmail.com/*
 wrote:
 
 
          
    From: Gökhan Sever gokhanse...@gmail.com
          
    /mc/compose?to=gokhanse...@gmail.com
          
    Subject: Re: [Matplotlib-users]
 Accelerating PDF saved plots
              To:
 Benjamin Root ben.r...@ou.edu
          
    /mc/compose?to=ben.r...@ou.edu
              Cc:
 matplotlib-users@lists.sourceforge.net
          
    /mc/compose?to=matplotlib-users@lists.sourceforge.net
          
    Date: Thursday, July 5, 2012, 2:11 PM
 
 
 
              
    38 * 16 = 608
              
    80 / 608 = 0.1316 seconds per plot
 
              
    At this point, I doubt you are going to
 get much more
              
    speed-ups.  Glad to be of help!
 
              
    Fabrice -- Good suggestion!  I should
 have thought of
              
    that given how much I use

Re: [Matplotlib-users] Accelerating PDF saved plots

2012-07-07 Thread Michiel de Hoon
One reason behind the lengthy plot creation times is likely the PDF backend 
itself. 

Whereas the Mac OS X and the Cairo backends make use of new_gc and gc.restore 
to keep track of the graphics context, the PDF backend uses check_gc and an 
internal stack of graphics contexts. Since nowadays matplotlib has gc.restore 
functionality, I don't think that that is needed any more.

See this revision for when gc.restore was added to matplotlib:

http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=revisionrevision=7112

In the same revision the Mac OS X and Cairo backends were modified to make use 
of gc.restore. The PDF backend (and the postscript backend also, btw) can be 
simplified in the same way to speed up these backends, as well as to reduce the 
output file sizes.

Best,
-Michiel.

--- On Thu, 7/5/12, Gökhan Sever gokhanse...@gmail.com wrote:

From: Gökhan Sever gokhanse...@gmail.com
Subject: Re: [Matplotlib-users] Accelerating PDF saved plots
To: Benjamin Root ben.r...@ou.edu
Cc: matplotlib-users@lists.sourceforge.net
Date: Thursday, July 5, 2012, 2:11 PM



38 * 16 = 608
80 / 608 = 0.1316 seconds per plot

At this point, I doubt you are going to get much more speed-ups.  Glad to be of 
help!

Fabrice -- Good suggestion!  I should have thought of that given how much I use 
that technique in doing animation.




Ben Root



I am including profiled runs for the records --only first 10 lines to keep 
e-mail shorter. Total times are longer comparing to the raw run -p executions. 
I believe profiled run has its own call overhead.

I1 run -p test_speed.py
 171889738 function calls (169109959 primitive calls) in 374.311 seconds
   Ordered by: internal time
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
  4548012   34.583    0.000   34.583    0.000 {numpy.core.multiarray.array}  
1778401   21.012    0.000   46.227    0.000 path.py:86(__init__)   521816   
17.844    0.000   17.844    0.000 artist.py:74(__init__)
  2947090   15.432    0.000   15.432    0.000 weakref.py:243(__init__)  1778401 
   9.515    0.000    9.515    0.000 {method 'all' of 'numpy.ndarray' 
objects} 13691669    8.654    0.000    8.654    0.000 {getattr}
  1085280    8.550    0.000   17.629    0.000 core.py:2749(_update_from)  
1299904    7.809    0.000   76.060    0.000 markers.py:115(_recache)       38   
 7.378    0.194    7.378    0.194 {gc.collect}
 13564851    6.768    0.000    6.768    0.000 {isinstance}



I1 run -p test_speed3.py 61658708 function calls (60685172 primitive calls) in 
100.934 seconds

   Ordered by: internal time
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)   
937414    6.638    0.000    6.638    0.000 {numpy.core.multiarray.array}
   374227    4.377    0.000    7.500    0.000 path.py:198(iter_segments)  
6974613    3.866    0.000    3.866    0.000 {getattr}   542640    3.809    
0.000    7.900    0.000 core.py:2749(_update_from)
   141361    3.665    0.000    7.136    0.000 
transforms.py:99(invalidate)324688/161136    2.780    0.000   27.747    0.000 
transforms.py:1729(transform)    64448    2.753    0.000   64.921    0.001 
lines.py:463(draw)
   231195    2.748    0.000    7.072    0.000 path.py:86(__init__)684970/679449 
   2.679    0.000    3.888    0.000 backend_pdf.py:128(pdfRepr)    67526    
2.651    0.000    7.522    0.000 backend_pdf.py:1226(pathOperations)



-- 
Gökhan


-Inline Attachment Follows-

--
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/
-Inline Attachment Follows-

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
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] Accelerating PDF saved plots

2012-07-07 Thread Michiel de Hoon
Hi,

 What kind of outputs can these backends create?

The Mac OS X backend can create PDFs, but it simply uses the pdf backend to do 
so, so that wouldn't help you.
The cairo backend can create PDFs by using cairo, so that could be worth trying.

 Could make a simple 
speed comparison between these backends
 and the original script that 
uses the PDF backend.

That would be useful, but keep in mind that there would be three options to 
compare:
1) The current PDF backend;
2) A modified PDF backend;
3) The cairo backend creating PDFs.
Since we don't have 2) yet, we cannot do the full comparison yet, but still it 
would be good to know if it is faster to create PDFs by using cairo compared to 
the current PDF backend.

 I am assuming the changes you mention require 
quite some work
 to make the PDFbackend running faster.

I think it is not so bad, since it's mainly a matter of removing the stuff from 
the PDF backend that is no longer needed. Do we have a maintainer for the PDF 
backend? Because I would rather rely on him/her to make the changes to this 
backend. Otherwise, I can give it a try, but probably I won't be able to find 
the time for it within this month.

Best,
-Michiel.




--- On Sat, 7/7/12, Gökhan Sever gokhanse...@gmail.com wrote:

From: Gökhan Sever gokhanse...@gmail.com
Subject: Re: [Matplotlib-users] Accelerating PDF saved plots
To: Michiel de Hoon mjldeh...@yahoo.com
Cc: matplotlib-users@lists.sourceforge.net
Date: Saturday, July 7, 2012, 9:05 PM

Hi,
What kind of outputs can these backends create? I don't use MAC, so my question 
is particularly for the Cairo backend. Could make a simple speed comparison 
between these backends and the original script that uses the PDF backend. I am 
assuming the changes you mention require quite some work to make the PDFbackend 
running faster.

Thanks.

On Sat, Jul 7, 2012 at 9:40 AM, Michiel de Hoon mjldeh...@yahoo.com wrote:

One reason behind the lengthy plot creation times is likely the PDF backend 
itself. 

Whereas the Mac OS X and the Cairo backends make use of new_gc and gc.restore 
to keep track of the graphics context, the PDF backend uses check_gc and an 
internal stack of graphics contexts. Since nowadays matplotlib has gc.restore 
functionality, I don't think that that is needed any more.


See this revision for when gc.restore was added to matplotlib:

http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=revisionrevision=7112


In the same revision the Mac OS X and Cairo backends were modified to make use 
of gc.restore. The PDF backend (and the postscript backend also, btw) can be 
simplified in the same way to speed up these backends, as well as to reduce the 
output file sizes.


Best,
-Michiel.

--- On Thu, 7/5/12, Gökhan
 Sever gokhanse...@gmail.com wrote:

From: Gökhan Sever gokhanse...@gmail.com

Subject: Re: [Matplotlib-users] Accelerating PDF saved plots
To: Benjamin Root ben.r...@ou.edu
Cc: matplotlib-users@lists.sourceforge.net

Date: Thursday, July 5, 2012, 2:11 PM




38 * 16 = 608
80 / 608 = 0.1316 seconds per plot

At this point, I doubt you are going to get much more speed-ups.  Glad to be of 
help!

Fabrice -- Good suggestion!  I should have thought of that given how much I use 
that technique in doing animation.





Ben Root



I am including profiled runs for the records --only first 10 lines to keep 
e-mail shorter. Total times are longer comparing to the raw run -p executions. 
I believe profiled run has its own call overhead.


I1 run -p test_speed.py
 171889738 function calls (169109959 primitive calls) in 374.311 seconds
   Ordered by: internal time
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)

  4548012   34.583    0.000   34.583    0.000 {numpy.core.multiarray.array}  
1778401   21.012    0.000   46.227    0.000 path.py:86(__init__)   521816   
17.844    0.000   17.844    0.000 artist.py:74(__init__)

  2947090   15.432    0.000   15.432    0.000 weakref.py:243(__init__)  1778401 
   9.515    0.000    9.515    0.000 {method 'all' of 'numpy.ndarray' 
objects} 13691669    8.654    0.000    8.654    0.000 {getattr}

  1085280    8.550    0.000   17.629    0.000 core.py:2749(_update_from)  
1299904    7.809    0.000   76.060    0.000 markers.py:115(_recache)       38   
 7.378    0.194    7.378    0.194 {gc.collect}

 13564851    6.768    0.000    6.768    0.000 {isinstance}



I1 run -p test_speed3.py 61658708 function calls (60685172 primitive calls) in 
100.934 seconds


   Ordered by: internal time
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)   
937414    6.638    0.000    6.638    0.000 {numpy.core.multiarray.array}

   374227    4.377    0.000    7.500    0.000 path.py:198(iter_segments)  
6974613    3.866    0.000    3.866    0.000 {getattr}   542640    3.809    
0.000    7.900    0.000 core.py:2749(_update_from)

   141361    3.665    0.000    7.136    0.000 
transforms.py:99(invalidate)324688/161136    2.780    0.000   27.747    0.000

Re: [Matplotlib-users] tight_layout() causes RuntimeError on OSX

2012-05-02 Thread Michiel de Hoon
This kind of error typically occurs when the graphics context is being accessed 
outside of the event loop. This may work for other backends, but on Mac OS X in 
such a case the graphics context is not defined. The solution may involve 
reorganizing tight_layout such that the graphics context is not being accessed 
outside of the event loop.

-Michiel.

--- On Tue, 5/1/12, Elliot Saba staticfl...@gmail.com wrote:

From: Elliot Saba staticfl...@gmail.com
Subject: [Matplotlib-users] tight_layout() causes RuntimeError on OSX
To: Matplotlib Users matplotlib-users@lists.sourceforge.net
Date: Tuesday, May 1, 2012, 3:04 PM

Hey guys, I'm trying to use tight_layout() to fix up some subplot grossness, 
but whenever I call it, I get:
Traceback (most recent call last):

  File test.py, line 16, in module    plt.tight_layout()  File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py,
 line 1056, in tight_layout

    fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad)  File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py,
 line 1415, in tight_layout

    pad=pad, h_pad=h_pad, w_pad=w_pad)  File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/tight_layout.py,
 line 117, in auto_adjust_subplotpars

    tight_bbox_raw = union([ax.get_tightbbox(renderer) for ax in subplots])  
File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/axes.py,
 line 8396, in get_tightbbox

    bb.append(self.title.get_window_extent(renderer))  File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/text.py,
 line 743, in get_window_extent

    bbox, info = self._get_layout(self._renderer)  File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/text.py,
 line 296, in _get_layout

    ismath=False)  File 
/Users/username/.homebrew/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py,
 line 164, in get_text_width_height_descent

    width, height, descent = self.gc.get_text_width_height_descent(unicode(s), 
family, size, weight, style)RuntimeError: CGContextRef is NULL


I've googled around, but no answers have been found.  Is this a known issue, 
and if it's not, how can I go about fixing it?

Thanks,-E

-Inline Attachment Follows-

--
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/
-Inline Attachment Follows-

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
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] Focus in OSX

2012-04-13 Thread Michiel de Hoon
OK, that is good to know.
The Apple-supplied python is not installed as a framework; I don't know for the 
Enthought distribution.
Anyway, the MacOSX backend checks whether your Python is installed as a 
framework, and it issues a warning if it is not installed as a framework. For 
your non-framework python, was this warning issued?

Best,
-Michiel.

--- On Fri, 4/13/12, Elliot Saba staticfl...@gmail.com wrote:

From: Elliot Saba staticfl...@gmail.com
Subject: Re: [Matplotlib-users] Focus in OSX
To: Chris Laumann claum...@physics.harvard.edu
Cc: Michiel de Hoon mjldeh...@yahoo.com, 
matplotlib-users@lists.sourceforge.net 
matplotlib-users@lists.sourceforge.net
Date: Friday, April 13, 2012, 4:57 PM

Confirmed, when I installed my python as a framework, (With homebrew, `brew 
install python --framework`) the focus now works properly.-E

On Thu, Apr 12, 2012 at 7:57 PM, Chris Laumann claum...@physics.harvard.edu 
wrote:


Actually I don't know about the apple supplied python, but I believe enthoughts 
python is installed as a framework.





C







On Apr 12, 2012, at 8:53 PM, Michiel de Hoon mjldeh...@yahoo.com wrote:



 --- On Wed, 4/11/12, Zachary Pincus zachary.pin...@yale.edu wrote:

 Hopefully someone who knows more about the OS X backend can

 comment here...



 It sounds like the Python you are using is not installed as a framework. 
 Using the --enable-framework flag when compiling Python.



 -Michiel.



 --

 For Developers, A Lot Can Happen In A Second.

 Boundary is the first to Know...and Tell You.

 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!

 http://p.sf.net/sfu/Boundary-d2dvs2

 ___

 Matplotlib-users mailing list

 Matplotlib-users@lists.sourceforge.net

 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--

For Developers, A Lot Can Happen In A Second.

Boundary is the first to Know...and Tell You.

Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!

http://p.sf.net/sfu/Boundary-d2dvs2

___

Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Focus in OSX

2012-04-12 Thread Michiel de Hoon
--- On Wed, 4/11/12, Zachary Pincus zachary.pin...@yale.edu wrote:
 Hopefully someone who knows more about the OS X backend can
 comment here...

It sounds like the Python you are using is not installed as a framework. Using 
the --enable-framework flag when compiling Python.

-Michiel.

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Animation example error on Mac after installation

2012-01-19 Thread Michiel de Hoon
The animation code is currently not fully implemented in the MacOSX backend 
because the way the general framework of animations is set up in Matplotlib (at 
least last time I checked) is not compatible with drawing on Mac OS X. In 
particular, the problem is that on Mac OS X all drawing should be done from 
inside the event loop; the animations code also tries to draw outside of the 
event loop. Somebody would have to go through the animations code in matplotlib 
to sort this out. See e.g. this previous thread on the devel mailing list:

http://sourceforge.net/mailarchive/forum.php?thread_name=989472.4458.qm%40web62407.mail.re1.yahoo.comforum_name=matplotlib-devel

Best,
-Michiel.

--- On Sun, 1/15/12, Nathan Salomonis nsalomo...@gmail.com wrote:

From: Nathan Salomonis nsalomo...@gmail.com
Subject: [Matplotlib-users] Animation example error on Mac after installation
To: matplotlib-users@lists.sourceforge.net
Date: Sunday, January 15, 2012, 2:14 AM

Greetings,

I just installed matplotlib on my Mac OS 10.6 Machine (64bit) with default 
Python 2.7.1 (easy_install). While the initial 2D graph examples work great, 
when testing any of the animations, such as:
http://matplotlib.sourceforge.net/examples/animation/simple_anim.html


I always get the same error:

File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/animation.py,
 line 248, in _blit_clear
    a.figure.canvas.restore_region(bg_cache[a])

AttributeError: 'FigureCanvasMac' object has no attribute 'restore_region'

Since restore_region is only in backend_agg.py and not in backend_macosx.py, 
After reading more on this, I thought this might be corrected by re-installing 
from source and setting the setup.cfg to macosx = True and backend = MacOSX 
prior to building, but this did not correct the issue. Also, changing backend: 
Agg to backend: MacOSX in:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc

didn't work either. Does anyone have experience with this or further insight?

Thanks,

Nathan




-Inline Attachment Follows-

--
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
-Inline Attachment Follows-

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
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] matplotlib 1.1 TypeError: a float is required problem

2012-01-06 Thread Michiel de Hoon
The problem seems to originate from this line in lib/matplotlib/sankey.py:

    patch = PathPatch(Path(vertices, codes),
  fc=kwargs.pop('fc', kwargs.pop('facecolor',
    '#bfd1d4')), # Custom defaults
  lw=kwargs.pop('lw', kwargs.pop('linewidth',
    '0.5')),
  **kwargs)

Note that the linewidth is set to the string '0.5' rather than the float 0.5. 
gc.set_linewidth is then called with the string '0.5' as the argument, which 
triggers the error. If I replace '0.5' by 0.5, the example runs fine with the 
MacOSX backend.

Is there a reason why this needs to be a string here? I would think that in 
general gc.set_linewidth should only accept floats and ints.

-Michiel.




--- On Fri, 1/6/12, Mingkui Li ken.mk...@gmail.com wrote:

From: Mingkui Li ken.mk...@gmail.com
Subject: [Matplotlib-users] matplotlib 1.1 TypeError: a float is required 
problem
To: matplotlib-users@lists.sourceforge.net
Date: Friday, January 6, 2012, 10:54 AM

I just updated matplotlib to 1.1 and want try the new features
Sankey Diagrams
and
Animation
but when I try the api example code: sankey_demo_basics.py

I got the error messages as 
below:==Traceback
 (most recent call last):  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py,
 line 884, in draw    func(*args)
  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper    draw(artist, renderer, *args, **kwargs)  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py,
 line 1983, in draw
    a.draw(renderer)  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper    draw(artist, renderer, *args, **kwargs)
  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py,
 line 385, in draw    gc.set_linewidth(lw)TypeError: a float is required
Traceback (most recent call last):  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper    draw(artist, renderer, *args, **kwargs)
  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/figure.py,
 line 884, in draw    func(*args)  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/axes.py,
 line 1983, in draw    a.draw(renderer)
  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/artist.py,
 line 55, in draw_wrapper    draw(artist, renderer, *args, **kwargs)  File 
/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py,
 line 385, in draw
    gc.set_linewidth(lw)TypeError: a float is 
required==
Then I looked into the 
file /Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/matplotlib/patches.py
at the line 384 the code is: gc.set_linewidth(lw)I added  lw = np.float(lw) 
before gc.set_linewidth(lw), then the example code runs successfully.
Any help?

Thanks for any reply.
-- 
Mingkui Li



-Inline Attachment Follows-

--
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
-Inline Attachment Follows-

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
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___

Re: [Matplotlib-users] Matplotlib show() error Mac OS X Lion

2011-11-09 Thread Michiel de Hoon
--- On Wed, 11/9/11, Russell E. Owen ro...@uw.edu wrote:
 There is no matplotlib binary for 64-bit Python yet because
 I've not 
 figured out how to build one successfully -- I get horrible
 conflicts 
 with Tcl/Tk.
 
Would it be possible to release a matplotlib binary for 64-bit Python using the 
MacOSX backend instead of tkagg?

Best,
-Michiel.

--
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] problems installing matplotlib on OS X Lion

2011-09-04 Thread Michiel de Hoon
What happens if you use the MacOSX backend instead of TkAgg? Or do you have to 
use TkAgg?

--Michiel.

--- On Sun, 9/4/11, Lynn Oliver rayco...@gmail.com wrote:

From: Lynn Oliver rayco...@gmail.com
Subject: Re: [Matplotlib-users] problems installing matplotlib on OS X Lion
To: Bryan K Woods bwo...@aer.com
Cc: matplotlib-users@lists.sourceforge.net 
matplotlib-users@lists.sourceforge.net
Date: Sunday, September 4, 2011, 3:38 AM

Bryan, thanks for the response.
I installed macports and the environment settings seem to be correct, but when 
I try port help selfupdate I get:/opt/local/bin/port: line 4: /usr/bin/tclsh: 
No such file or directory/opt/local/bin/port: line 4: exec: /usr/bin/tclsh: 
cannot execute: No such file or directory
I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but 
still get the same warnings.  
Matplotlib is now complaining about the missing Tcl8.6:
ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so,
 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl.  
I am assuming that your unsuccessful install via macports was after you had 
macports working; do you know what version of Tcl was installed?
Macports fails with the same warnings after putting a link to tclsh8.5 in 
/usr/bin/tchsh.
I still seem to be running in circles.
Lynn



On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:
I had a problem getting with Lion as well. I was able to work around it by:1) 
unsuccessfully trying to install matplotlib for python 2.7 via macports2) then 
using easy_install to install matplotlib

Bryan K. Woods, Ph.D.Staff ScientistAtmospheric  Environmental Research, 
inc.bwo...@aer.com
On Sep 4, 2011, at 1:06 AM, Lynn Oliver rayco...@gmail.com wrote:

After many unsuccessful attempts at getting matplotlib installed on OS X Lion, 
I ran across this page:Installing Matplotlib on OS X 10.7 with Homebrew « 
Random Musings for the Digital Age
Following these instructions got me the closest I have been:
$ brew install python$ brew install gfortran$ brew install pkg-config$ 
easy_install pip$ pip install numpy$ cd $HOME$ git clone 
https://github.com/matplotlib/matplotlib.git$ cd matplotlib$ python setup.py 
build$ python setup.py install
At the moment, I'm trying to get a script that was working on EPD 7.1 to work 
on Python 2.7.2.  I'm using the TkAgg backend.
The first messages I see when running the script are:
objc[68962]: Class TKApplication is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.objc[68962]: Class TKMenu is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.objc[68962]: Class TKContentView is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.objc[68962]: Class TKWindow is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
For both Tk and Tcl, ../Versions/Current points to 8.6.  
From there, everything is fine until it executes show(), when I get the 
following messages:
Exception in Tkinter callbackTraceback (most recent call last):  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py,
 line 1410, in __call__    return self.func(*args)  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py,
 line 236, in resize    self.show()  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py,
 line 240, in draw    tkagg.blit(self._tkphoto, self.renderer._renderer, 
colormode=2)  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py,
 line 19, in blit    tk.call(PyAggImagePhoto, photoimage, id(aggimage), 
colormode, id(bbox_array))TclError
Can anyone suggest how to resolve this problem?
Thanks,Lynn--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-Inline Attachment Follows-

--
Special Offer -- 

Re: [Matplotlib-users] problems installing matplotlib on OS X Lion

2011-09-04 Thread Michiel de Hoon
What happens if you use the MacOSX backend instead of TkAgg? Or do you have to 
use TkAgg?

--Michiel.

--- On Sun, 9/4/11, Lynn Oliver rayco...@gmail.com wrote:

From: Lynn Oliver rayco...@gmail.com
Subject: Re: [Matplotlib-users] problems installing matplotlib on OS X Lion
To: Bryan K Woods bwo...@aer.com
Cc: matplotlib-users@lists.sourceforge.net 
matplotlib-users@lists.sourceforge.net
Date: Sunday, September 4, 2011, 3:38 AM

Bryan, thanks for the response.
I installed macports and the environment settings seem to be correct, but when 
I try port help selfupdate I get:/opt/local/bin/port: line 4: /usr/bin/tclsh: 
No such file or directory/opt/local/bin/port: line 4: exec: /usr/bin/tclsh: 
cannot execute: No such file or directory
I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but 
still get the same warnings.  
Matplotlib is now complaining about the missing Tcl8.6:
ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so,
 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl.  
I am assuming that your unsuccessful install via macports was after you had 
macports working; do you know what version of Tcl was installed?
Macports fails with the same warnings after putting a link to tclsh8.5 in 
/usr/bin/tchsh.
I still seem to be running in circles.
Lynn



On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:
I had a problem getting with Lion as well. I was able to work around it by:1) 
unsuccessfully trying to install matplotlib for python 2.7 via macports2) then 
using easy_install to install matplotlib

Bryan K. Woods, Ph.D.Staff ScientistAtmospheric  Environmental Research, 
inc.bwo...@aer.com
On Sep 4, 2011, at 1:06 AM, Lynn Oliver rayco...@gmail.com wrote:

After many unsuccessful attempts at getting matplotlib installed on OS X Lion, 
I ran across this page:Installing Matplotlib on OS X 10.7 with Homebrew « 
Random Musings for the Digital Age
Following these instructions got me the closest I have been:
$ brew install python$ brew install gfortran$ brew install pkg-config$ 
easy_install pip$ pip install numpy$ cd $HOME$ git clone 
https://github.com/matplotlib/matplotlib.git$ cd matplotlib$ python setup.py 
build$ python setup.py install
At the moment, I'm trying to get a script that was working on EPD 7.1 to work 
on Python 2.7.2.  I'm using the TkAgg backend.
The first messages I see when running the script are:
objc[68962]: Class TKApplication is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.objc[68962]: Class TKMenu is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.objc[68962]: Class TKContentView is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.objc[68962]: Class TKWindow is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
For both Tk and Tcl, ../Versions/Current points to 8.6.  
From there, everything is fine until it executes show(), when I get the 
following messages:
Exception in Tkinter callbackTraceback (most recent call last):  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py,
 line 1410, in __call__    return self.func(*args)  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py,
 line 236, in resize    self.show()  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py,
 line 240, in draw    tkagg.blit(self._tkphoto, self.renderer._renderer, 
colormode=2)  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py,
 line 19, in blit    tk.call(PyAggImagePhoto, photoimage, id(aggimage), 
colormode, id(bbox_array))TclError
Can anyone suggest how to resolve this problem?
Thanks,Lynn--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-Inline Attachment Follows-

--
Special Offer -- 

Re: [Matplotlib-users] animations in macosx/wxagg

2011-07-02 Thread Michiel de Hoon
Dear Chris,

 - can the native macos backend be used for animation?

Yes.

 What's the
 equivalent of gobject.idle_add or gobject.timeout_add?

If you use the recent backend-independent animation code, you won't need those. 
See examples/animation/simple_anim.py on github for an example (this code is 
not yet in an official release). However, blitting won't work, so you'll need 
to switch that off.

 Anything special needed for the blitting approach to work?

Currently it won't work with the MacOSX backend. For blitting to work with the 
MacOSX backend, we won't just need changes to the backend code (which is 
relatively straightforward) but also to the upstream 
lib/matplotlib/animation.py code. We will need to rethink the logic of blitting 
with animation, in particular when to store the figure to be blitted, and when 
to do the actual blitting. In the current version of 
lib/matplotlib/animation.py, the figure to be blitted gets stored after the 
figure is modified but before the screen is updated. With the other backends, 
this results in the unmodified figure being stored; with the MacOSX backend, 
this results in the modified figure being stored, so if you then blit it you 
will see an incorrect background.

--Michiel.


 
 - What needs to be done to get WXAgg blitting? I have code
 like this:
 ...
 matplotlib.use('WXAgg')
 ...
 def update():
     ...
     # restore, blit etc
     wx.WakeUpIdle()
 
 ...
 wx.EVT_IDLE(wx.GetApp(), update)
 ...
 
 On Linux this draws the first screen and pauses. If I move
 the mouse
 around I see the updates. As soon as I stop, so do the
 updates. What
 am I missing? (BTW I get the same behaviour from
 animation_blit_wx.py
 from the examples page). This is 1.0.1 on Linux, although
 I'm still
 using 0.99.1 as well.
 
 thanks for any help,
 
 cheers, chris
 
 
 
 
 
 -- 
 Chris Higgins, Omnisense Ltd, 3rd Floor, St. Andrews
 House,
 59 St Andrews Street, Cambridge, CB2 3BZ
 Office: +44 (0) 1223 651394
 Mobile: +44 (0) 780 490 8562
 Skype: chiggins99
 http://www.omnisense.co.uk
 
 Omnisense Ltd is a company registered in England and Wales.
 Registered number: 6779286.
 Registered office: St. Andrews House, 59 St Andrews Street,
 Cambridge, CB2 3BZ
 
 --
 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] Qt4 on OSX

2011-03-23 Thread Michiel de Hoon
OK, thanks. I got the same behavior using Python (instead of ipython).
Non-interactive usage has not yet been implemented in the MacOSX backend. We 
should be able to fix the bug that you found when implementing 
interactive/non-interactive usage for the MacOSX backend.

Thanks,
--Michiel.

--- On Wed, 3/23/11, Daniel Welling dantwell...@gmail.com wrote:

From: Daniel Welling dantwell...@gmail.com
Subject: Re: [Matplotlib-users] Qt4 on OSX
To: Michiel de Hoon mjldeh...@yahoo.com
Cc: matplotlib-users@lists.sourceforge.net
Date: Wednesday, March 23, 2011, 12:27 PM

Greetings again, Michiel.  Please excuse my slow response time...
First, thanks for explaining the Framework stuff; it clarifies situation.  I'll 
be sure to never blame the OSX backend where it is not warranted!

Unfortunately (in terms of easy explanations):In [3]: 
MacOS.WMAvailable()Out[3]: True
crap.
Fortunately, I've been able to nail down the problem:
bash-3.2$ ipythonPython 2.6.6 (r266:84292, Jan 18 2011, 14:07:55) Type 
copyright, credits or license for more information.
IPython 0.10.1 -- An enhanced Interactive Python.
?         - Introduction and overview of IPython's features.%quickref - Quick 
reference.help      - Python's own help system.object?   - Details about 
'object'. ?object also works, ?? prints more.

In [2]: import matplotlib.pyplot as pltIn [3]: plt.plot([0,1])Out[3]: 
[matplotlib.lines.Line2D object at 0x118c6be90]In [4]: plt.show()(Here, 
saving the plot works like normal.)
In [5]: plt.ion()In [6]: plt.plot([0,1])Out[6]: [matplotlib.lines.Line2D 
object at 0x118c8bc90](Now, when trying to save the plot, the save and 
cancel buttons no longer respond.  I must kill python from another terminal.)

So that's the situation with OSX.  It's something that comes up frequently 
enough (typically a quick plot turns into a more thorough customization 
followed by the lockup) that TK becomes a more viable option for me though OSX 
is faster and has better file navigation features.  Again, if QT4 was working, 
that is certainly my weapon of choice...


On Mon, Mar 21, 2011 at 7:14 AM, Michiel de Hoon mjldeh...@yahoo.com wrote:

--- On Sun, 3/20/11, Daniel Welling dantwell...@gmail.com wrote:

 The OSX backend used to have a bug where you cannot type a
 name in the file name text box.Since that has been fixed, ...

That was not a bug in the MacOSX backend (and therefore was not fixed), but is 
related to how Python is installed on your system: If your Python is not a 
framework installation, it will not interact correctly with Apple's windowing 
manager. This is due to OS X itself and is independent of the MacOSX backend.

I
 have found a new bug: every so often, when you go to save a file, the 
save and cancel button stop responding, trapping the user in file 
saving limbo.  I'll have to play with it again to figure out what 
triggers this.

Can you check if your Python is built as a framework? If it is, 
MacOS.WMAvailable() should return True:

$ python
Python 2.7.1 (r271:86832, Mar 12 2011, 13:44:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin

Type help, copyright, credits or license for more information.
 import MacOS
 MacOS.WMAvailable()
True
 


Best,

--Michiel.




  




  --
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Qt4 on OSX

2011-03-21 Thread Michiel de Hoon
--- On Sun, 3/20/11, Daniel Welling dantwell...@gmail.com wrote:
 The OSX backend used to have a bug where you cannot type a
 name in the file name text box.Since that has been fixed, ...

That was not a bug in the MacOSX backend (and therefore was not fixed), but is 
related to how Python is installed on your system: If your Python is not a 
framework installation, it will not interact correctly with Apple's windowing 
manager. This is due to OS X itself and is independent of the MacOSX backend.
I
 have found a new bug: every so often, when you go to save a file, the 
save and cancel button stop responding, trapping the user in file 
saving limbo.  I'll have to play with it again to figure out what 
triggers this.

Can you check if your Python is built as a framework? If it is, 
MacOS.WMAvailable() should return True:

$ python
Python 2.7.1 (r271:86832, Mar 12 2011, 13:44:53) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type help, copyright, credits or license for more information.
 import MacOS
 MacOS.WMAvailable()
True
 


Best,
--Michiel.




  --
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Qt4 on OSX

2011-03-20 Thread Michiel de Hoon
--- On Wed, 3/16/11, Daniel Welling dantwell...@gmail.com wrote:
After
 playing with backends quite a bit, I have found that the best one in 
terms of speed, robustness, and features is Qt4Agg - especially on OSX, 
where the MacOSX backend is buggy and many others just don't plain 
work.  



Why do you think that the MacOSX backend is buggy?

--Michiel.







  --
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Michiel de Hoon
I have compiled matplotlib with a 64 bit Python on Mac OS X (using setup.py) 
for the MacOSX backend. It's not as hard as it may seem.
You will need 64-bit (or multiple-architecture) libraries for zlib, libpng, 
etc. You may have those already; you can check that by running file on the 
library. For example:

$ file /usr/local/lib/libpng.dylib 
/usr/local/lib/libpng.dylib: Mach-O universal binary with 2 architectures
/usr/local/lib/libpng.dylib (for architecture i386):Mach-O dynamically 
linked shared library i386
/usr/local/lib/libpng.dylib (for architecture x86_64):  Mach-O 64-bit 
dynamically linked shared library x86_64

If the library is 32-bit only, then you will have to compile your own zlib, 
libpng etc. If the library includes 64-bit, then you just need to compile 
matplotlib.

--Michiel.

--- On Tue, 2/22/11, Gideon Simpson simp...@math.toronto.edu wrote:

 From: Gideon Simpson simp...@math.toronto.edu
 Subject: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7
 To: matplotlib-users@lists.sourceforge.net
 Date: Tuesday, February 22, 2011, 1:35 PM
 Hi, I have OS X 10.6.6, Python 2.7.1
 installed from the binary at python.org, and I am trying to
 get mpl 1.0.1 running.  I have no problem with
 numpy/scipy, but I seem to be having 32 vs. 64 bit issues
 with mpl.  I believe that the binaries online are only
 32 bit, yet my installation is 64 bit.  I have tried
 using the make.osx file, but this has not proved successful
 so far.  In part, I am trying to avoid installing
 duplicate png/zlib/freetype/... libraries, which seem to be
 working fine at present.  Has anyone successfully
 gotten this running from source?  Alternatively, does
 anyone have 64 bit binaries?
  
 -gideon
 
 
 --
 Free Software Download: Index, Search  Analyze Logs
 and other IT data in 
 Real-Time with Splunk. Collect, index and harness all the
 fast moving IT data 
 generated by your applications, servers and devices whether
 physical, virtual
 or in the cloud. Deliver compliance at lower cost and gain
 new business 
 insights. http://p.sf.net/sfu/splunk-dev2dev 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] MacOSX backend bug

2011-02-22 Thread Michiel de Hoon
It sounds like your Python is not a framework build.

--Michiel.

--- On Tue, 2/22/11, Dominique Orban dominique.or...@gmail.com wrote:

 From: Dominique Orban dominique.or...@gmail.com
 Subject: [Matplotlib-users] MacOSX backend bug
 To: matplotlib-users@lists.sourceforge.net
 Date: Tuesday, February 22, 2011, 1:48 PM
 Hi there,
 
 $ uname -a
 Darwin nazgul.local 10.6.0 Darwin Kernel Version 10.6.0:
 Wed Nov 10
 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386
 $ python -c 'import matplotlib ; print
 matplotlib.__version__'
 1.0.1
 
 I installed Matplotlib from Pypi.
 
 I'm having two problems with the MacOSX backend:
 
 1) Plot windows systematically appear *behind* any other
 window. This
 makes it difficult to find them.
 
 2) I can't type anything in the save dialog box. The cursor
 blinks in
 the text box, but any typing goes to the terminal. This is
 the same I
 believe as http://old.nabble.com/save-dialogue-in-macosx-bug-p27966555.html
 
 I attach a screenshot to explain more clearly what's
 happening. Typing
 'filename' in the save dialog box results in 'filename'
 being
 displayed in the terminal window, where the red arrow
 points to.
 
 This seems to be related to the MacOSX backend as switching
 to TkAgg
 resolves #2 (#1 still happens).
 
 Any ideas?
 
 -- 
 Dominique
 
 -Inline Attachment Follows-
 
 --
 Free Software Download: Index, Search  Analyze Logs
 and other IT data in 
 Real-Time with Splunk. Collect, index and harness all the
 fast moving IT data 
 generated by your applications, servers and devices whether
 physical, virtual
 or in the cloud. Deliver compliance at lower cost and gain
 new business 
 insights. http://p.sf.net/sfu/splunk-dev2dev
 
 -Inline Attachment Follows-
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

--
Free Software Download: Index, Search  Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Backgroundcolor for text

2010-11-13 Thread Michiel de Hoon
I wasn't able to replicate this bug 
with the MacOS backend. 
--Michiel

On Sat Nov 13th, 2010 1:15 AM EST Jae-Joon Lee wrote:

I cannot reproduce this with agg, ps and pdf backend.
Maybe this bug is specific to the Mac oS X backend?

Regards,

-JJ


On Sat, Nov 13, 2010 at 5:19 AM, Bror Jonsson b...@biologicalpump.org wrote:

 Dear all,

 I must be doing something wrong, but it seems like the backgroundcolor 
 statement for text just stopped working. I am using matplotlib 1.0.0 with 
 MacOSX as backend on two different machines. If I run

 ipython -pylab

 text(0,0,'Kalle',backgroundcolor='0.6')

 I get this result:



 (The problem is that the text color switches to pale grey). This worked fine 
 before. Does anyone else get this problem, and do you have any idea about 
 how to trouble shoot it?

 Regards,

 Bror Jonsson
 --
 Centralized Desktop Delivery: Dell and VMware Reference Architecture
 Simplifying enterprise desktop deployment and management using
 Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
 client virtualization framework. Read more!
 http://p.sf.net/sfu/dell-eql-dev2dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users



  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac OSX backend

2010-11-13 Thread Michiel de Hoon
OK, thanks. With your example, I see a difference between the Mac OS X backend 
and the TKAgg/GtkAgg backend but only if interactive is False in matplotlibrc. 
If interactive is True, both the Mac OS X backend and the TkAgg backend open 
windows. Is this really the desired behavior? It seems counterintuitive that 
such a global parameter can determine whether a figure is opened or not.

While we're on the topic, is this interactive parameter still needed in 
matplotlib? In my understanding, in older versions of matplotlib, 
interactive=False could significantly speed up some plots. But are there still 
any such cases with the current organization of the drawing code in matplotlib?

Thanks,
--Michiel.

--- On Fri, 11/12/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] Mac OSX backend
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: mdekauwe mdeka...@gmail.com, matplotlib-users@lists.sourceforge.net
 Date: Friday, November 12, 2010, 9:06 AM
 On Thu, Nov 11, 2010 at 7:32 PM,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
  For this example, I am finding the exact same behavior
 with the Mac OS X backend as with the gtkcairo and gtkagg
 backends (on Mac OS X and Cygwin). If this is a bug, then
 which backend can we use as an example of the correct
 behavior for this code?
 
 On a quick test, the following script
 
   import matplotlib.pyplot as plt
   for i in range(4):
       fig = plt.figure()
 
 
 (no show) run with -dTkAGG and -dGTKAgg, does not raise a
 figure
 window in svn HEAD.  I thought the OP was complaining
 that the figure
 was being raised w/o a call to show in macosx (don't have
 ready access
 to test on an osx box right now)
 
 JDH
 


  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac OSX backend

2010-11-13 Thread Michiel de Hoon
Thanks for your reply.
But nowadays drawing is done through draw_idle, so we don't trigger additional 
drawing even if interactive is True. In your example, if run as a script, there 
is no drawing until a call to show() is made, regardless of whether interactive 
is True or False.

Best,
--Michiel.



--- On Sat, 11/13/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] Mac OSX backend
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: mdekauwe mdeka...@gmail.com, matplotlib-users@lists.sourceforge.net
 Date: Saturday, November 13, 2010, 9:22 AM
 On Sat, Nov 13, 2010 at 7:46 AM,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
  OK, thanks. With your example, I see a difference
 between the Mac OS X backend and the TKAgg/GtkAgg backend
 but only if interactive is False in matplotlibrc. If
 interactive is True, both the Mac OS X backend and the TkAgg
 backend open windows. Is this really the desired behavior?
 It seems counterintuitive that such a global parameter can
 determine whether a figure is opened or not.
 
  While we're on the topic, is this interactive
 parameter still needed in matplotlib? In my understanding,
 in older versions of matplotlib, interactive=False could
 significantly speed up some plots. But are there still any
 such cases with the current organization of the drawing code
 in matplotlib?
 
 
 Yes, this is the desired behavior.  The interactive :
 True parameter
 is useful when working interactively from the shell, when
 want to do
 
   plt.figure()
   plt.plot([1,2,3])
   plt.xlabel('a label')
 
 and have the figure show up on the figure call and update
 on the plot
 and xlabel call.  This is most definitely not what you
 want to do in a
 script, because you don't want to pay for the draw until
 the end (when
 a call to show is made).  This is discussed at
 
   http://matplotlib.sourceforge.net/users/shell.html
 
 JDH
 


  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac OSX backend

2010-11-13 Thread Michiel de Hoon
--- On Sat, 11/13/10, John Hunter jdh2...@gmail.com wrote:
 Ie if we have a script like
 
   # some plotting commands
   ...
 
   # some expensive non GUI computation
   ...
 
   # some update to plot above
   ...
 
 Would we not run the risk that the GUI is idle in the non
 GUI computation and therefore trigger a draw in it's thread,
 and then do redraws again after the update code?

In the MacOSX backend, everything is single-threaded, so this won't occur.

I am not sufficiently familiar with the non-MacOSX backends to give a detailed 
answer, but with multiple threads the idle refers to the Python thread being 
idle rather than the GUI thread being idle. In other words, when there are no 
more Python commands left to be handled, the GUI thread is notified that it 
should start redrawing.

 Are you proposing that we can get rid of the interactive setting
 entirely, always call draw on pyplot commands, and let the
 idle handler save us from doing repeated draws?

Yes (I assume you mean to always call draw_idle on pyplot commands). If there 
are then still cases where we do get repeated draws, then that is a bug.

Best,
--Michiel.


  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac OSX backend

2010-11-13 Thread Michiel de Hoon
Thanks for your reply.

--- On Sat, 11/13/10, Eric Firing efir...@hawaii.edu wrote:
 In the gtk backend, draw_idle calls gobject.idle_add 
 
 Thus, idle means the gui event loop has no higher
 priority events.  Is 
 this condition reached only at the end of the script?

With Python, there is only one thread (running both Python and the GUI). So the 
GUI event loop won't start until the end of the script, so there is no 
inadvertent redrawing regardless of interactive being True or False.
With ipython, I am not sure if they are using one thread, or one thread for 
Python and one thread for the GUI. But in practice, in ipython I also don't 
find any evidence of inadvertent redrawing. For example, this script:

import matplotlib
matplotlib.use(gtkagg)
import matplotlib.pyplot as plt
import numpy

x = numpy.random.random(40)
y = x + numpy.random.random(40)
plt.figure()
plt.hexbin(x, y, gridsize=300)
for i in range(1000):
plt.xlabel('a label')
plt.show()

both with python and ipython take an equal amount of time regardless of 
interactive being True or False. If there were any redrawing after each call to 
plt.xlabel, this script would take forever.

 Reminder: the interactive setting controls
 draw_if_interactive, which is 
 what we are talking about here, but also whether or not
 show() blocks. 
 So we may not need draw_if_interactive, but unless we can
 dispense with 
 show entirely, we will still need an interactive setting.

If matplotlib were always interactive, then I don't see a good reason for 
non-blocking show().

 Returning to the issue raised by the OP, however, the
 question is 
 whether the present MacOSX behavior (windows pop up) or the
 non-MacOSX 
 behavior (they don't in non-interactive mode until/unless
 show() is 
 called) is what we really want.  It seems to me that
 we should preserve 
 some way of getting this second behavior.

I agree. For example, if a user wants to make a figure for the sole purpose of 
creating a PNG file, there should be a way to do this without the figure 
popping up as a window.

--Michiel.


  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac OSX backend

2010-11-11 Thread Michiel de Hoon
For this example, I am finding the exact same behavior with the Mac OS X 
backend as with the gtkcairo and gtkagg backends (on Mac OS X and Cygwin). If 
this is a bug, then which backend can we use as an example of the correct 
behavior for this code?

Best,
--Michiel


--- On Thu, 11/11/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] Mac OSX backend
 To: mdekauwe mdeka...@gmail.com
 Cc: matplotlib-users@lists.sourceforge.net, Michiel de Hoon 
 mjldeh...@yahoo.com
 Date: Thursday, November 11, 2010, 7:39 AM
 On Thu, Nov 11, 2010 at 6:32 AM,
 mdekauwe mdeka...@gmail.com
 wrote:
 
  It isn't any one script, if you did
 
  import numpy as np
  import matplotlib.pyplot as plt
  x = np.arange(10)
  for i in xrange(10):
     plt.plot(x)
     plt.savefig('x.png')
 
  it pops up the plot window even though I didn't ask it
 to. I don't get this
  functionality on a non mac system. So I wonder if it
 relates to the choice
  of backend
 
 
 I see -- so it is raising the window even w/o show. 
 This is a bug,
 but a minor one.  I suggest at the top of your script
 (before pyplot
 import) doing
 
 import matplotlib
 matplotlib.use('agg')
 
 if you only want to save hardcopy png -- macosx may not
 support
 offline rendering.
 


  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] python v ipython problem in imshow()

2010-11-11 Thread Michiel de Hoon
Thanks for your reply.
Just to make sure I understand correctly: Do you still think that there is a 
bug in the Mac OS X backend? Or does the bug only appear with wx?

Best,
--Michiel.

--- On Thu, 11/11/10, Garry Willgoose garry.willgo...@newcastle.edu.au wrote:

 From: Garry Willgoose garry.willgo...@newcastle.edu.au
 Subject: Re: [Matplotlib-users] python v ipython problem in imshow()
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: Garry Willgoose garry.willgo...@newcastle.edu.au, John Hunter 
 jdh2...@gmail.com, matplotlib-users@lists.sourceforge.net
 Date: Thursday, November 11, 2010, 10:00 PM
  Michiel,
 
 With some digging around in my own code  I have been
 able to reproduce the bug with the matplotlib example. My
 code uses wxPython and somewhere it sets the backend to 'WX'
 (this seems to require a bit more than simply 'import wx'
 but I haven't pursued what it might be ... there are several
 thousand lines of code before I get to the plotting). 
 the code below triggers the problem
 
 import wx
 import matplotlib
 print 'matplotlib backend',matplotlib.rcParams['backend']
 matplotlib.use('WX')
 print 'matplotlib backend',matplotlib.rcParams['backend']
 
 from pylab import *
 x = arange(100.0); x.shape = 10,10
 interp = 'bilinear';
 lim = -2,11,-2,6
 subplot(211, axisbg='g')
 title('blue should be up')
 imshow(x, origin='upper', interpolation=interp)
 subplot(212, axisbg='y')
 title('blue should be down')
 imshow(x, origin='lower', interpolation=interp)
 show()
 
 
 if I set the backend to WxAgg then the problem doesn't
 occur and if I don't set it all (so its MacOSX) then all is
 fine. In the example above the top graph is fine but the
 lower one is solid yellow. This behaviour is different from
 my code which shows the same image for both origin='upper'
 and 'lower'. My platform is enthought 6.1-1 with matplotlib
 0.99.1.1.
 
 Given that WXAgg works are there any are the implications
 of WXAgg early in my plotting part of the code (this may
 result in multiple calls to set the backend) versus letting
 matplotlib itself set WX. I just tried to set WXAgg
 immediately after the first 'import wx' after program
 startup but it had set to WX by the time it got the place
 where the plots were made.
 
  I haven't been able to replicate this bug. With all
 matplotlib versions
  I tried (including 0.99.0, 0.99.1., 0.99.1.1,
 0.99.1.2, 1.0.0, and the current source code in svn), this
 example works correctly with the Mac OS X backend.
  Garry, what is the exact code that you are using?
  
  --Michiel.
  
  
  --- On Wed, 11/10/10, John Hunter jdh2...@gmail.com
 wrote:
  
  From: John Hunter jdh2...@gmail.com
  Subject: Re: [Matplotlib-users] python v ipython
 problem in imshow()
  To: Michiel de Hoon mjldeh...@yahoo.com
  Cc: Garry Willgoose garry.willgo...@newcastle.edu.au,
 matplotlib-users@lists.sourceforge.net
  Date: Wednesday, November 10, 2010, 10:59 AM
  On Wed, Nov 10, 2010 at 9:48 AM,
  Michiel de Hoon mjldeh...@yahoo.com
  wrote:
  Garry, if the bug still exists in matplotlib
 1.0 could
  you open a bug report for it?
  
  
  I think Gary doesn't have easy access to
 1.0.  Here is
  the relevant
  example if anyone has 1.0 on macosx to test with
  
    http://matplotlib.sourceforge.net/examples/pylab_examples/image_origin.html
  
  JDH
  
  
  
  
  
 
 --
  Centralized Desktop Delivery: Dell and VMware
 Reference Architecture
  Simplifying enterprise desktop deployment and
 management using
  Dell EqualLogic storage and VMware View: A highly
 scalable, end-to-end
  client virtualization framework. Read more!
  http://p.sf.net/sfu/dell-eql-dev2dev
  ___
  Matplotlib-users mailing list
  Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 
 Prof Garry Willgoose,
 Australian Professorial Fellow in Environmental
 Engineering,
 Director, Centre for Climate Impact Management (C2IM),
 School of Engineering, The University of Newcastle,
 Callaghan, 2308
 Australia.
 
 Centre webpage: www.c2im.org.au
 
 Phone: (International) +61 2 4921 6050 (Tues-Fri AM); +61 2
 6545 9574 (Fri PM-Mon)
 FAX: (International) +61 2 4921 6991 (Uni); +61 2 6545 9574
 (personal and Telluric)
 Env. Engg. Secretary: (International) +61 2 4921 6042
 
 email:  garry.willgo...@newcastle.edu.au;
 g.willgo...@telluricresearch.com
 email-for-life: garry.willgo...@alum.mit.edu
 personal webpage: www.telluricresearch.com/garry
 
 Do not go where the path may lead, go instead where there
 is no path and leave a trail
                
           Ralph Waldo Emerson

Re: [Matplotlib-users] python v ipython problem in imshow()

2010-11-10 Thread Michiel de Hoon
Garry, if the bug still exists in matplotlib 1.0 could you open a bug report 
for it?

Thanks,
--Michiel.

--- On Wed, 11/10/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] python v ipython problem in imshow()
 To: Garry Willgoose garry.willgo...@newcastle.edu.au, Michiel de Hoon 
 mjldeh...@yahoo.com
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Wednesday, November 10, 2010, 8:28 AM
 On Wed, Nov 10, 2010 at 5:43 AM,
 Garry Willgoose
 garry.willgo...@newcastle.edu.au
 wrote:
  John,
 
  OK by looking at matplotlib.rcParams['backend'] I've
 been able to diagnose this a little more.
 
  When the backend is  'WXAgg' everything looks fine.
 The axes have (0,0) where you would expect and the data is
 plotted correctly.
 
  However, when the backend is 'MacOSX' the axes again
 have (0,0) where you would expect but the data is plotted so
 it is flipped vertically (i.e. what is at the top is at the
 bottom, and vice versa).
 
  It doesn't look like an issue between python and
 ipython, or at least I don't seem to have been able to
 reproduce it tonight
 
  I'm using matplotlib version 0.99.1.1. Is this likely
 to be fixed in V1.0? I haven't upgraded to the latest
 enthought distribution because I had some problems with the
 binary extension libraries I have written ... I ought to
 sort it out but I've got a bit of deadline approaching and
 I'd prefer to leave it til later
 
 It looks like the macosx backend has not implemented
 support for the
 image origin parameter.  I'm CC-ing Michiel, the
 macosx author, to see
 if this is something he can add support for.
 
 Thanks,
 JDH
 


  

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] python v ipython problem in imshow()

2010-11-10 Thread Michiel de Hoon
I haven't been able to replicate this bug. With all matplotlib versions 
I tried (including 0.99.0, 0.99.1., 0.99.1.1, 0.99.1.2, 1.0.0, and the current 
source code in svn), this example works correctly with the Mac OS X backend.
Garry, what is the exact code that you are using?

--Michiel.


--- On Wed, 11/10/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] python v ipython problem in imshow()
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: Garry Willgoose garry.willgo...@newcastle.edu.au, 
 matplotlib-users@lists.sourceforge.net
 Date: Wednesday, November 10, 2010, 10:59 AM
 On Wed, Nov 10, 2010 at 9:48 AM,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
  Garry, if the bug still exists in matplotlib 1.0 could
 you open a bug report for it?
 
 
 I think Gary doesn't have easy access to 1.0.  Here is
 the relevant
 example if anyone has 1.0 on macosx to test with
 
   http://matplotlib.sourceforge.net/examples/pylab_examples/image_origin.html
 
 JDH
 


  

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] show(), the state of the art

2010-11-03 Thread Michiel de Hoon
--- On Tue, 11/2/10, Benjamin Root ben.r...@ou.edu wrote:
I
 have personally seen significant progress in this area, but there are a
 few backends that aren't quite right (MacOSX backend, I believe?).

As far as I know, show() is working correctly in the MacOSX backend. If you 
encountered a case where the backend doesn't do the right thing, can you show a 
concrete example?

Best,
--Michiel.




  --
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Cygwin and matplotlib

2010-08-16 Thread Michiel de Hoon
Matplotlib works well with Cygwin (I am using it with the gtkcairo backend), 
but installing it can be a hassle. You'll have to fix errors such as the ones 
you're seeing by modifying setup.py or setupext.py.
--Michiel.

--- On Mon, 8/16/10, Adam Gustafson am...@stat.washington.edu wrote:

From: Adam Gustafson am...@stat.washington.edu
Subject: [Matplotlib-users] Cygwin and matplotlib
To: matplotlib-users@lists.sourceforge.net
Date: Monday, August 16, 2010, 7:23 PM

Could someone please kindly let me know if matplotlib is compatible with 
Cygwin?  I installed all the necessary dependencies, yet I cannot get 
matplotlib to compile correctly.  At the build step, this is what I get:



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

BUILDING MATPLOTLIB
    matplotlib: 1.0.0


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

REQUIRED DEPENDENCIES
 numpy: 1.4.1


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


    * './freetype2'.

OPTIONAL BACKEND DEPENDENCIES
    libpng: found, but unknown version (no pkg-config)
    * Could not find 'libpng' headers in any of


    * '/usr/include', '.'
cygwin warning:
  MS-DOS style path detected: C:/Cygwin/usr/share/tcl8.4/tclConfig.sh
  Preferred POSIX equivalent is: /usr/share/tcl8.4/tclConfig.sh


  CYGWIN environment variable option nodosfilewarning turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames


Traceback (most recent call last):
  File setup.py, line 162, in module
    if check_for_tk() or (options['build_tkagg'] is True):
  File /home/Adam/installs/matplotlib-1.0.0/setupext.py, line 816, in 
check_for_tk


    explanation = add_tk_flags(module)
  File /home/Adam/installs/matplotlib-1.0.0/setupext.py, line 1080, in 
add_tk_flags
    result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)
  File /home/Adam/installs/matplotlib-1.0.0/setupext.py, line 938, in 
parse_tcl_config


    tk_lib = tk_vars.get(default, TK_LIB_SPEC)[1:-1].split()[0][2:]
IndexError: list index out of range



-Inline Attachment Follows-

--
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 
-Inline Attachment Follows-

___
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] CocoaAgg and Macosx backend

2010-06-06 Thread Michiel de Hoon
--- On Sun, 6/6/10, Brice Thurin br...@4doptics.com wrote:
 I was wondering if someone could let know what is the
 status of the two backends and if the CocoaAgg backend is
 still supported as it does not appear in the list of backend
 in the Faq.

As far as I can tell it still works, but it doesn't seem to be up to date with 
the other backends.

 I saw in one of the post of Michiel de Hoon dating back
 2008 that the MacOsX backend does not allow for integration
 of matplotlib within a cocoa application, I was wondering if
 it is still the case.

Maybe does not allow is too strong an expression. The MacOSX backend was not 
designed to be integrated within a cocoa application, but somebody sufficiently 
familiar with cocoa may be able to find a way to do so.

 Also, I tried to find some tutorial or example showing how
 to use the two backend but could not find one, maybe i
 overlooked something and would be grateful if someone could
 point it to me.
 
What do you mean by how to use the backend? In principle, the MacOSX backend 
has the same functionality as the other GUI backends.

--Michiel.


  

--
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] Mac backend problems for nearly all backends.

2010-05-26 Thread Michiel de Hoon
We can actually check from Python whether it's a framework install or not.

 import MacOS
 MacOS.WMAvailable()

returns True if it's a framework install, False if not.

I can add this check to the MacOSX backend and print out a warning if it's not 
a framework install.

--Michiel


--- On Wed, 5/26/10, Daniel Welling dantwell...@gmail.com wrote:

From: Daniel Welling dantwell...@gmail.com
Subject: Re: [Matplotlib-users] Mac backend problems for nearly all backends.
To: Michiel de Hoon mjldeh...@yahoo.com
Cc: matplotlib-users@lists.sourceforge.net
Date: Wednesday, May 26, 2010, 12:51 AM

2) In which case, it's not a framework install.  Fink puts everything into 
/sw/; there's nothing to do with pyton in /Library/Frameworks.Thanks for the 
clarification; I'm tempted to get Python from source and try this...

-dw
On Tue, May 25, 2010 at 10:41 PM, Michiel de Hoon mjldeh...@yahoo.com wrote:



 1)The problem does manifest in the same manner through the normal python
 prompt.

OK that is good to know.

 2) I'm not sure what is meant by a framework install.  Everything 
(except MPL 99.1.1)
 was installed through fink.

This is important. Check where python is installed. If 'which python' shows 
/Library/Frameworks/Python.framework/Versions/2.6/bin/python or something 
similar, you have a framework version. If on the other hand it shows 
/usr/bin/python, /usr/local/bin/python, or something similar, you don't have a 
framework version. I don't know what fink installs by default. If you don't 
have Python installed as a framework, some backends (including the MacOSX 
backend) will not interact properly with the window manager. This is a Mac 
peculiarity. If you build Python from source, you can specify to install a 
framework version by passing the --enable-framework option to the configure 
script.




 6) Although I use x11 and not the native Mac terminal, I'm not sure if this 
 requires me to  install different packages for the gui stuff.  Could you 
 guys expand on this, please?

Some backends go make use of X11 (e.g., the gtkcairo backend), others do not 
(e.g., the MacOSX backend). The MacOSX backend should work with both the native 
Mac terminal and with an X11 terminal.


--Michiel.









  




  --

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


Re: [Matplotlib-users] Mac backend problems for nearly all backends.

2010-05-25 Thread Michiel de Hoon
Are you using a framework install of Python? Also, does the MacOSX backend work 
with plain python instead of ipython?
--Michiel.

--- On Tue, 5/25/10, Daniel Welling dantwell...@gmail.com wrote:
MacOSX backend: Loads plots quickly, but when I try to save, I cannot type in 
the file name area of the save file dialog.  Furthermore, with ipython, I can 
continue to use the ipython prompt up until the I shut the plot window.  
ipython then freezes until I control-c it.  This occurs in both versions.



  --

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


Re: [Matplotlib-users] Mac backend problems for nearly all backends.

2010-05-25 Thread Michiel de Hoon


 1)The problem does manifest in the same manner through the normal python
 prompt.

OK that is good to know.

 2) I'm not sure what is meant by a framework install.  Everything 
(except MPL 99.1.1)
 was installed through fink.

This is important. Check where python is installed. If 'which python' shows 
/Library/Frameworks/Python.framework/Versions/2.6/bin/python or something 
similar, you have a framework version. If on the other hand it shows 
/usr/bin/python, /usr/local/bin/python, or something similar, you don't have a 
framework version. I don't know what fink installs by default. If you don't 
have Python installed as a framework, some backends (including the MacOSX 
backend) will not interact properly with the window manager. This is a Mac 
peculiarity. If you build Python from source, you can specify to install a 
framework version by passing the --enable-framework option to the configure 
script.



 6) Although I use x11 and not the native Mac terminal, I'm not sure if this 
 requires me to  install different packages for the gui stuff.  Could you 
 guys expand on this, please?

Some backends go make use of X11 (e.g., the gtkcairo backend), others do not 
(e.g., the MacOSX backend). The MacOSX backend should work with both the native 
Mac terminal and with an X11 terminal.

--Michiel.



  --

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


Re: [Matplotlib-users] show() at the end of each function of an ensemble of scripts

2010-04-22 Thread Michiel de Hoon
Actually which backend are you using? I'd like to try this to see what happens 
if show() is called more than once.

--Michiel.

--- On Tue, 4/20/10, Antony Lee antony@ensmp.fr wrote:
That would be a solution, indeed.  However, is there really no way of coming 
back to a pre-plt.show() state once all windows are closed?  What kind of 
irreversible things does plt.show() do?



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


Re: [Matplotlib-users] show() at the end of each function of an ensemble of scripts

2010-04-20 Thread Michiel de Hoon
--- On Tue, 4/20/10, Ryan May rma...@gmail.com wrote:
 Antony Lee antony@ensmp.fr wrote:
  That would be a solution, indeed.  However, is there
  really no way of coming back to a pre-plt.show() state
  once all windows are closed?  What kind of
  irreversible things does plt.show() do?
 
 It starts the GUI toolkit event loop, which starts to make
 things messy if you try to call show() again. It often works,
 but calling show() more than once is most-definitely not
 supported.

But what exactly does show() do that prevents it from being called again? At 
least for the Mac OS X and the gtkcairo backends, calling show() multiple times 
doesn't seem to cause any problems. Can you give an example where calling 
show() multiple times breaks things?  If there is such a case, it may reveal a 
lurking bug in show() itself.

--Michiel.


  

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


Re: [Matplotlib-users] show() at the end of each function of an ensemble of scripts

2010-04-20 Thread Michiel de Hoon
Well, the example with the comment WARNING : illustrating how NOT to use show:

for i in range(10):
# make figure i
show()

works perfectly fine with the Mac OS X backend, and I doubt that there is some 
fundamental reason why this can work with the Mac OS X backend but not with 
other backends.

--Michiel


--- On Tue, 4/20/10, Alan G Isaac alan.is...@gmail.com wrote:

 From: Alan G Isaac alan.is...@gmail.com
 Subject: Re: [Matplotlib-users] show() at the end of each function of an 
 ensemble of scripts
 To: matplotlib-users@lists.sourceforge.net
 Date: Tuesday, April 20, 2010, 9:51 PM
 http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show
 
 hth,
 Alan Isaac
 
 
 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

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


Re: [Matplotlib-users] Easy come easy go

2010-02-18 Thread Michiel de Hoon
I just uploaded a bugfix to the repository, using *args in all the save_figure 
methods and removing the extra argument in the call to save_Figure.

--Michiel.

--- On Wed, 2/17/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] Easy come easy go
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: matplotlib-users@lists.sourceforge.net, David Arnold 
 dwarnol...@suddenlink.net
 Date: Wednesday, February 17, 2010, 9:16 AM
 On Wed, Feb 17, 2010 at 7:41 AM,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
  An inconsistency in the definition of save_figure
 between different backends is causing this problem.
 
  The GTK backends use
     def save_figure(self, button):
 
  but the tkagg, qt, qt4, and macosx backends use
     def save_figure(self):
 
  so without the second argument. The line that is
 causing the error is
 
           
  self.canvas.toolbar.save_figure(self.canvas.toolbar)
 
  in backend_bases.py. This assumes that the save_figure
 method is defined as in the GTK backends.
 
  As far as I can tell, the GTK backend has the second
 argument because that is what pygtk passes when save_figure
 is called as a callback. The second argument is not actually
 used inside the method.
 
  So I would suggest the following:
 
  In backend_bases.py, change the offending line to
 
             self.canvas.toolbar.save_figure()
 
  and the backend_gtk, change the definition of the
 save_figure method to
 
     def save_figure(self, button-None):
 
  Any objections, anybody?
 
 
 The base class signature is
 
     def save_figure(self, *args):
         'save the current figure'
         raise NotImplementedError
 
 But I think the problem is the line
 
  
 self.canvas.toolbar.save_figure(self.canvas.toolbar)
 
 it shouldn't be passing the toolbar in, but should just
 read
 
   self.canvas.toolbar.save_figure()
 
 We could make both changes -- make sure all the signatures
 of the
 derived classes comply with
 
      def save_figure(self, *args):
 
 and remove the self.canvas.toolbar argument from the
 save_figure call.
 
 Michiel, do you want to take the lead on this?
 
 JDH
 No?
 


  

--
Download Intelreg; 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] Easy come easy go

2010-02-17 Thread Michiel de Hoon
An inconsistency in the definition of save_figure between different backends is 
causing this problem.

The GTK backends use
def save_figure(self, button):

but the tkagg, qt, qt4, and macosx backends use
def save_figure(self):

so without the second argument. The line that is causing the error is

self.canvas.toolbar.save_figure(self.canvas.toolbar)

in backend_bases.py. This assumes that the save_figure method is defined as in 
the GTK backends.

As far as I can tell, the GTK backend has the second argument because that is 
what pygtk passes when save_figure is called as a callback. The second argument 
is not actually used inside the method.

So I would suggest the following:

In backend_bases.py, change the offending line to

self.canvas.toolbar.save_figure()

and the backend_gtk, change the definition of the save_figure method to

def save_figure(self, button-None):

Any objections, anybody?

--Michiel


--- On Sun, 2/14/10, David Arnold dwarnol...@suddenlink.net wrote:

 From: David Arnold dwarnol...@suddenlink.net
 Subject: [Matplotlib-users] Easy come easy go
 To: matplotlib-users@lists.sourceforge.net
 Date: Sunday, February 14, 2010, 11:36 PM
 All,
 
 This example:  
 http://matplotlib.sourceforge.net/examples/event_handling/keypress_demo.html
 
 Raises this exception o my Macbook when the key 's' is
 pressed:
 
 The debugged program raised the exception unhandled
 TypeError
 save_figure() takes exactly 1 argument (2 given)
 File:
 /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/backend_bases.py,
 Line: 1703
 
 David
 --
 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
 


  

--
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] Enter Figure on Macs

2010-02-16 Thread Michiel de Hoon
Thanks! That was at least part of the problem.
I've committed a bug fix to the svn repository.

Thanks gain,

--Michiel.

--- On Mon, 2/15/10, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: Re: [Matplotlib-users] Enter Figure on Macs
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: David Arnold dwarnol...@suddenlink.net, 
 matplotlib-users@lists.sourceforge.net
 Date: Monday, February 15, 2010, 8:07 AM
 On Mon, Feb 15, 2010 at 6:50 AM,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
  I almost have a solution for this for the Mac OS X
 backend. I am stuck though at what I should pass to
 enter_notify_event and leave_notify_event for the guiEvent:
 
     def leave_notify_event(self, guiEvent=None):
         
         Backend derived classes should call this
 function when leaving
         canvas
 
         *guiEvent*
             the native UI event that generated
 the mpl event
 
         
 
  What are the requirements for guiEvent? If I call
 leave_notify_event without guiEvent, so guiEvent = None,
 then the example gives me the following error:
 
 we don't make any assumptions about what kind of object the
 gui event
 is.  We provide the GUI event because sometimes when
 using a specific
 backend, the user wants to drill into the GUI native event
 (eg a
 button press event) but we don't use it anywhere in the mpl
 frontend
 because this would break the abstraction.  So if you
 have some event
 that is being fired at the UI level on figure enter, pass
 that in.
 
 It looks like you may be having a problem because the
 leave_notify_event is getting called more than once, or is
 called for
 a figure that has not been entered.  Check the logic
 in
 backend_bases.FigureCanvasBase.leave_notify_event
 
 
     def leave_notify_event(self, guiEvent=None):
         
         Backend derived classes should
 call this function when leaving
         canvas
 
         *guiEvent*
             the native UI
 event that generated the mpl event
 
         
        
 self.callbacks.process('figure_leave_event',
 LocationEvent.lastevent)
         LocationEvent.lastevent = None
 
 
 It looks like your figure_leave_event is being triggered
 with
 LocationEvent.lastevent = None (so it is not a problem with
 your
 guiEvent).  This could happen if a leave event was
 processed *before*
 and enter event (which sets the lastevent), or if a leave
 event was
 processed twice.
 
 Hopefully this will help you drill down into the source of
 the problem
 
 JDH
 


  

--
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] agg_buffer_to_array.py

2010-02-16 Thread Michiel de Hoon
Hi David,

The Mac OS X backend does not use Agg, so I am not surprised that this script 
won't work with Mac OS X backend. The script probably also won't work with 
other non-Agg backends such as GtkCairo.

--Michiel.

--- On Mon, 2/15/10, David Arnold dwarnol...@suddenlink.net wrote:

 From: David Arnold dwarnol...@suddenlink.net
 Subject: [Matplotlib-users] agg_buffer_to_array.py
 To: matplotlib-users@lists.sourceforge.net
 Date: Monday, February 15, 2010, 2:12 PM
 All,
 This error:The
 debugged program raised the exception unhandled AttributeError
 'FigureCanvasMac' object
 has no attribute 'buffer_rgba'
 File: 
 /Users/darnold/Documents/temp/Matplotlib/PylabExamples/agg_buffer_to_array.py,
 Line: 16is raised
 by the following script on my Macbook.
 #
 agg_buffer_to_array.py import
 matplotlibmatplotlib.use('macosx')from
 pylab import figure, showimport numpy as
 np
 # make an agg figurefig =
 figure()ax =
 fig.add_subplot(111)ax.plot([1,2,3])ax.set_title('a
 simple figure')fig.canvas.draw()
 # grab rhe pixel buffer and dumpy it into a
 numpy arraybuf =
 fig.canvas.buffer_rgba(0,0)l, b, w, h =
 fig.bbox.boundsX = np.fromstring(buf,
 np.uint8)X.shape = h,w,4
 # now display the array X as an Axes in a new
 figurefig2 = figure()ax2 =
 fig2.add_subplot(111,
 frameon=False)ax2.imshow(X)show()
 This is captured from:  
 http://matplotlib.sourceforge.net/examples/pylab_examples/agg_buffer_to_array.html
 With:
 matplotlib.use('Agg')
 Nothing happens at all. With --verbose-helpful,
 yields the following:
 $HOME=/Users/darnoldCONFIGDIR=/Users/darnold/.matplotlibmatplotlib
 data path
 /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/mpl-dataloaded
 rc file
 /Users/darnold/.matplotlib/matplotlibrcmatplotlib
 version 0.99.1.1verbose.level
 helpfulinteractive is Falseunits is
 Falseplatform is darwinUsing
 fontManager instance from
 /Users/darnold/.matplotlib/fontList.cachebackend
 agg version v2.2findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
 to Bitstream Vera Sans
 (/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
 with score of 0.00findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
 to Bitstream Vera Sans
 (/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
 with score of 0.00
 Both
 matplotlib.use('tkagg')
 and
 matplotlib.use('wxagg')
 work as they should.
 David.
 -Inline Attachment Follows-
 
 --
 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
 -Inline Attachment Follows-
 
 ___
 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] Enter Figure on Macs

2010-02-15 Thread Michiel de Hoon
I almost have a solution for this for the Mac OS X backend. I am stuck though 
at what I should pass to enter_notify_event and leave_notify_event for the 
guiEvent:

def leave_notify_event(self, guiEvent=None):

Backend derived classes should call this function when leaving
canvas

*guiEvent*
the native UI event that generated the mpl event



What are the requirements for guiEvent? If I call leave_notify_event without 
guiEvent, so guiEvent = None, then the example gives me the following error:

enter_figure Figure(640x480)
leave_figure
Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backend_bases.py,
 line 1416, in leave_notify_event
self.callbacks.process('figure_leave_event', LocationEvent.lastevent)
  File 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/cbook.py,
 line 169, in process
func(*args, **kwargs)
  File test.py, line 23, in leave_figure
print 'leave_figure', event.canvas.figure
AttributeError: 'NoneType' object has no attribute 'canvas'


So I guess I should pass some type of event object to enter|leave_notify_event.

--Michiel.

--- On Sun, 2/14/10, David Arnold dwarnol...@suddenlink.net wrote:

 From: David Arnold dwarnol...@suddenlink.net
 Subject: Re: [Matplotlib-users] Enter Figure on Macs
 To: John Hunter jdh2...@gmail.com
 Cc: Michiel de Hoon mjldeh...@yahoo.com, 
 matplotlib-users@lists.sourceforge.net
 Date: Sunday, February 14, 2010, 11:50 PM
 John,
 
 Only the wxagg worked. Here is the output:
 
 $HOME=/Users/darnold
 CONFIGDIR=/Users/darnold/.matplotlib
 matplotlib data path
 /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/mpl-data
 loaded rc file /Users/darnold/.matplotlib/matplotlibrc
 matplotlib version 0.99.1.1
 verbose.level helpful
 interactive is False
 units is False
 platform is darwin
 Using fontManager instance from
 /Users/darnold/.matplotlib/fontList.cache
 backend WXAgg version 2.8.10.1
 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
 to Bitstream Vera Sans
 (/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
 with score of 0.00
 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
 to Bitstream Vera Sans
 (/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
 with score of 0.00
 enter_figure Figure(640x480)
 leave_figure Figure(640x480)
 enter_figure Figure(640x480)
 leave_figure Figure(640x480)
 enter_figure Figure(640x480)
 leave_figure Figure(640x480)
 enter_figure Figure(640x480)
 enter_axes Axes(0.125,0.536364;0.775x0.363636)
 leave_axes Axes(0.125,0.536364;0.775x0.363636)
 enter_axes Axes(0.125,0.1;0.775x0.363636)
 leave_axes Axes(0.125,0.1;0.775x0.363636)
 leave_figure Figure(640x480)
 
 
 Did not work with macosx:
 
 $HOME=/Users/darnold
 CONFIGDIR=/Users/darnold/.matplotlib
 matplotlib data path
 /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/mpl-data
 loaded rc file /Users/darnold/.matplotlib/matplotlibrc
 matplotlib version 0.99.1.1
 verbose.level helpful
 interactive is False
 units is False
 platform is darwin
 Using fontManager instance from
 /Users/darnold/.matplotlib/fontList.cache
 backend MacOSX version unknown
 enter_axes Axes(0.125,0.536364;0.775x0.363636)
 leave_axes Axes(0.125,0.536364;0.775x0.363636)
 enter_axes Axes(0.125,0.1;0.775x0.363636)
 leave_axes Axes(0.125,0.1;0.775x0.363636)
 enter_axes Axes(0.125,0.1;0.775x0.363636)
 leave_axes Axes(0.125,0.1;0.775x0.363636)
 enter_axes Axes(0.125,0.536364;0.775x0.363636)
 leave_axes Axes(0.125,0.536364;0.775x0.363636)
 enter_axes Axes(0.125,0.1;0.775x0.363636)
 leave_axes Axes(0.125,0.1;0.775x0.363636)
 
 
 Did not work with tkagg:
 
 $HOME=/Users/darnold
 CONFIGDIR=/Users/darnold/.matplotlib
 matplotlib data path
 /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/site-packages/matplotlib/mpl-data
 loaded rc file /Users/darnold/.matplotlib/matplotlibrc
 matplotlib version 0.99.1.1
 verbose.level helpful
 interactive is False
 units is False
 platform is darwin
 Using fontManager instance from
 /Users/darnold/.matplotlib/fontList.cache
 backend TkAgg version 8.4
 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
 to Bitstream Vera Sans
 (/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
 with score of 0.00
 findfont: Matching
 :family=sans-serif:style=normal:variant=normal:weight

Re: [Matplotlib-users] hatching problem

2010-02-09 Thread Michiel de Hoon
I wasn't able to replicate this problem with the Mac OS X backend with 
matplotlib 0.99.1.1. Both the on-screen figure and the ps output look fine.

--Michiel.


--- On Tue, 2/9/10, Jae-Joon Lee lee.j.j...@gmail.com wrote:

 From: Jae-Joon Lee lee.j.j...@gmail.com
 Subject: Re: [Matplotlib-users] hatching problem
 To: Tomasz Koziara t.kozi...@civil.gla.ac.uk
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Tuesday, February 9, 2010, 10:42 AM
 I cannot reproduce it with Agg
 backend and ps backend. I tried both
 svn version and 0.99 maint. version.
 So, maybe this is a bug in mac os X backend?
 Do you see a same problem with the ps output? If so, can
 you post your
 ouput ps file?
 
 Regards,
 
 -JJ
 
 
 On Mon, Feb 8, 2010 at 3:26 PM, Tomasz Koziara
 t.kozi...@civil.gla.ac.uk
 wrote:
  Dear Users/Developers
 
  I just installed version 0.99.1.1 since in my previous
 version (0.98) I had
  problems with hatching. It seems though that the same
 problems persist in
  the current version. The attached files reproduce the
 problem (a data file
  and a python short script). Note that hatching is not
 present on all green
  'CONUPD' fields - but only on few of them.
 
  I will appreciate some hints on how to get by,
  Regards
  Tomek
 
  ===
 
 
 
 
 
 
  ===
 
  dh178-192:tkp5 tomek$ python plots.py
 --verbose-helpful
  $HOME=/Users/tomek
  CONFIGDIR=/Users/tomek/.matplotlib
  matplotlib data path
 /Library/Python/2.5/site-packages/matplotlib/mpl-data
  loaded rc file
 
 /Library/Python/2.5/site-packages/matplotlib/mpl-data/matplotlibrc
  matplotlib version 0.99.1.1
  verbose.level helpful
  interactive is False
  units is False
  platform is darwin
  Using fontManager instance from
 /Users/tomek/.matplotlib/fontList.cache
  backend MacOSX version unknown
  findfont: Matching
 
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
  to Bitstream Vera Sans
 
 (/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
  with score of 0.00
  findfont: Matching
 
 :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
  to Bitstream Vera Sans
 
 (/Library/Python/2.5/site-packages/matplotlib-0.98.6svn-py2.5-macosx-10.3-fat.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf)
  with score of 0.00
 
 
 
 --
  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
 


  

--
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] Large figure sizes get squashed or clipped?

2009-11-27 Thread Michiel de Hoon
I think the best solution to this problem is to have scroll bars in the figure 
window if needed. Depending on the size of the figure (in physical units), the 
size of the window containing the figure, and the zoom factor the scroll bars 
would appear or disappear. This would require some modifications to all GUI 
backends.

The same problem occurs in the Mac OS X backend, where the figure window size 
can be smaller than the requested size if the requested size is larger than the 
monitor size. See bug 2891502:

http://sourceforge.net/tracker/?func=detailatid=560720aid=2891502group_id=80706

Any comments, opinions?


--Michiel.

--- On Wed, 11/25/09, doct...@users.sourceforge.net 
doct...@users.sourceforge.net wrote:

 From: doct...@users.sourceforge.net doct...@users.sourceforge.net
 Subject: Re: [Matplotlib-users] Large figure sizes get squashed or clipped?
 To: Michael Droettboom md...@stsci.edu
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Wednesday, November 25, 2009, 7:43 PM
 Yes, I should have mentioned that;
 saving an image works fine.  But
 then if I want to display it 1:1 with figimage() or such, I
 can't.  :(
  Silly GUIs, not wanting to display a window larger than my
 screen
 
 
 
 On Wed, Nov 25, 2009 at 9:43 AM, Michael Droettboom md...@stsci.edu
 wrote:
  There may be a limitation on window sizes in the
 various GUI backends.  Have
  you tried using the non-GUI backend (agg), and now
 showing it, but just
  using savefig?
 
  Mike
 
  doct...@users.sourceforge.net
 wrote:
 
  I'm trying to make a 10 inch wide by 30 inch high,
 72 dpi figure and
  display it interactively.  Matplotlib seems to
 squash the height for
  anything over a certain size, depending on the
 backend:
 
 
 ---
  #!/usr/bin/env python
 
  import sys, os, matplotlib
  matplotlib.use('TkAgg')
  import matplotlib.pyplot as plt
 
  print os.uname()
  print sys.version
  print matplotlib.__version__
  print
 
  f = plt.figure(figsize=(10,30), dpi=72)
  print figheight before show(): %f %
 f.get_figheight()
  plt.show()
  print figheight after show():  %f %
 f.get_figheight()
 
 --
 
  Prints this:
 
  ==
  ('Linux', 'prime', '2.6.31-14-generic',
 '#48-Ubuntu SMP Fri Oct 16
  14:05:01 UTC 2009', 'x86_64')
  2.6.4 (r264:75706, Nov  2 2009, 14:44:17)
  [GCC 4.4.1]
  0.99.0
 
  figheight before show(): 30.00
  figheight after show():  22.027778
  ==
 
  Tk squashes heights over 12 inches (the heights do
 get larger as you
  request larger figures, but not as large as what
 you request); GTK
  goes up to 11; and Qt4Agg only goes up to 7.3.
  WX seems to be the
  only backend that will give me a 30 inch figure,
 but even then I have
  to manually resize the window to make it fit.
  This happens in scripts
  with pyplot, in ipython with or without -pylab,
 and via the matplotlib
  API.
 
  Is there some limitation on figure sizes?
 
 
 
 --
  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
 
 
  --
  Michael Droettboom
  Science Software Branch
  Operations and Engineering Division
  Space Telescope Science Institute
  Operated by AURA for NASA
 
 
 
 --
 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
 


  

--
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] Getting Matplotlib to Recognize OSX Fonts

2009-10-03 Thread Michiel de Hoon
Dear Buz,

You could try with the MacOSX native backend:

 import matplotlib
 matplotlib.use(MacOSX)
 from pylab import *
 text(0.2,0.2,some text,fontname='Times-Roman')
 text(0.2,0.7,some other text,fontname='Helvetica')

I'm not sure if the MacOSX native backend is included in fink's distribution, 
though.

--Michiel.

--- On Fri, 10/2/09, Buz Barstow b...@mac.com wrote:

 From: Buz Barstow b...@mac.com
 Subject: [Matplotlib-users] Getting Matplotlib to Recognize OSX Fonts
 To: matplotlib-users matplotlib-users@lists.sourceforge.net
 Date: Friday, October 2, 2009, 1:59 PM
 Dear All,
 
 I'm trying to get matplotlib to use some of my MacOSX fonts
 (Helvetica  
 and Times) so that I can produce plots with these two
 fonts.
 
 I'm using matplotlib installed with fink on MacOSX 10.5.8,
 and using  
 XQuartz 2.4.0.
 
 Has anyone tried to do this, and can they point me to a
 procedure to  
 make matplotlib find these fonts?
 
 Thanks! and all the best,
 
 --Buz
 
 
 
 --
 Come build with us! The BlackBerryreg; 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
 


  

--
Come build with us! The BlackBerryreg; 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#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot plot in loops with matplotlib 0.99. 0.98 works fine

2009-09-07 Thread Michiel de Hoon
 Any idea why there is such a difference between
 0.98.5.3 and 0.99 ??

Drawing the whole figure once, when no further Python input is available, is 
much more efficient than drawing after each plot() command. For some figures, 
matplotlib 0.98.5.3 becomes extremely slow.

 Thanks JJ, but unfortunately this is not the solution.
 draw() gives the same result. - and I am running this
 as a script (running it from ipython shell).

The problem in your script is that the event loop never kicks in. 
Unfortunately, Python has no support for event loops in general, which makes 
this hard to solve. One option is to use raw_input() between calls to plot(), 
but then each time you have to hit enter to get the script to proceed.

--Michiel.


--- On Mon, 9/7/09, tva t...@brygge.dk wrote:

 From: tva t...@brygge.dk
 Subject: Re: [Matplotlib-users] cannot plot in loops with matplotlib 0.99. 
 0.98 works fine
 To: matplotlib-users@lists.sourceforge.net
 Date: Monday, September 7, 2009, 3:17 AM
 
 Thanks JJ, but unfortunately this is not the solution.
 draw() gives the same
 result. - and I am running this as a script (running it
 from ipython shell).
 
 Any clue?
 
 
 
 
 
 Jae-Joon Lee wrote:
  
  I presume you're running that script in interactive
 shell?
  Try draw() instead of show().
  
  Regards,
  
  -JJ
  
  
  On Sun, Sep 6, 2009 at 3:06 PM, tvat...@brygge.dk
 wrote:
 
  Hi all
 
  with matplotlib 0.98.5.3 this script will draw new
 lines as the scrips is
  running:
 
  from pylab import *
  x = arange(0,2*pi,0.01)
  for i in arange(1,20):
 
         y=sin(x+i)
         plot(x,y)  # update the data
         show()
 
 
  with matplotlib 0.99, the exact same script runs
 to the end without
  plotting
  and then plots all the lines. This is just a
 trivial example but for some
  applications it is useful to monitor the evolution
 of curves as the
  script
  is running - allows me to update parameters if
 something diverges.
  Any idea why there is such a difference between
 0.98.5.3 and 0.99 ??
  --
  View this message in context:
  http://www.nabble.com/cannot-plot-in-loops-with-matplotlib-0.99.-0.98-works-fine-tp25320454p25320454.html
  Sent from the matplotlib - users mailing list
 archive at Nabble.com.
 
 
 
 --
  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
 
  
 
 --
  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
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/cannot-plot-in-loops-with-matplotlib-0.99.-0.98-works-fine-tp25320454p25326025.html
 Sent from the matplotlib - users mailing list archive at
 Nabble.com.
 
 
 --
 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
 


  

--
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] show() problem in Mac OS X 10.5.8

2009-08-22 Thread Michiel de Hoon
Does anybody know why the show._needmain stuff is needed in the show() function 
in backend_tkagg.py? Currently, this function is as follows:

def show():

Show all the figures and enter the gtk mainloop

This should be the last line of your script.  This function sets
interactive mode to True, as detailed on
http://matplotlib.sf.net/interactive.html

for manager in Gcf.get_all_fig_managers():
manager.show()
import matplotlib
matplotlib.interactive(True)
if rcParams['tk.pythoninspect']:
os.environ['PYTHONINSPECT'] = '1'
if show._needmain:
Tk.mainloop()
show._needmain = False
show._needmain = True


If I remove the show._needmain stuff, as in:

def show():

Show all the figures and enter the gtk mainloop

This should be the last line of your script.  This function sets
interactive mode to True, as detailed on
http://matplotlib.sf.net/interactive.html

for manager in Gcf.get_all_fig_managers():
manager.show()
import matplotlib
matplotlib.interactive(True)
if rcParams['tk.pythoninspect']:
os.environ['PYTHONINSPECT'] = '1'
Tk.mainloop()

then the function still seems to work fine, and multiple show()s also works.

--Michiel.


--- On Thu, 8/20/09, Kim, Dae-Won dwki...@gmail.com wrote:

 From: Kim, Dae-Won dwki...@gmail.com
 Subject: Re: [Matplotlib-users] show() problem in Mac OS X 10.5.8
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: Ryan May rma...@gmail.com, matplotlib-users@lists.sourceforge.net
 Date: Thursday, August 20, 2009, 10:26 AM
 
 I tested with TKAgg and WXAgg. I just bought macbook and
 I'm newbie yet. Do I need to set something special for
 the multiple show()s?
 
 Thanks,
 
 -Dae-Won
 
 On Thu, Aug 20, 2009 at 10:01 AM,
 Michiel de Hoon mjldeh...@yahoo.com
 wrote:
 
 
 Whether or not you can do multiple
 show()s depends on which backend you use. For example, the
 Mac OS X native backend has no problems with the multiple
 show()s in your example. Which backend were you using? While
 matplotlib does not support multiple show()s in general,
 there may be a simple solution to get that working for the
 backend you are using.
 
 
 
 
 
 --Michiel.
 
 
 
 --- On Wed, 8/19/09, Kim, Dae-Won dwki...@gmail.com
 wrote:
 
 
 
  From: Kim, Dae-Won dwki...@gmail.com
 
  Subject: Re: [Matplotlib-users] show() problem in Mac
 OS X 10.5.8
 
  To: Ryan May rma...@gmail.com
 
  Cc: matplotlib-users@lists.sourceforge.net
 
  Date: Wednesday, August 19, 2009, 2:48 PM
 
 
 
   The one 'preliminary' solution I found is
 using
 
  an interactive mode + raw_input.
 
  Here is and example,
 
 
 
      ion()
 
      plot([1,2,3,4,5])
 
      raw_input('Type Enter')
 
      clf()
 
 
 
 
 
      plot([1,2,3,4,5])
 
      raw_input('Type_Enter')
 
      clf()
 
      plot([1,2,3,4,5])
 
      show()
 
 
 
  With this approach, I can press the enter when I want
 to
 
  see next figure.
 
 
 
 
 
 
 
  Though It's not as convenient as 'multiple
 
  show()'..
 
 
 
 
 
  On Wed, Aug 19, 2009 at 1:57 PM,
 
  Kim, Dae-Won dwki...@gmail.com
 
  wrote:
 
 
 
 
 
 
 
 
 
  On Wed, Aug 19, 2009 at 1:02 PM,
 
  Ryan May rma...@gmail.com
 
  wrote:
 
 
 
 
 
 
 
  On Wed, Aug 19, 2009 at 11:55
 
  AM, coati dwki...@gmail.com
 
  wrote:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
   I have a problem with show() command in my macbook
 
  machine (Leopard 10.5.8).
 
 
 
  For example, if I run the script shown below
 
 
 
  (let assume it is saved as 'test.py', and I
 run a
 
  command 'python test.py'),
 
 
 
 
 
 
 
  ---
 
 
 
 
 
 
 
  plot([1,2,3,4,5])
 
 
 
  show() #first window
 
 
 
  plot([1,2,3,4,5])
 
 
 
  show() #second window
 
 
 
  plot([1,2,3,4,5])
 
 
 
  show() #third window
 
 
 
 
 
 
 
  ---
 
 
 
 
 
 
 
  Then the first window just pops up and I can see a
 
  beautiful straight line
 
 
 
  :) No problem so far.
 
 
 
  But, after I close the first window by clicking the
 close
 
  button of the
 
 
 
  window,
 
 
 
  other two window (second and third) just pops up and
 close
 
  themselves
 
 
 
  instantly
 
 
 
  even though I didn't click the close button...
 
 
 
  Also, the second and third plot is shown in the same
 
  window.
 
 
 
 
 
 
 
  I don't have such problem in my Ubuntu machine..
 
 
 
 
 
 
 
  Does anybody know reasons?
 
  show() actually handles starting the GUI mainloop, so
 you
 
  really shouldn't be calling it more than once from
 a
 
  script.  Quite frankly, it's more amazing that it
 works
 
  on your Ubuntu macine. :)  If you're wanting 3
 separate
 
  windows, try:
 
 
 
 
 
 
 
 
 
 
 
 
 
  plot([1,2,3,4,5])
 
  figure()
 
  plot([1,2,3,4,5])
 
  figure()
 
  plot([1,2,3,4,5])
 
  show()
 
 
 
  Ryan
 
 
 
  --
 
  Ryan May
 
 
 
  Graduate Research Assistant
 
  School of Meteorology
 
  University of Oklahoma
 
 
 
 
 
 
 
 
 
 
 
  Thanks Ryan

Re: [Matplotlib-users] show() problem in Mac OS X 10.5.8

2009-08-20 Thread Michiel de Hoon
Whether or not you can do multiple show()s depends on which backend you use. 
For example, the Mac OS X native backend has no problems with the multiple 
show()s in your example. Which backend were you using? While matplotlib does 
not support multiple show()s in general, there may be a simple solution to get 
that working for the backend you are using.

--Michiel.

--- On Wed, 8/19/09, Kim, Dae-Won dwki...@gmail.com wrote:

 From: Kim, Dae-Won dwki...@gmail.com
 Subject: Re: [Matplotlib-users] show() problem in Mac OS X 10.5.8
 To: Ryan May rma...@gmail.com
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Wednesday, August 19, 2009, 2:48 PM
 
  The one 'preliminary' solution I found is using
 an interactive mode + raw_input.
 Here is and example,
 
     ion()
     plot([1,2,3,4,5])
     raw_input('Type Enter')
     clf()
 
 
     plot([1,2,3,4,5])
     raw_input('Type_Enter')
     clf()
     plot([1,2,3,4,5])
     show()
 
 With this approach, I can press the enter when I want to
 see next figure.
 
 
 
 Though It's not as convenient as 'multiple
 show()'..
 
 
 On Wed, Aug 19, 2009 at 1:57 PM,
 Kim, Dae-Won dwki...@gmail.com
 wrote:
 
 
 
 
 On Wed, Aug 19, 2009 at 1:02 PM,
 Ryan May rma...@gmail.com
 wrote:
 
 
 
 On Wed, Aug 19, 2009 at 11:55
 AM, coati dwki...@gmail.com
 wrote:
 
 
 
 
 
 
 
  I have a problem with show() command in my macbook
 machine (Leopard 10.5.8).
 
 For example, if I run the script shown below
 
 (let assume it is saved as 'test.py', and I run a
 command 'python test.py'),
 
 
 
 ---
 
 
 
 plot([1,2,3,4,5])
 
 show() #first window
 
 plot([1,2,3,4,5])
 
 show() #second window
 
 plot([1,2,3,4,5])
 
 show() #third window
 
 
 
 ---
 
 
 
 Then the first window just pops up and I can see a
 beautiful straight line
 
 :) No problem so far.
 
 But, after I close the first window by clicking the close
 button of the
 
 window,
 
 other two window (second and third) just pops up and close
 themselves
 
 instantly
 
 even though I didn't click the close button...
 
 Also, the second and third plot is shown in the same
 window.
 
 
 
 I don't have such problem in my Ubuntu machine..
 
 
 
 Does anybody know reasons?
 show() actually handles starting the GUI mainloop, so you
 really shouldn't be calling it more than once from a
 script.  Quite frankly, it's more amazing that it works
 on your Ubuntu macine. :)  If you're wanting 3 separate
 windows, try:
 
 
 
 
 
 
 plot([1,2,3,4,5])
 figure()
 plot([1,2,3,4,5])
 figure()
 plot([1,2,3,4,5])
 show()
 
 Ryan
 
 -- 
 Ryan May
 
 Graduate Research Assistant
 School of Meteorology
 University of Oklahoma
 
 
 
 
 
 Thanks Ryan,
 
 Hm.. it's a bit strange.. I just installed matplotlib
 at Ubuntu using the package manager :)
 And, another linux machines (red hat enterprise) can do
 this too. For the RHELs, I compiled matplotlib source code
 by myself.
 
 
 
 
 
 figure() works very well, but what I want to do is to check
 the plots one by one and thus
 I can exit the script at any time I want (because I usually
 have lots of figures to check and I don't want 
 to pop up every of them at the same time..)
 
 
 
 
 
 Anyway, thank you very much!
 
 
 
 
 
 
 
 -Inline Attachment Follows-
 
 --
 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
 -Inline Attachment Follows-
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

--
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] mac os backend not building

2009-08-20 Thread Michiel de Hoon
Are you on Mac OS X 10.5 or are you on an earlier version? The error message 
you're seeing indicates that MAC_OS_X_VERSION_10_5 is defined, suggesting that 
you are on Mac OS X 10.5. But then it should be aware of CTFontRef ... Did you 
change anything in your Python setup?

--Michiel.

--- On Wed, 8/19/09, George Nurser gnur...@googlemail.com wrote:

 From: George Nurser gnur...@googlemail.com
 Subject: [Matplotlib-users] mac os backend not building
 To: Matplotlib-users@lists.sourceforge.net
 Date: Wednesday, August 19, 2009, 12:23 PM
 Hi,
 I updated matplotlib to svn r 7506, but it won't build. I
 am having
 problems with the mac os backend:
 
 10.5.8, gcc 4.0.1:
 python setup.py build install run from the
 matplotlib/matplotlib
 directory gives:
 .
 building 'matplotlib.backends._macosx' extension
 gcc -arch ppc -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk
 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
 -mno-fused-madd
 -fno-common -dynamic -DNDEBUG -g -O3
 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -I/usr/local/include -I/usr/include -I/usr/X11R6/include
 -I/usr/X11/include -I.
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -Isrc -Iagg24/include -I.
 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c src/_macosx.m -o
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 src/_macosx.m:1885: error: syntax error before
 ‘setfont’
 src/_macosx.m:1885: error: syntax error before
 ‘setfont’
 src/_macosx.m: In function ‘setfont’:src/_macosx.m: In
 function ‘setfont’:
 src/_macosx.m:1895: error: ‘CTFontRef’ undeclared
 (first use in this function)
 
 Possibly some confusion about whether MAC_OS_X_VERSION_10_5
 is defined??
 
 --George Nurser.
 
 --
 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
 


  

--
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] os x trouble

2009-08-09 Thread Michiel de Hoon

The error occurs in the first line of _macosx.m, which is
#include Cocoa/Cocoa.h
Can you compile anything (with the same compiler flags) that contains this line?

--Michiel

--- On Fri, 8/7/09, Gideon Simpson simp...@math.toronto.edu wrote:

 From: Gideon Simpson simp...@math.toronto.edu
 Subject: [Matplotlib-users] os x trouble
 To: matplotlib-users@lists.sourceforge.net
 Date: Friday, August 7, 2009, 12:27 PM
 With 0.99.0, I'm getting the
 following error when building from  
 source.  I believe this is the same error I got in
 earlier versions:
 
 gcc -fno-strict-aliasing -mno-fused-madd -DNDEBUG -g
 -fwrapv -O3 -Wall  
 -Wstrict-prototypes -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
 -I/opt/lib/ 
 python2.5/site-packages/numpy/core/include
 -I/sw/lib/freetype219/ 
 include -I/usr/local/include -I/usr/include -I/sw/include
 -I. -I/opt/ 
 lib/python2.5/site-packages/numpy/core/include -Isrc
 -Iagg24/include - 
 I. -I/sw/include/python2.5 -c src/_macosx.m -o
 build/temp.macosx-10.5- 
 i386-2.5/src/_macosx.o
 In file included from
 /System/Library/Frameworks/Foundation.framework/ 
 Headers/NSAffineTransform.h:5,
                
   from /System/Library/Frameworks/Foundation.framework/
 
 Headers/Foundation.h:13,
                
   from /System/Library/Frameworks/Cocoa.framework/ 
 Headers/Cocoa.h:12,
                
   from src/_macosx.m:1:
 /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:
 
 122: error: expected ‘;’ before ‘__attribute__’
 In file included from
 /System/Library/Frameworks/Foundation.framework/ 
 Headers/NSGeometry.h:7,
                
   from /System/Library/Frameworks/Foundation.framework/
 
 Headers/NSAffineTransform.h:6,
                
   from /System/Library/Frameworks/Foundation.framework/
 
 Headers/Foundation.h:13,
                
   from /System/Library/Frameworks/Cocoa.framework/ 
 Headers/Cocoa.h:12,
                
   from src/_macosx.m:1:
 /System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h:79: 
 
 error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSCoder.h:87: 
 
 error: expected ‘;’ before ‘__attribute__’
 In file included from
 /System/Library/Frameworks/Foundation.framework/ 
 Headers/Foundation.h:15,
                
   from /System/Library/Frameworks/Cocoa.framework/ 
 Headers/Cocoa.h:12,
                
   from src/_macosx.m:1:
 /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:62: 
 
 error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:66: 
 
 error: expected ‘;’ before ‘__attribute__’
 In file included from
 /System/Library/Frameworks/Foundation.framework/ 
 Headers/NSAttributedString.h:5,
                
   from /System/Library/Frameworks/Foundation.framework/
 
 Headers/Foundation.h:16,
                
   from /System/Library/Frameworks/Cocoa.framework/ 
 Headers/Cocoa.h:12,
                
   from src/_macosx.m:1:
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 345: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 346: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 347: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 348: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 349: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 350: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 352: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 353: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 355: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 356: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 357: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 358: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 360: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 361: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 362: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 363: error: expected ‘;’ before ‘__attribute__’
 /System/Library/Frameworks/Foundation.framework/Headers/NSString.h:
 
 364: error: expected ‘;’ before 

Re: [Matplotlib-users] matplotlib-0.99.0-rc1 : call for testing

2009-08-05 Thread Michiel de Hoon

I am seeing the following error with the GTKCairo and GTKAgg backends:

 figure()
matplotlib.figure.Figure object at 0x7ebe0cec
 Traceback (most recent call last):
  File 
/usr/local/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py, 
line 249, in enter_notify_event
FigureCanvasBase.enter_notify_event(self, event, guiEvent=event)
TypeError: enter_notify_event() got multiple values for keyword argument 
'guiEvent'
Traceback (most recent call last):
  File 
/usr/local/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py, 
line 246, in leave_notify_event
FigureCanvasBase.leave_notify_event(self, event, guiEvent=event)
TypeError: leave_notify_event() got multiple values for keyword argument 
'guiEvent'

whenever I move the mouse into or out of the figure windows.

--Michiel.


--- On Fri, 7/31/09, John Hunter jdh2...@gmail.com wrote:

 From: John Hunter jdh2...@gmail.com
 Subject: [Matplotlib-users] matplotlib-0.99.0-rc1 : call for testing
 To: matplotlib-users matplotlib-users@lists.sourceforge.net
 Date: Friday, July 31, 2009, 1:44 PM
 We have a test release candidate rc1
 of the impending
 matplotlib-0.99.0 release, including lots of great new
 stuff like the
 axes grid and mplot3d toolkits,
 
   http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/index.html
   http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html
 
 We have uploaded tarballs, eggs and binary installers for
 win32 and
 OSX, and would love to have some testers.  You can
 grab the release
 candidates from:
 
   http://drop.io/xortel1#
 
 If you have any bugfixes or patches, feel free to post them
 here, but
 please also post to the tracker
 
   https://sourceforge.net/tracker/?group_id=80706atid=560720
 
 Thanks to Michael Droettboom with help setting up the
 release branch,
 Christoph Gohlke for the python2.6 win32 binaries, and
 William Stein
 for providing a remote OSX box for building and testing OSX
 binaries.
 
 Those of you with svn access can grab the release branch
 from::
 
   svn co https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint
 mpl99
 
 and post patches against svn for any bugs you discover and
 fix::
 
   http://matplotlib.sourceforge.net/faq/howto_faq.html#submit-a-patch
 
 Thanks to all the developers who contributed in this cycle
 -- more
 details to follow on the official release announcement next
 week.
 
 JDH
 
 --
 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
 


  

--
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] Thanks!

2009-08-01 Thread Michiel de Hoon

Originally, the Mac OS X backend was much faster than the other backends 
because of how the event loop was organized. Currently, most (I'm not sure 
about the wx backends) backends use the event loop in the same way as the Mac 
OS X backend, and are about equally fast (provided that you are using one of 
the Agg-based backends). There may be some minor difference in drawing quality. 
There may also be some difference in robustness compared to a more generic 
backend (not due to the backend itself, but the underlying GUI code). Last but 
not least, the Mac OS X backend does not need an external GUI library (like wx 
or pygtk); only Python itself and NumPy are needed.

--Michiel

--- On Sat, 8/1/09, Kaushik Ghose kaushik_gh...@hms.harvard.edu wrote:

 From: Kaushik Ghose kaushik_gh...@hms.harvard.edu
 Subject: [Matplotlib-users] Thanks!
 To: matplotlib-users@lists.sourceforge.net 
 matplotlib-users@lists.sourceforge.net
 Date: Saturday, August 1, 2009, 9:33 AM
 Hi!
 
 I would like to thank the matplotlib team for the new
 release. I haven't had the 
 courage to deploy it on my main number crunching computer
 it but I have it on my 
 regular computer and it's been fine.
 
 I'm especially excited to see renewed work on the 3D
 plotting.
 
 I have a quick question: what kind of improvements should I
 expect to see with 
 the macos backend? I ran the 3D example with and without
 the backend, and things 
 seemed qualitatively similar.
 
 Best
 -Kaushik
 
 --
 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
 


  

--
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] current svn fails to build on mac

2009-07-10 Thread Michiel de Hoon

It's probably the -L/usr/X11R6/lib that is causing a problem. Can you try 
linking without it?

--Michiel.

--- On Fri, 7/10/09, Robin robi...@gmail.com wrote:

 From: Robin robi...@gmail.com
 Subject: Re: [Matplotlib-users] current svn fails to build on mac
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Friday, July 10, 2009, 4:03 AM
 On Fri, Jul 10, 2009 at 1:33 AM,
 Michiel de Hoonmjldeh...@yahoo.com
 wrote:
  Can you verify that matplotlib 0.98.5.3 still compiles
 correctly?
  If it does, we can compare the linker flags used for
 0.98.5.3 and the svn version to find the problem.
 
 Yes - just removed build dirs and did both from scratch.
 0.98.5.3 - fine, full build log:
 http://www.robince.net/robince/mpl/build-0.98.5.3.log
 svn7250 - fails, full build log:
 http://www.robince.net/robince/mpl/build-svn7250.log
 
 The relevant sections of the logs (I think) are:
 
 Release
 ---
 building 'matplotlib.backends._macosx' extension
 
 gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
 -mno-fused-madd
 -fno-common -dynamic -DNDEBUG -g -O3
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c src/_macosx.m -o
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 
 gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
 -bundle
 -undefined dynamic_lookup
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o -o
 build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_macosx.so
 -framework Cocoa
 
 SVN
 --
 building 'matplotlib.backends._macosx' extension
 
 gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
 -mno-fused-madd
 -fno-common -dynamic -DNDEBUG -g -O3
 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -I/usr/local/include -I/usr/include -I/usr/X11R6/include
 -I.
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -Isrc -Iagg24/include -I.
 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c src/_macosx.m -o
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 
 g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
 -bundle
 -undefined dynamic_lookup
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o
 build/temp.macosx-10.3-i386-2.5/CXX/IndirectPythonInterface.o
 build/temp.macosx-10.3-i386-2.5/src/agg_py_transforms.o
 build/temp.macosx-10.3-i386-2.5/src/path_cleanup.o
 -L/usr/local/lib
 -L/usr/lib -L/usr/X11R6/lib -lstdc++ -lm -o
 build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_macosx.so
 -framework Cocoa
 
 ld: cycle in dylib re-exports with
 /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libGL.dylib
 collect2: ld returned 1 exit status
 error: command 'g++' failed with exit status 1
 
 
 Obviously lots of differences but I've no idea what would
 be causing it.
 
 Cheers
 
 Robin
 


  

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] current svn fails to build on mac

2009-07-10 Thread Michiel de Hoon

The /usr/X11R6/lib is included because it is listed in setupext.py under 
basedir['darwin']. Could you try and remove /usr/X11R6/lib from 
basedir['darwin'] in setupext.py to see if everything still compiles and links 
(both the Mac OS X backend and other backends)? At least, I don't see any 
libraries that needs to be linked from /usr/X11R6/lib. Compilation and linking 
without /usr/X11R6/lib works for me, but it'd be nice if you could double-check 
this on your system before I submit a patch to the matplotlib developers.

--Michiel.

--- On Fri, 7/10/09, Robin robi...@gmail.com wrote:

 From: Robin robi...@gmail.com
 Subject: Re: [Matplotlib-users] current svn fails to build on mac
 To: Michiel de Hoon mjldeh...@yahoo.com
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Friday, July 10, 2009, 6:59 AM
 On Fri, Jul 10, 2009 at 11:45 AM,
 Michiel de Hoonmjldeh...@yahoo.com
 wrote:
 
  It's probably the -L/usr/X11R6/lib that is causing a
 problem. Can you try linking without it?
 
 
 Yes, that's it... running the command by hand without that
 stops the error:
 
 robin-mbp-3:matplotlib robince$ g++ -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined
 dynamic_lookup
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o
 build/temp.macosx-10.3-i386-2.5/CXX/IndirectPythonInterface.o
 build/temp.macosx-10.3-i386-2.5/src/agg_py_transforms.o
 build/temp.macosx-10.3-i386-2.5/src/path_cleanup.o
 -L/usr/local/lib
 -L/usr/lib -L/usr/X11R6/lib -lstdc++ -lm -o
 build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_macosx.so
 -framework Cocoa
 ld: cycle in dylib re-exports with
 /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libGL.dylib
 collect2: ld returned 1 exit status
 
 robin-mbp-3:matplotlib robince$ g++ -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined
 dynamic_lookup
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o
 build/temp.macosx-10.3-i386-2.5/CXX/IndirectPythonInterface.o
 build/temp.macosx-10.3-i386-2.5/src/agg_py_transforms.o
 build/temp.macosx-10.3-i386-2.5/src/path_cleanup.o
 -L/usr/local/lib
 -L/usr/lib -lstdc++ -lm -o
 build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_macosx.so
 -framework Cocoa
 robin-mbp-3:matplotlib robince$
 
 Cheers
 
 Robin
 
  --Michiel.
 
  --- On Fri, 7/10/09, Robin robi...@gmail.com
 wrote:
 
  From: Robin robi...@gmail.com
  Subject: Re: [Matplotlib-users] current svn fails
 to build on mac
  To: Michiel de Hoon mjldeh...@yahoo.com
  Cc: matplotlib-users@lists.sourceforge.net
  Date: Friday, July 10, 2009, 4:03 AM
  On Fri, Jul 10, 2009 at 1:33 AM,
  Michiel de Hoonmjldeh...@yahoo.com
  wrote:
   Can you verify that matplotlib 0.98.5.3 still
 compiles
  correctly?
   If it does, we can compare the linker flags
 used for
  0.98.5.3 and the svn version to find the problem.
 
  Yes - just removed build dirs and did both from
 scratch.
  0.98.5.3 - fine, full build log:
  http://www.robince.net/robince/mpl/build-0.98.5.3.log
  svn7250 - fails, full build log:
  http://www.robince.net/robince/mpl/build-svn7250.log
 
  The relevant sections of the logs (I think) are:
 
  Release
  ---
  building 'matplotlib.backends._macosx' extension
 
  gcc -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk
  -fno-strict-aliasing -Wno-long-double
 -no-cpp-precomp
  -mno-fused-madd
  -fno-common -dynamic -DNDEBUG -g -O3
 
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 
 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
  -c src/_macosx.m -o
  build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 
  gcc -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk -g
  -bundle
  -undefined dynamic_lookup
  build/temp.macosx-10.3-i386-2.5/src/_macosx.o -o
 
 build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_macosx.so
  -framework Cocoa
 
  SVN
  --
  building 'matplotlib.backends._macosx' extension
 
  gcc -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk
  -fno-strict-aliasing -Wno-long-double
 -no-cpp-precomp
  -mno-fused-madd
  -fno-common -dynamic -DNDEBUG -g -O3
  -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
 
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
  -I/usr/local/include -I/usr/include
 -I/usr/X11R6/include
  -I.
 
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
  -Isrc -Iagg24/include -I.
 
 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
  -c src/_macosx.m -o
  build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 
  g++ -arch i386 -isysroot
 /Developer/SDKs/MacOSX10.4u.sdk -g
  -bundle
  -undefined dynamic_lookup
  build/temp.macosx-10.3

Re: [Matplotlib-users] current svn fails to build on mac

2009-07-09 Thread Michiel de Hoon

setupext.py was indeed not reading the macosx build information from setup.cfg. 
I've put a patch here:

http://sourceforge.net/tracker/?func=detailatid=560722aid=2818964group_id=80706

(patch number 2818964).

The error you're seeing is described in this technical note from Apple:

http://developer.apple.com/qa/qa2007/qa1567.html

One thing that changed between 0.98.5.3 and the current SVN version is that 
we're now using matplotlib's path cleanup code, which is in C++. Maybe the 
linker is picking up different libraries with C++? Though I haven't seen this 
error on Mac OS X 10.4 or 10.5.

--Michiel.

--- On Thu, 7/9/09, Robin robi...@gmail.com wrote:

 From: Robin robi...@gmail.com
 Subject: [Matplotlib-users] current svn fails to build on mac
 To: matplotlib-users@lists.sourceforge.net
 Date: Thursday, July 9, 2009, 6:11 AM
 Hi,
 
 Just to let folks know the current SVN version fails to
 build on a
 mac. I built the release (0.98.5.3) successfully from
 source so I
 think my environment, dependencies etc. should be OK.
 
 The problem seems to be building mac os x native backend:
 building 'matplotlib.backends._macosx' extension
 gcc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
 -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
 -mno-fused-madd
 -fno-common -dynamic -DNDEBUG -g -O3
 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -I/usr/local/include -I/usr/include -I/usr/X11R6/include
 -I.
 -I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy/core/include
 -Isrc -Iagg24/include -I.
 -I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
 -c src/_macosx.m -o
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
 -bundle
 -undefined dynamic_lookup
 build/temp.macosx-10.3-i386-2.5/src/_macosx.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxx_extensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxextensions.o
 build/temp.macosx-10.3-i386-2.5/CXX/cxxsupport.o
 build/temp.macosx-10.3-i386-2.5/CXX/IndirectPythonInterface.o
 build/temp.macosx-10.3-i386-2.5/src/agg_py_transforms.o
 build/temp.macosx-10.3-i386-2.5/src/path_cleanup.o
 -L/usr/local/lib
 -L/usr/lib -L/usr/X11R6/lib -lstdc++ -lm -o
 build/lib.macosx-10.3-i386-2.5/matplotlib/backends/_macosx.so
 -framework Cocoa
 ld: cycle in dylib re-exports with
 /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libGL.dylib
 collect2: ld returned 1 exit status
 error: command 'g++' failed with exit status 1
 
 How can I disable building the mac os x backend. I copied
 setup.cfg.example to setup.cfg and have macosx = False
 but it
 doesn't seem to have any effect. python setup.py config
 still
 reports  Mac OS X native: yes.
 
 Thanks
 
 Robin
 
 PS - some minor comments about the sourceforge download
 page (I dont
 know if these can be changed):
 On the summary page ( http://sourceforge.net/projects/matplotlib/ )
 the download now link  which I would think should
 point to the
 latest release point to 0.91. Then when you do 'view all
 files'
 matplotlib-maintenance is the default expanded branch of
 the tree with
 latest version 0.91.4. To get the real new version you have
 to close
 this tree or scroll down to the normal matplotlib branch.
 If I didn't
 know the versions to look for beforehand I think this would
 be really
 confusing - can you make matplotlib the default instead of
 matplotlib-maintenance?
 Also I went to the Developer page to find the svn repo
 http://sourceforge.net/projects/matplotlib/develop and
 followed the
 instructions there which of course started to pull in the
 whole repo.
 When I found it taking a long time I noticed that I was
 getting
 branches etc I didnt need. I know this is covered with the
 correct
 command in the install page, but I thought it would be
 handy to change
 it here as well to avoid someone else making the mistake I
 made.
 These are very minor things and normally I wouldn't bother
 mentioning,
 but since the matplotlib website etc. seems so nice I
 figured there is
 someone who cares about this stuff - although I'm not sure
 whether its
 possible to change this stuff in sourceforge.
 
 --
 Enter the BlackBerry Developer Challenge  
 This is your chance to win up to $100,000 in prizes! For a
 limited time, 
 vendors submitting new applications to BlackBerry App
 World(TM) will have
 the opportunity to enter the BlackBerry Developer
 Challenge. See full prize  
 details at: http://p.sf.net/sfu/Challenge
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to 

Re: [Matplotlib-users] current svn fails to build on mac

2009-07-09 Thread Michiel de Hoon

 I should have specified I'm on OS X 10.5.7. Xcode 3.0.

I'm using the same, but I'm not seeing this error.

Can you verify that matplotlib 0.98.5.3 still compiles correctly?
If it does, we can compare the linker flags used for 0.98.5.3 and the svn 
version to find the problem.

--Michiel.


--- On Thu, 7/9/09, Robin robi...@gmail.com wrote:

 From: Robin robi...@gmail.com
 Subject: Re: [Matplotlib-users] current svn fails to build on mac
 To: matplotlib-users@lists.sourceforge.net
 Date: Thursday, July 9, 2009, 7:16 AM
 On Thu, Jul 9, 2009 at 12:15 PM,
 Robinrobi...@gmail.com
 wrote:
  On Thu, Jul 9, 2009 at 12:06 PM, Michiel de Hoonmjldeh...@yahoo.com
 wrote:
 
  One thing that changed between 0.98.5.3 and the
 current SVN version is that we're now using matplotlib's
 path cleanup code, which is in C++. Maybe the linker is
 picking up different libraries with C++? Though I haven't
 seen this error on Mac OS X 10.4 or 10.5.
 
 
  I should have specified I'm on OS X 10.5.7. Xcode
 3.0.
 
 
 As do many others I consistently forget to reply to all on
 this list.
 This is the only list I follow that doesn't set the
 reply-to to go to
 the list!
 
 Cheers
 
 Robin
 
 --
 Enter the BlackBerry Developer Challenge  
 This is your chance to win up to $100,000 in prizes! For a
 limited time, 
 vendors submitting new applications to BlackBerry App
 World(TM) will have
 the opportunity to enter the BlackBerry Developer
 Challenge. See full prize  
 details at: http://p.sf.net/sfu/Challenge
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ipython threading fails with macosx backend

2009-07-02 Thread Michiel de Hoon

 I can't draw dashed lines.

In principle, you should be able to draw dashed lines with the MacOSX backend. 
Can you post a complete script that triggers this error?

 Thu Jul  2 14:51:48 Python-64[56094] Error:
 CGContextSetLineDash: invalid
 dash array: negative lengths are not allowed.

--Michiel.


--- On Thu, 7/2/09, keflavich keflav...@gmail.com wrote:

 From: keflavich keflav...@gmail.com
 Subject: Re: [Matplotlib-users] ipython threading fails with macosx backend
 To: matplotlib-users@lists.sourceforge.net
 Date: Thursday, July 2, 2009, 4:54 PM
 
 OK, thanks.  I don't really know why it's failing, but
 I'm going to continue
 trying to get other backends installed to test them. 
 
 I also now have independent reasons not to use the MacOSX
 backend:
 
 Thu Jul  2 14:51:48 Python-64[56094] Error:
 CGContextSetLineDash: invalid
 dash array: negative lengths are not allowed.
 
 
 
 I can't draw dashed lines.
 
 Adam
 -- 
 View this message in context: 
 http://www.nabble.com/ipython-threading-fails-with-macosx-backend-tp24311071p24313852.html
 Sent from the matplotlib - users mailing list archive at
 Nabble.com.
 
 
 --
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 


  

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


Re: [Matplotlib-users] savefig as pdf not generating vector graphics?

2009-06-28 Thread Michiel de Hoon

--- On Sun, 6/28/09, Jouni K. Seppänen j...@iki.fi wrote:
 The file you sent was not generated by the pdf backend but
 by Mac OS X 10.5.6 Quartz PDFContext, which probably means
 that the OS X backend saves pdf files using the OS X machinery
 and not the pdf backend. Indeed the formulas look like bitmaps.

Previously the Mac OS X backend indeed used its own machinery to create PDF 
files. Recent versions of the backend in SVN, however, use matplotlib's pdf 
backend. So the problem should go away if you use matplotlib from SVN.

The Mac OS X backend itself can actually be fixed to use vector graphics on 
screen instead of bitmaps. That will need some time, but I'll get round to it 
one of these weeks.

--Michiel.


  

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


Re: [Matplotlib-users] New contourf() drawing polygon boundaries for some reason?

2009-06-16 Thread Michiel de Hoon

I can't reproduce this error with the current code in SVN trunk, but I remember 
seeing this bug a while ago. So I'm guessing that this bug has already been 
fixed in SVN. Zane, could you try installing the latest matplotlib from trunk 
and see if you still see this bug?

--Michiel 

--- On Mon, 6/15/09, Michael Droettboom md...@stsci.edu wrote:

 From: Michael Droettboom md...@stsci.edu
 Subject: Re: [Matplotlib-users] New contourf() drawing polygon boundaries for 
  some reason?
 To: z...@amateurearthling.org, matplotlib-users 
 matplotlib-users@lists.sourceforge.net, Michiel de Hoon 
 mjldeh...@yahoo.com
 Date: Monday, June 15, 2009, 6:08 PM
 
 
 
   
 
  
 Thanks for the thorough investigation.
 
 
 
 Michiel: can you look into why the macosx backend is
 drawing the
 strokes around the polygons?  Probably as simple as
 inadvertently
 ignoring an argument.
 
 
 
 I'll look into the path simplification-related issues.
 
 
 
 Cheers,
 
 Mike
 
 
 
 On 06/15/2009 03:29 PM, Zane Selvans wrote:
 
   Yes.  By far the worst of these behaviors is the
 macosx GUI output.  I
 could see the other ones just being the way it's
 supposed to look.
 Here's a summary:
 
 backend: macosx; path.simplify: (false|true) GUI =
 black borders to
 drawn polygons (incl. contour region crossing lines, very
 bad)
 http://zaneselvans.org/dropbox/contourf_backendmacosx.png
 
 backend: agg (PNG output) path.simplify: (true|false) =
 somewhat
 visible borders between polygons (esp. adjacent to
 contrasting colors)
 http://zaneselvans.org/dropbox/contourf_simplifytrue.png
 http://zaneselvans.org/dropbox/contourf_simplifyfalse.png
 
 backend: pdf (PDF output) path.simplify: true =
 reliably visible
 irregularities (but probably this is somewhat expected with
 SVG
 output)
 http://zaneselvans.org/dropbox/contourf_simplifytrue.pdf
 
 backend: pdf (PDF output) path.simplify: false =
 infinitessimally
 thin lines of background color visible between contour
 filled regions.
 http://zaneselvans.org/dropbox/contourf_simplifyfalse.pdf
 
 And here's what I used to generate them:
 
 def broken_contourf():
 
 Simple demonstration that filled contour plots are
 broken.
 
 Looking at the PDF and PNG output using the macosx
 backend, everything is
 fine.  It's only the GUI output which is for some
 reason outlining the
 polygons in the filled contours.
 
 
 from numpy.random import uniform, seed
 from matplotlib.mlab import griddata
 import matplotlib.pyplot as plt
 import numpy as np
 # make up data.
 #npts = int(raw_input('enter # of random points to
 plot:'))
 seed(-1)
 npts = 200
 x = uniform(-2,2,npts)
 y = uniform(-2,2,npts)
 z = x*np.exp(-x**2-y**2)
 # define grid.
 xi = np.linspace(-2.1,2.1,100)
 yi = np.linspace(-2.1,2.1,100)
 # grid the data.
 zi = griddata(x,y,z,xi,yi)
 # contour the gridded data, plotting dots at the
 nonuniform data points.
 CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.jet)
 # plot data points.
 plt.title('griddata() and contourf() test')
 plt.savefig('broken_contourf.pdf')
 plt.savefig('broken_contourf.png')
 
 On Fri, Jun 12, 2009 at 3:02 PM, Zane Selvansz...@ideotrope.org
 wrote:
   
   
 I switched back to using the macosx backend, and
 it turns out that the
 thin black lines surrounding the polygons (including
 crossing the
 filled contour regions from one closed contour to another)
 only get
 displayed in the GUI.  PDF and PNG output look fine.
 
 Zane
 
 On Fri, Jun 12, 2009 at 2:27 PM, Zane Selvansz...@ideotrope.org
 wrote:
 
 
   If I set path.simplify: False, the shape of the
 gaps between the
 filled polygons does change.  Instead of being irregular,
 it becomes
 an infinitessimally thin gap of uniform width, allowing the
 (in this
 case white) background to show through.
 
 In both of these cases (path.simplify: True|False), the PNG
 version of
 the same figures also show representations of these gaps
 which are
 identical to those which appear in the PDF (though
 obviously
 pixelated), so I don't think it's something
 that's wrong in the vector
 graphics code per se.
 
 Zane
 
 On Fri, Jun 12, 2009 at 11:46 AM, Michael Droettboommd...@stsci.edu
 wrote:
   
   
 Shot in the dark here, but what if you set the
 rcParam path.simplify to
 False?  There have been recent changes to that code.
 
 Also, since the Agg backend doesn't have an associated
 GUI, you need to use
 the savefig() command and provide a filename, rather than
 using show().
 
 Cheers,
 Mike
 
 Zane Selvans wrote:
 
 
   Um, yeah.  So my response got bounced
 because of the attachment.  Take 2:
 
 For some reason my script bombed when I switched to the Agg
 backend,
 trying to display to the screen (it said Figure has no
 method show())
 
 So I output the plot as both a PDF and a PNG (still having
 backend:
 agg in my rcfile) and in both of those cases, irregular
 gaps are
 visible

Re: [Matplotlib-users] Wxpython, Matplotlib and draw_artist

2009-05-07 Thread Michiel de Hoon

I am not sure if this is related, but maybe it can give you a hint.
I looked at the copy_from_bbox/restore/draw_artist code a long time ago, and if 
I remember correctly by calling restore_region function, you're drawing 
directly onto the canvas. In contrast, if you do e.g. plot(x,y), you're not 
drawing directly; you're just telling matplotlib what you want to plot, but the 
actual plotting is done by matplotlib by calling figure.draw(renderer). 
Typically, this happens from inside the event loop, which is how things are 
supposed to be. On the other hand, restore_region bypasses the event loop, 
which is usually not a good idea.

--Michiel




--- On Wed, 5/6/09, Elan Pavlov epav...@gmail.com wrote:

 From: Elan Pavlov epav...@gmail.com
 Subject: [Matplotlib-users] Wxpython, Matplotlib and draw_artist
 To: matplotlib-users@lists.sourceforge.net
 Date: Wednesday, May 6, 2009, 2:05 PM
 Hi,
 I can't get wxpython to play well with matplotlib and
 draw_artist.
 After mucking around quite a bit I think I narrowed it down
 to the
 draw_artist function The problem seems to be that
 draw_artist when
 working within wxpython (as opposed to a simple mpl window)
 doesn't
 remove the old points it plotted. I adapted the example
 from the
 cookbook
 (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
 illustrate this problem. I modified the example so it is
 updated on
 mouse movements (followed by idle time) so that the problem
 is more
 visual.
 
 Replacing the copy_from_bbox/restore/draw_artist (i.e.
 removing the
 animated properties) with the simple draw causes this to
 work. The
 copy_from_bbox/restore methods work as expected so it seems
 that the
 problem is either the draw_artist (or possibly the blit,
 but that
 seems unlikely).
 
 Is there something I am doing wrong?
 
 Elan
 -- 
 Beware of bugs in the above code; I have only proved it
 correct, not tried it.
 - Donald Knuth
 --
 The NEW KODAK i700 Series Scanners deliver under ANY
 circumstances! Your
 production scanning environment may not be a perfect world
 - but thanks to
 Kodak, there's a perfect scanner to get the job done!
 With the NEW KODAK i700
 Series Scanner you'll get full speed at 300 dpi even
 with all image 
 processing features enabled.
 http://p.sf.net/sfu/kodak-com___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


  

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Wxpython, Matplotlib and draw_artist

2009-05-07 Thread Michiel de Hoon

 Looks like we have the culprit. Is this a bug or an
 undocumented feature 

I think that the current code is a bit of a hack that sometimes works and 
sometimes doesn't, depending on which backend you use.

 and is there anything I should do about it (i.e.,
 report it)?

Yes, I think so. It's not super difficult to find a solution, but it will need 
some discussion with the matplotlib developers to find the best way to fit this 
in with the existing matplotlib code.

 More importantly, do you have any idea how to fix the
 problem 

In principle, it's simple. You'll need to split up the restore_background 
function in a frontend_restore_background and a backend_restore_background 
(arbitrary names, of course). The frontend_restore_background is what the user 
uses to tell matplotlib which background should be restored where. Inside the 
event loop, the backend_restore_background uses this information to do the 
actual blitting.

 or how the event interactions with wxpython work?

I don't think it matters much, as long as the actual drawing is done from 
inside figure.draw(renderer).

 Is it even feasible to do a
 restore_canvas within the event loop

Absolutely. There is no essential difference between drawing a line or blitting 
a background. Imagine the code in figure.draw(renderer) to be something along 
the lines of

blit a background, if any
draw the lines, if any
fill shapes with color, if any
draw the text, if any
...

 or will this slow it down to the extent of being useless?

I wouldn't know why.

--Michiel.


--- On Thu, 5/7/09, Elan Pavlov epav...@gmail.com wrote:

 From: Elan Pavlov epav...@gmail.com
 Subject: Re: [Matplotlib-users] Wxpython, Matplotlib and draw_artist
 To: mjldeh...@yahoo.com
 Cc: matplotlib-users@lists.sourceforge.net
 Date: Thursday, May 7, 2009, 10:23 AM
 Hi,
 By George, I think you've got it! That does explain the
 fact that old
 lines remain since the restore_background is what should 
 remove them.
 To test out your hypotheses I added sleep commands after
 every line in
 the update_line()  function and indeed a blank axes never
 appears.
 Looks like we have the culprit. Is this a bug or an
 undocumented
 feature and is there anything I should do about it (i.e.,
 report it)?
 More importantly, do you have any idea how to fix the
 problem or how
 the event interactions with wxpython work? Is it even
 feasible to do a
 restore_canvas within the event loop or will this slow it
 down to the
 extent of being useless?
 
 Elan
 ---
 I can no other answer make but thanks,
 And thanks, and ever thanks.
 - William Shakespeare
 
 On Thu, May 7, 2009 at 9:17 AM, Michiel de Hoon
 mjldeh...@yahoo.com wrote:
 
  I am not sure if this is related, but maybe it can
 give you a hint.
  I looked at the copy_from_bbox/restore/draw_artist
 code a long time ago, and if I remember correctly by calling
 restore_region function, you're drawing directly onto
 the canvas. In contrast, if you do e.g. plot(x,y),
 you're not drawing directly; you're just telling
 matplotlib what you want to plot, but the actual plotting is
 done by matplotlib by calling figure.draw(renderer).
 Typically, this happens from inside the event loop, which is
 how things are supposed to be. On the other hand,
 restore_region bypasses the event loop, which is usually not
 a good idea.
 
  --Michiel
 
 
 
 
  --- On Wed, 5/6/09, Elan Pavlov
 epav...@gmail.com wrote:
 
  From: Elan Pavlov epav...@gmail.com
  Subject: [Matplotlib-users] Wxpython, Matplotlib
 and draw_artist
  To: matplotlib-users@lists.sourceforge.net
  Date: Wednesday, May 6, 2009, 2:05 PM
  Hi,
  I can't get wxpython to play well with
 matplotlib and
  draw_artist.
  After mucking around quite a bit I think I
 narrowed it down
  to the
  draw_artist function The problem seems to be that
  draw_artist when
  working within wxpython (as opposed to a simple
 mpl window)
  doesn't
  remove the old points it plotted. I adapted the
 example
  from the
  cookbook
 
 (http://www.scipy.org/Cookbook/Matplotlib/Animations) to
  illustrate this problem. I modified the example so
 it is
  updated on
  mouse movements (followed by idle time) so that
 the problem
  is more
  visual.
 
  Replacing the copy_from_bbox/restore/draw_artist
 (i.e.
  removing the
  animated properties) with the simple draw causes
 this to
  work. The
  copy_from_bbox/restore methods work as expected so
 it seems
  that the
  problem is either the draw_artist (or possibly the
 blit,
  but that
  seems unlikely).
 
  Is there something I am doing wrong?
 
  Elan
  --
  Beware of bugs in the above code; I have only
 proved it
  correct, not tried it.
  - Donald Knuth
 
 --
  The NEW KODAK i700 Series Scanners deliver under
 ANY
  circumstances! Your
  production scanning environment may not be a
 perfect world
  - but thanks to
  Kodak, there's a perfect scanner to get the
 job done!
  With the NEW KODAK i700
  Series

[Matplotlib-users] Matplotlib interactive with gtk, gtkcairo, gtkagg backends

2009-05-02 Thread Michiel de Hoon

Hi everybody,

For those of you that are using the gtk, gtkcairo, or gtkagg backends:

Today pygtk version 2.15.0 became available, which is the first pygtk that can 
be used interactively from both python and ipython. If you're using ipython, be 
sure to wait for release 0.10.0 of ipython before upgrading to pygtk 2.15.0; 
older versions of ipython may not work correctly. If you're using regular 
python, you can install pygtk 2.15.0, set interactive to True in matplotlibrc, 
and you should be all set. Unfortunately, this won't work with IDLE; this is 
because of the lack of event loop support in Python itself.

Enjoy!

--Michiel.


  

--
Register Now  Save for Velocity, the Web Performance  Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance  Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Hexagonal binning plot

2008-04-27 Thread Michiel de Hoon
Hi everybody,

About two weeks ago I was asking on this mailing list if matplotlib can make 
hexagonal binning plots as an alternative to scatter plots. I have now written 
such a function for matplotlib. In case other people are also looking for this 
functionality, the patch is available here:

http://sourceforge.net/tracker/index.php?func=detailaid=1952339group_id=80706atid=560722

As an example of this function, the two figures below show a traditional 
scatter plot, and a hexagonal binning plot using the same data:

Traditional scatter plot:
  http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/scatter.png
  
 Hexagonal binning plot, using the same data:
  http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/hexbin.png
 

Best, 

--Michiel.





Hi everybody,
  
  Is there a function in matplotlib for hexagonal binning of scatter plots? 
Here are some examples of what I am looking for:
  
   http://faculty.washington.edu/tlumley/survey/greyhexbin.png
  
  http://www.spss.com/research/wilkinson/nViZn/hexbin.gif
  
  http://addictedtor.free.fr/graphiques/75x75/tn_139.png
  
  Thanks!
  
  --Michiel.
   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Hexagonal binning for scatter plots

2008-04-19 Thread Michiel de Hoon
Hi everybody,

Is there a function in matplotlib for hexagonal binning of scatter plots? Here 
are some examples of what I am looking for:

http://faculty.washington.edu/tlumley/survey/greyhexbin.png

http://www.spss.com/research/wilkinson/nViZn/hexbin.gif

http://addictedtor.free.fr/graphiques/75x75/tn_139.png

Thanks!

--Michiel.

 between -00-00 and -99-99-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users