Re: [Matplotlib-users] IMPORTANT: Mailing lists are moving

2015-08-01 Thread Michael Droettboom
Existing users need to resubscribe.  The list is so old and full of 
obsolete and spammy e-mails we thought it best to start afresh.


Cheers,
Mike

On 07/31/2015 11:22 PM, Stephen wrote:

Hello Micheal,

Do existing matplotlib-users subscribers need to re-subscribe on the 
new list , or have our emails rolled over to the new list?


Steve

On 01/08/15 03:07, Michael Droettboom wrote:


Due to recent technical problems and changes in policy on 
SourceForge, we have decided to move the matplotlib mailing lists to 
python.org.


To subscribe to the new mailing lists, please visit:

 *

For user questions and support:

https://mail.python.org/mailman/listinfo/matplotlib-users

matplotlib-us...@python.org

 *

For low-volume announcements about matplotlib releases and
related events and software:

https://mail.python.org/mailman/listinfo/matplotlib-announce

matplotlib-annou...@python.org

 *

For developer discussion:

https://mail.python.org/mailman/listinfo/matplotlib-devel

matplotlib-de...@python.org

The old list will remain active in the meantime, but all new posts 
will auto-reply with the location of the new mailing lists.


The old mailing list archives will remain available.

Thanks to Ralf Hildebrandt at python.org for making this possible.

Cheers,
Michael Droettboom

​


--


___
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


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


Re: [Matplotlib-users] Matplotlib + py3 + gtk3

2014-03-02 Thread Michael Droettboom
Thanks.  I'd definitely consider this a bug this.  Would you mind 
creating an issue or pull request on github.com/matplotlib/matplotlib so 
it doesn't get lost?


Mike

On 03/01/2014 05:42 PM, Jon Roadley-Battin wrote:

On 02/27/2014 06:58 PM, Jon Roadley-Battin wrote:
 Good evening,

 I am at present migrating an application of mine from py27+pygtk (with
 mpl) to py33+pygobject (gtk3)

 Unfortunately I am unable to use

 from  matplotlib.backends.backend_gtk3agg  import 
 FigureCanvasGTK3Agg  as  FigureCanvas
 from  matplotlib.backends.backend_gtk3  import 
 NavigationToolbar2GTK3  as  NavigationToolbar


 Which is is on the examples (
 
http://matplotlib.org/examples/user_interfaces/embedding_in_gtk3_panzoom.html

 ) but is also the logical translation from what I presently have.
 This falls fowl of the cairo issue

 What I am having to use is backend_gtk3cairo. However this is being
 triggered

  raise ValueError(The Cairo backend can not draw paths longer than
 18980 points.)

 I am generally plotting 7 x-y plots with upto 30,000 points.
 Now for now I have commented this out from my local install, is there
 a better/preferred/recommended alternative?

This was put in there because cairo had (at least at the time) a hard
coded limit on path size, and getting a Python exception was IMHO
preferable to segfaulting and having the process go away.  Are you
saying that when you comment it out, it's currently working?  It may be
that cairo has fixed this limit in the intervening years. Can you
provide a simple, standalone example that reproduces the error?


Using python33  pygi-aio-3.10.2-win32_rev18 (to provide pygobject for 
windows:)
Using: 
http://matplotlib.org/examples/user_interfaces/embedding_in_gtk3_panzoom.html 
as the baseline provides the following error:


  File 
c:\Python33\lib\site-packages\matplotlib\backends\backend_gtk3agg.py, line 
52, in on_draw_event

buf, cairo.FORMAT_ARGB32, width, height)
NotImplementedError: Surface.create_for_data: Not Implemented yet.


This has been mentioned a few times across the ml

Modifying the example to use backend_gtk3cairo

from matplotlib.backends.backend_gtk3cairo import 
FigureCanvasGTK3Cairo as FigureCanvas
from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3 as 
NavigationToolbar



Now the example runs and plots a nice sinewave (as expected). Modify 
the script to plot 7 waveforms, 100pts


##
#!/usr/bin/env python3

demonstrate NavigationToolbar with GTK3 accessed via pygobject


from gi.repository import Gtk

from matplotlib.figure import Figure
import numpy as np
from matplotlib.backends.backend_gtk3cairo import 
FigureCanvasGTK3Cairo as FigureCanvas
from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3 as 
NavigationToolbar



win = Gtk.Window()
win.connect(delete-event, Gtk.main_quit )
win.set_default_size(400,300)
win.set_title(Embedding in GTK)

fig = Figure(figsize=(5,4), dpi=100)
plt = fig.add_subplot(1,1,1)

t = np.arange(0,2*np.pi,2*np.pi/100)
a = np.sin(t + 0*(2*np.pi/7))
b = np.sin(t + 1*(2*np.pi/7))
c = np.sin(t + 2*(2*np.pi/7))
d = np.sin(t + 3*(2*np.pi/7))
e = np.sin(t + 4*(2*np.pi/7))
f = np.sin(t + 5*(2*np.pi/7))
g = np.sin(t + 6*(2*np.pi/7))
plt.plot(t,a)
plt.plot(t,b)
plt.plot(t,c)
plt.plot(t,d)
plt.plot(t,e)
plt.plot(t,f)
plt.plot(t,g)

vbox = Gtk.VBox()
win.add(vbox)

# Add canvas to vbox
canvas = FigureCanvas(fig)  # a Gtk.DrawingArea
vbox.pack_start(canvas, True, True, 0)

# Create toolbar
toolbar = NavigationToolbar(canvas, win)
vbox.pack_start(toolbar, False, False, 0)

win.show_all()
Gtk.main()


This works, its only 100pts for 7 scatters so nothing unexpected.
Modify the arange to create a time array of 30,000 pts.

t = np.arange(0,2*np.pi,2*np.pi/3)


  File 
c:\Python33\lib\site-packages\matplotlib\backends\backend_cairo.py, 
line 143, in draw_path
raise ValueError(The Cairo backend can not draw paths longer than 
18980 points.)

ValueError: The Cairo backend can not draw paths longer than 18980 points.


The already mentioned raise to protect against a segfault.
Edit backend_cairo to comment out the check:


def draw_path(self, gc, path, transform, rgbFace=None):
#if len(path.vertices)  18980:
#raise ValueError(The Cairo backend can not draw paths 
longer than 18980 points.)


ctx = gc.ctx



7channel, 30,000 pts each is plotted just fine. Zoom rectangle is slow 
to render, but this is true for 100pts (so more a gtk3 thing than a 
cairo and multiple points thing)


Final script:



###
#!/usr/bin/env python3

demonstrate NavigationToolbar with GTK3 accessed via pygobject


from gi.repository import Gtk

from 

Re: [Matplotlib-users] Matplotlib + py3 + gtk3 wouws

2014-02-28 Thread Michael Droettboom

On 02/27/2014 06:58 PM, Jon Roadley-Battin wrote:

Good evening,

I am at present migrating an application of mine from py27+pygtk (with 
mpl) to py33+pygobject (gtk3)


Unfortunately I am unable to use

from  matplotlib.backends.backend_gtk3agg  import  FigureCanvasGTK3Agg  as  
FigureCanvas
from  matplotlib.backends.backend_gtk3  import  NavigationToolbar2GTK3  as  
NavigationToolbar

Which is is on the examples ( 
http://matplotlib.org/examples/user_interfaces/embedding_in_gtk3_panzoom.html 
) but is also the logical translation from what I presently have.

This falls fowl of the cairo issue

What I am having to use is backend_gtk3cairo. However this is being 
triggered


 raise ValueError(The Cairo backend can not draw paths longer than 
18980 points.)


I am generally plotting 7 x-y plots with upto 30,000 points.
Now for now I have commented this out from my local install, is there 
a better/preferred/recommended alternative?


This was put in there because cairo had (at least at the time) a hard 
coded limit on path size, and getting a Python exception was IMHO 
preferable to segfaulting and having the process go away.  Are you 
saying that when you comment it out, it's currently working?  It may be 
that cairo has fixed this limit in the intervening years. Can you 
provide a simple, standalone example that reproduces the error?


I have read about cairocffi but this doesn't 
seem conveniently possible at this moment in time (especially for 
windows)


I'm not sure if the Python wrappers will matter, since this issue is 
actually in the underlying Cairo library.




Equally I have seen mpl-devel mailing list entries from 4years ago 
stating that this check was to be removed (a cairo 1.4.10 issue)


Are you referring to this thread?

http://matplotlib.1069221.n5.nabble.com/Path-length-in-the-cairo-backend-td36582.html

The conclusion there (if you scroll down) was that the check is still 
needed as of Cairo 1.8.


Mike



JonRB


--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk


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



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis  security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] font setting in matplotlib 1.3.1

2014-01-27 Thread Michael Droettboom

Thanks for the report.

Indeed, you are correct in that the root of this problem is that 
Bitstream Vera Sans does not contain these characters, yet it is being 
selected erroneously.


It does appear that there is a bug in the font selection algorithm, that 
Bitstream Vera Sans gets selected as a perfect match even when it is 
not the first font in the requested list. Vera Sans ships with 
matplotlib and is the default fallback font, even though it is not 
installed as a system font on your computer.


I have a fix here: https://github.com/matplotlib/matplotlib/pull/2771

In the meantime, the solution you arrived at is the probably the best we 
can do for now.


Mike

On 01/27/2014 11:21 AM, Phil Elson wrote:
Thanks for this Vlastimil, looks like there is either a subtlety 
beyond my font knowledge or a bug here - mdboom, did you have any 
ideas? Otherwise I think we need a github issue for this.


Cheers,


On 4 January 2014 19:37, Vlastimil Brom vlastimil.b...@gmail.com 
mailto:vlastimil.b...@gmail.com wrote:


Hi all,
after upgrading to matplotlib 1.3.1, I noticed some display errors on
the plots with regard to accented characters (such as carons etc.).
As I recall, I had similar problem in the past and could work around
them by modifying rcParams, however, this fix doesn't work as expected
in 1.3.1. (with python 2.7.6, 32bit on Win 7, Czech - with both WXAgg
and TKAgg backends).
From the usual Czech diacritics   ác(d(ée(ín(ór(s(t(úu*ýz( some
are not
displayed  (d(e(n(r(t(u*) - replacement squares are shown instead.

Simply prepending a suitable font at the beginning of the list
rcParams['font.sans-serif'] doesn't help in 1.3.1.
I eventually found out, that Bitstream Vera Sans (which is not
installed on this computer) is somehow offending - as long as this
item is in the list (even at the end), the mentioned characters aren't
displayed.

The problem can be observed in the following simple pylab script:
==
#! Python
# -*- coding: utf-8 -*-

# with implicit fonts d(e(n(r(t(u* are not displayed properly in
the plot title
from matplotlib import rcParams
rcParams['font.family'] = 'sans-serif'
if Bitstream Vera Sans in rcParams['font.sans-serif']:
rcParams['font.sans-serif'].remove(Bitstream Vera Sans)

# after appending the offending font even at the end of the list (by
uncommenting the following line), d(e(n(r(t(u* are not displayed again
# rcParams['font.sans-serif'].append(Bitstream Vera Sans)

import pylab
pylab.title(uabcd ác(d(ée(ín(ór(s(t(úu*ýz( äöüß ê xyz)
pylab.show()
==

Is there something special in the resolution of the font items in
 rcParams?
This individual issue seems to be fixed with removing the single font,
but I'd like to understand this more generally, as the installed fonts
on different computers differ.

Thanks in advance
  Vlastimil Brom


--
Rapidly troubleshoot problems before they affect your business.
Most IT
organizations don't have a clear picture of how application
performance
affects their revenue. With AppDynamics, you get 100% visibility
into your
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of
AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk


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



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net

Re: [Matplotlib-users] axes.text() plotting text outside of axes bounds

2014-01-22 Thread Michael Droettboom

On 01/22/2014 09:43 AM, Benjamin Root wrote:




On Wed, Jan 22, 2014 at 9:21 AM, Daryl Herzmann akrh...@gmail.com 
mailto:akrh...@gmail.com wrote:


Hello,

I'm wondering why stuff plotted with ax.text() does not get
clipped by the axes bounds on the plot.  Here's a simple
example, run with 1.3.1:

import matplotlib.pyplot as plt

(fig, ax) = plt.subplots(1,1)

for i in range(5):
  for j in range(5):
ax.text(i,j, %sx%s % (i,j), ha='center', va='center')
ax.plot([0,8],[0,8])
ax.set_xlim(0,2.8)
ax.set_ylim(0,2.8)
fig.savefig('test.png')

and attached output.  This causes me lots of grief with basemap as
well.  Is there a non-brute-force trick to get these values
plotted outside the axes bounds removed?

daryl


I can't quite remember what the original issue was, but I do seem to 
recall that this behavior was made intentional for some reason. I 
honestly can't remember why, though, and I can't fathom what 
circumstances that this would be desirable...


Often, the text is an annotation that you would not want to have clipped.

```
ax.text(i,j, %sx%s % (i,j), ha='center', va='center').set_clip_on(True)
```

will turn the clipping on for the text.

Mike

--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hexbin runtime warnings

2013-12-30 Thread Michael Droettboom
Not sure.  Can you provide a small, standalone example that reproduces 
the problem?

Mike

On 12/27/2013 12:05 PM, Neal Becker wrote:
 Any idea what could cause hexbin to issue runtime warnings and then draw
 a blank figure?

 /home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6524:
 RuntimeWarning: invalid value encountered in true_divide
x = (x - xmin) / sx
 /home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6539:
 RuntimeWarning: invalid value encountered in less
bdist = (d1  d2)



 --
 Rapidly troubleshoot problems before they affect your business. Most IT
 organizations don't have a clear picture of how application performance
 affects their revenue. With AppDynamics, you get 100% visibility into your
 Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
 http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Navigation Slowness in Matplotlib with Subplots

2013-11-27 Thread Michael Droettboom
The gist here is that `subplot` doesn't really know when the new subplot 
exactly overlaps another -- it's essentially unaware of what's already 
there.  We could do some deduplication there.  However, it's also a 
completely legitimate use case to create two subplots in the same 
location, and then change the location of the ticks, formatting and 
scale on one of them and not the other.  And we can't really guess which 
the user intends to do.  Your workaround seems like a good one, in the 
absence of really changing the API here so matplotlib can know the 
user's intent.


Mike

On 11/26/2013 08:23 PM, John Gu wrote:

Hello,

I had submitted a similar issue back in October of 2011.  I'm using 
matplotlib 1.3.1.  Here's the code to produce the issue:


f = figure()
for i in xrange(9): subplot(3,3,i+1)
f.axes[0].plot(range(100))

Now try to drag the line in the first subplot around.  It's extremely 
slow.  Now do the following:


for ax in f.axes[1:]: ax.axison=False

Now, when you drag the line around in the first subplot, there's a 
huge difference.  Basically, it seems like that matplotlib is 
attempting to redraw a lot of unnecessary things on the figure.  Is 
there an easy fix to this?


Thanks,
John


--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk


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



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] disabling downloads during build process

2013-11-11 Thread Michael Droettboom

On 11/09/2013 12:34 PM, Nat Echols wrote:
A few of the users of our software want to compile the entire mess 
from source using non-standard compilers and/or options.  We try to 
bundle all dependencies with the package we distribute but the current 
version of Matplotlib is attempting to download another half-dozen or 
so, which I'm pretty sure is new behavior.  Because these users work 
at a company with draconian network use policies, HTTP connections is 
completely blocked, and the build fails when Matplotlib can't download 
these dependencies.


Two questions:

1) Is there a way to instruct Matplotlib not to attempt to download 
anything?  I do not care if the build fails as a result of the missing 
dependencies - at least it will be obvious what is missing, and it 
will prevent undefined behavior on other systems.


2) Barring (1), is there a complete list of all required dependencies 
somewhere?  The one on the website appears to be out of date, and it 
is not clear what is truly required versus simply nice to have.


The documentation is correct, but it does not list secondary 
dependencies (i.e. dependencies of dependencies).


Mike



thanks,
Nat


--
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



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
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


[Matplotlib-users] The return of Mac OS-X installers

2013-10-31 Thread Michael Droettboom
Courtesy of Matthew Brett, we now have Mac OS X installers again. These 
are designed to work with the python.org distribution, and include all 
dependencies.


They are available here:

http://matplotlib.org/downloads

Please let us know how you fare!

Mike

--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] The return of Mac OS-X installers

2013-10-31 Thread Michael Droettboom
Github seems to be having trouble updating the website at the moment.  
The direct links to the installer files are:


https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1-py2.7-python.org-macosx10.6.dmg

https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1-py3.3-python.org-macosx10.6.dmg

Mike


On 10/31/2013 04:18 PM, Michael Droettboom wrote:
Courtesy of Matthew Brett, we now have Mac OS X installers again. 
These are designed to work with the python.org distribution, and 
include all dependencies.


They are available here:

http://matplotlib.org/downloads

Please let us know how you fare!

Mike
--
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk


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



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.3 + xkcd + latex

2013-10-21 Thread Michael Droettboom

On 10/18/2013 12:58 PM, Paulo Meira wrote:

Hi, all,
It didn't work for me with mpl 1.3 but it does with 1.3.1 (openSuse 
12.3, python 2.7.3, 64-bit).


To install 1.3.1, I had to use the archive from SourceForge directly 
since only 1.3.0 is listed on pypi (I used pip) -- could that be the 
source of this issue for you?


That's my bad.  I've updated the PyPI entry.

Mike



Regards,
Paulo Meira
---
On Fri, Oct 18, 2013 at 11:51 AM, Neal Becker ndbeck...@gmail.com 
mailto:ndbeck...@gmail.com wrote:


I am using mpl 1.3, python 2.7.3, 64-bit linux (fedora 19)

Andrew Dawson wrote:

 For what it is worth I see behaviour identical to Neal. I'm using a
 development version of matplotlib (v1.4.x, sorry I don't know
the hash of
 the installed version) on 64-bit Linux (Ubuntu 12.04) and Python
2.7.3.
 That probably doesn't help much, except to show that this is not
specific
 to just Neal!

 Andrew


 On 18 October 2013 14:40, Michael Droettboom
 md...@stsci.edu mailto:md...@stsci.edu wrote:

 This is really puzzling.  What version of matplotlib are you
running,
 what platform, and what version of Python?  Your example works
just fine
 for me.

 Mike

 On 10/18/2013 08:40 AM, Neal Becker wrote:
  Neal Becker wrote:
 
  This example shows the error on my platform - the xlabel is not
 rendered with
  tex but instead the '$' are printed:
 
  import numpy as np
  import matplotlib.pyplot as plt
  plt.xkcd()
 
  fig = fig = plt.figure()
  ax = fig.add_subplot(111)
  plt.plot (np.arange (10), 2*np.arange(10))
  ax.set_xlabel ('$E_{s}/N_{0}$')
  plt.show()
 
 
  And without plt.xkcd() the tex is rendered correctly
 
 
 


--
  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=60135031iu=/4140/ostg.clktrk
  ___
  Matplotlib-users mailing list
  Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 --
 _
 |\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
 |  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

 http://www.droettboom.com





--
 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=60135031iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users








--
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=60135031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
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=60135031iu=/4140/ostg.clktrk


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



--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

Re: [Matplotlib-users] ANN: matplotlib 1.3.1

2013-10-21 Thread Michael Droettboom

On 10/18/2013 03:18 PM, Nelle Varoquaux wrote:

Hello,
Congratulations for this new minor release !
Someone mentionned on python-list that it's not available on pypi. I 
checked, and indeed it isn't.

Should we upload it there?
Thanks,
N


Sorry about that.  I just addressed that this morning.

Mike




On 10 October 2013 20:19, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


I'm pleased to announce the release of matplotlib version 1.3.1.  This is a 
bugfix release.

It may be downloaded from here, or installed through the package manager of 
your choice (when available):

http://matplotlib.org/downloads

The changelog is copied below:

New in 1.3.1


1.3.1 is a bugfix release, primarily dealing with improved setup and
handling of dependencies, and correcting and enhancing the
documentation.

The following changes were made in 1.3.1 since 1.3.0.

Enhancements


- Added a context manager for creating multi-page pdfs (see
`matplotlib.backends.backend_pdf.PdfPages`).

- The WebAgg backend should no have lower latency over heterogeneous
Internet connections.

Bug fixes
`

- Histogram plots now contain the endline.

- Fixes to the Molleweide projection.

- Handling recent fonts from Microsoft and Macintosh-style fonts with
non-ascii metadata is improved.

- Hatching of fill between plots now works correctly in the PDF
backend.

- Tight bounding box support now works in the PGF backend.

- Transparent figures now display correctly in the Qt4Agg backend.

- Drawing lines from one subplot to another now works.

- Unit handling on masked arrays has been improved.

Setup and dependencies
``

- Now works with any version of pyparsing 1.5.6 or later, without displaying
hundreds of warnings.

- Now works with 64-bit versions of Ghostscript on MS-Windows.

- When installing from source into an environment without Numpy, Numpy
will first be downloaded and built and then used to build
matplotlib.

- Externally installed backends are now always imported using a
fully-qualified path to the module.

- Works with newer version of wxPython.

- Can now build with a PyCXX installed globally on the system from source.

- Better detection of Gtk3 dependencies.

Testing
```

- Tests should now work in non-English locales.

- PEP8 conformance tests now report on locations of issues.

Mike

-- 
_

|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com



--
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=60134071iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users





--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
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=60135031iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.3 + xkcd + latex

2013-10-18 Thread Michael Droettboom
The built-in mathtext support does. (I can put xkcd() at the top of 
the mathtext_demo.py example and all is well).


It does not work when |text.usetex| is True (when using external TeX). 
But in that case, it should have thrown an exception:


|Traceback (most recent call last):
  File mathtext_demo.py, line 9, in module
xkcd()
  File 
/home/mdboom/python/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/pyplot.py,
 line 293, in xkcd
xkcd mode is not compatible with text.usetex = True)
RuntimeError: xkcd mode is not compatible with text.usetex = True|

Mike

On 10/18/2013 07:24 AM, Neal Becker wrote:


It appears that latex doesn't work with xkcd?

I put for example:
 self.ax.set_xlabel ('$E_s/N_0


)

Which go rendered with the '


  signs and not as latex

And my vertical axis was labeled as:

$\mathdefault{10^{3}}$ ...


--
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=60135031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
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=60135031iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.3 + xkcd + latex

2013-10-18 Thread Michael Droettboom
On 10/18/2013 08:20 AM, Neal Becker wrote:
 Michael Droettboom wrote:

 The built-in mathtext support does. (I can put xkcd() at the top of
 the mathtext_demo.py example and all is well).

 It does not work when |text.usetex| is True (when using external TeX).
 But in that case, it should have thrown an exception:

 |Traceback (most recent call last):
 File mathtext_demo.py, line 9, in module
   xkcd()
 File
 /home/mdboom/python/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-
 linux-x86_64.egg/matplotlib/pyplot.py,
 line 293, in xkcd
   xkcd mode is not compatible with text.usetex = True)
 RuntimeError: xkcd mode is not compatible with text.usetex = True|

 Mike

 On 10/18/2013 07:24 AM, Neal Becker wrote:

 It appears that latex doesn't work with xkcd?

 I put for example:
   self.ax.set_xlabel ('$E_s/N_0


 )

 Which go rendered with the '


signs and not as latex

 And my vertical axis was labeled as:

 $\mathdefault{10^{3}}$ ...


 Strange.  I don't have anything about usetex in the script, or in my
 .matplotlibrc - all it has is:

 backend : Qt4Agg
 mathtext.fontset: stix



Puzzling.  Do you have a matplotlibrc in the current working directory?

Mike

-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
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=60135031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.3 + xkcd + latex

2013-10-18 Thread Michael Droettboom
This is really puzzling.  What version of matplotlib are you running, 
what platform, and what version of Python?  Your example works just fine 
for me.

Mike

On 10/18/2013 08:40 AM, Neal Becker wrote:
 Neal Becker wrote:

 This example shows the error on my platform - the xlabel is not rendered with
 tex but instead the '$' are printed:

 import numpy as np
 import matplotlib.pyplot as plt
 plt.xkcd()

 fig = fig = plt.figure()
 ax = fig.add_subplot(111)
 plt.plot (np.arange (10), 2*np.arange(10))
 ax.set_xlabel ('$E_{s}/N_{0}$')
 plt.show()


 And without plt.xkcd() the tex is rendered correctly


 --
 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=60135031iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
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=60135031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory leak when using pyplot.ion() ?

2013-10-14 Thread Michael Droettboom
I haven't had a chance to look into where the memory is actually 
leaking, ion/ioff are intended for interactive use, and here you are 
saving a large number of plots to files.  Why do you need ion at all?


Mike

On 10/14/2013 08:51 AM, OCuanachain, Oisin (Oisin) wrote:


Hi,

I am having problems with a script. It runs a number of iterations and 
plots and saves a number of plots on each iteration. After the plots 
have been saved I issue the pyplot.close('all') command so despite 
many plots being created only 4 should be open at any given time which 
should not cause any memory problems. When I run the script however I 
see the RAM usage gradually growing without bound and eventually 
causing the script to crash. Interestingly I have found if I comment 
out the pyplot.ion()  and pyplot.ioff() the problem vanishes. So I do 
have a workaround but it would still be good to have this fixed in 
case I forget about it in future and loose another weekend's work.


My OS is Windows XP Service Pack 3

Python 2.6

Matplotlib 1.0.1

The code below is a stripped down version of my script which still 
exhibits the problem.


Oisín.

# -*- coding: utf-8 -*-

import sys

import time

import numpy as np

from matplotlib import pyplot

import os

  # Main script body

try:

  for gain in range(1,20,2):

  for PortToTest in range(8):

dirname = '.\crash'

f = open(dirname + '\\results.m','w')

runname = '\P' + str(PortToTest) + str(gain) + \

  '_' + time.strftime('d%dh%Hm%Ms%S')

dirname = dirname + runname

os.mkdir(dirname)

os.system('copy ' + sys.argv[0] + ' ' + dirname )

nIts = 50

# Decimate  data for plotting if many iterations are run

if(nIts10):

  echoPlotDec = 10

else:

  echoPlotDec = 1

ResidN   = np.zeros((4,2*nIts))

MaxSl= np.zeros((4,2*nIts))

MaxOld   = np.zeros((4,2*nIts))

MaxNew   = np.zeros((4,2*nIts))

EchoA= np.zeros((2*nIts,160))

for kk in range(2*nIts):

ResidN[0,kk] = np.random.rand(1,1)

ResidN[1,kk] = np.random.rand(1,1)

ResidN[2,kk] = np.random.rand(1,1)

ResidN[3,kk] = np.random.rand(1,1)

MaxSl[0,kk] = np.random.rand(1,1)

MaxSl[1,kk] = np.random.rand(1,1)

MaxSl[2,kk] = np.random.rand(1,1)

MaxSl[3,kk] = np.random.rand(1,1)

MaxOld[0,kk] = np.random.rand(1,1)

MaxOld[1,kk] = np.random.rand(1,1)

MaxOld[2,kk] = np.random.rand(1,1)

MaxOld[3,kk] = np.random.rand(1,1)

MaxNew[0,kk] = np.random.rand(1,1)

MaxNew[1,kk] = np.random.rand(1,1)

MaxNew[2,kk] = np.random.rand(1,1)

MaxNew[3,kk] = np.random.rand(1,1)

EchoA[kk,:] = np.random.rand(1,160)

f.close()

pyplot.ion()

pyplot.figure()

pyplot.hold(True)

LegendTexts = (A,B,C,D)

pyplot.title(R ( + runname +))

pyplot.xlabel(Index)

pyplot.ylabel(Noise (dB))

pyplot.grid(True)

pyplot.hold(True)

pyplot.plot(np.transpose(ResidN),'.-')

pyplot.legend(LegendTexts,loc=1)

pyplot.axis([0, 2*nIts, -33, -25])

pyplot.savefig(dirname + '\\results.emf',format='emf')

pyplot.figure()

pyplot.hold(True)

pyplot.title(Coefs)

pyplot.xlabel(Coef Index)

pyplot.ylabel(Coef Value)

pyplot.grid(True)

pyplot.hold(True)

pyplot.plot(np.transpose(EchoA[0:nIts-1:echoPlotDec,:]),'.-')

pyplot.plot(np.transpose(EchoA[nIts:2*nIts-1:echoPlotDec,:]),'*-')

pyplot.axis([0, 160, -0.5, 2])

pyplot.savefig(dirname + '\\CoefsA.emf',format='emf')

pyplot.figure()

pyplot.hold(True)

pyplot.title(MaxAbs, Old = '.', New = '*' )

pyplot.xlabel(Iteration)

pyplot.ylabel(o/p (LSBs))

pyplot.grid(True)

pyplot.hold(True)

pyplot.plot(np.transpose(MaxOld),'.-')

pyplot.plot(np.transpose(MaxNew),'*-')

pyplot.axis([0, 2*nIts, 32, 128])

pyplot.savefig(dirname + '\\MaxAbsA.emf',format='emf')

pyplot.figure()

pyplot.hold(True)

pyplot.title(MaxAbs)

pyplot.xlabel(Iteration)

pyplot.ylabel((LSBs))

pyplot.grid(True)

pyplot.hold(True)

pyplot.plot(np.transpose(MaxSl),'.-')

pyplot.axis([0, 2*nIts, 0, 64])

pyplot.savefig(dirname + '\\MaxAbsSl.emf',format='emf')

pyplot.close('all')

except RuntimeError, msg:

  print 'Exception occurred in main script body'

  print sys.stderr, msg

  raise

finally:

  print Test done

  # Display plots

  pyplot.ioff()



--
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 

Re: [Matplotlib-users] Matplotlib eating memory

2013-10-10 Thread Michael Droettboom
Can you provide a complete, standalone example that reproduces the 
problem. Otherwise all I can do is guess.

The usual culprit is forgetting to close figures after you're done with 
them.

Mike

On 10/10/2013 09:05 AM, Martin MOKREJŠ wrote:
 Hi,
rendering some of my charts takes almost 50GB of RAM. I believe below is a 
 stracktrace
 of one such situation when it already took 15GB. Would somebody comments on 
 what is
 matplotlib doing at the very moment? Why the recursion?

The charts had to have 262422 data points in a 2D scatter plot, each point 
 has assigned
 its own color. They are in batches so that there are 153 distinct colors but 
 nevertheless,
 I assigned to each data point a color value. There are 153 legend items also 
 (one color
 won't be used).

 ^CTraceback (most recent call last):
 ...
  _figure.savefig(filename, dpi=100)
File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1421, 
 in savefig
  self.canvas.print_figure(*args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, 
 line 2220, in print_figure
  **kwargs)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, line 
 505, in print_png
  FigureCanvasAgg.draw(self)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, line 
 451, in draw
  self.figure.draw(self.renderer)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54, 
 in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1034, 
 in draw
  func(*args)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54, 
 in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/axes.py, line 2086, 
 in draw
  a.draw(renderer)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54, 
 in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, line 
 718, in draw
  return Collection.draw(self, renderer)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 54, 
 in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, line 
 276, in draw
  offsets, transOffset, self.get_facecolor(), self.get_edgecolor(),
File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, line 
 551, in get_edgecolor
  return self._edgecolors
 KeyboardInterrupt
 ^CError in atexit._run_exitfuncs:
 Traceback (most recent call last):
File /usr/lib64/python2.7/atexit.py, line 24, in _run_exitfuncs
  func(*targs, **kargs)
File /usr/lib64/python2.7/site-packages/matplotlib/_pylab_helpers.py, 
 line 90, in destroy_all
  gc.collect()
 KeyboardInterrupt
 Error in sys.exitfunc:
 Traceback (most recent call last):
File /usr/lib64/python2.7/atexit.py, line 24, in _run_exitfuncs
  func(*targs, **kargs)
File /usr/lib64/python2.7/site-packages/matplotlib/_pylab_helpers.py, 
 line 90, in destroy_all
  gc.collect()
 KeyboardInterrupt

 ^C


 Clues what is the code doing? I use mpl-1.3.0.
 Thank you,
 Martin

 --
 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=60134071iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
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=60134071iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib eating memory

2013-10-10 Thread Michael Droettboom
On 10/10/2013 09:47 AM, Martin MOKREJŠ wrote:
 Benjamin Root wrote:


 On Thu, Oct 10, 2013 at 9:05 AM, Martin MOKREJŠ mmokr...@gmail.com 
 mailto:mmokr...@gmail.com wrote:

  Hi,
rendering some of my charts takes almost 50GB of RAM. I believe below 
 is a stracktrace
  of one such situation when it already took 15GB. Would somebody 
 comments on what is
  matplotlib doing at the very moment? Why the recursion?

The charts had to have 262422 data points in a 2D scatter plot, each 
 point has assigned
  its own color. They are in batches so that there are 153 distinct 
 colors but nevertheless,
  I assigned to each data point a color value. There are 153 legend items 
 also (one color
  won't be used).

  ^CTraceback (most recent call last):
  ...
  _figure.savefig(filename, dpi=100)
File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 
 1421, in savefig
  self.canvas.print_figure(*args, **kwargs)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, line 2220, 
 in print_figure
  **kwargs)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, 
 line 505, in print_png
  FigureCanvasAgg.draw(self)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_agg.py, 
 line 451, in draw
  self.figure.draw(self.renderer)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 
 54, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 
 1034, in draw
  func(*args)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 
 54, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/axes.py, line 
 2086, in draw
  a.draw(renderer)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 
 54, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, 
 line 718, in draw
  return Collection.draw(self, renderer)
File /usr/lib64/python2.7/site-packages/matplotlib/artist.py, line 
 54, in draw_wrapper
  draw(artist, renderer, *args, **kwargs)
File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, 
 line 276, in draw
  offsets, transOffset, self.get_facecolor(), self.get_edgecolor(),
File /usr/lib64/python2.7/site-packages/matplotlib/collections.py, 
 line 551, in get_edgecolor
  return self._edgecolors
  KeyboardInterrupt
  ^CError in atexit._run_exitfuncs:
  Traceback (most recent call last):
File /usr/lib64/python2.7/atexit.py, line 24, in _run_exitfuncs
  func(*targs, **kargs)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/_pylab_helpers.py, line 90, 
 in destroy_all
  gc.collect()
  KeyboardInterrupt
  Error in sys.exitfunc:
  Traceback (most recent call last):
File /usr/lib64/python2.7/atexit.py, line 24, in _run_exitfuncs
  func(*targs, **kargs)
File 
 /usr/lib64/python2.7/site-packages/matplotlib/_pylab_helpers.py, line 90, 
 in destroy_all
  gc.collect()
  KeyboardInterrupt

  ^C


  Clues what is the code doing? I use mpl-1.3.0.
  Thank you,
  Martin


 Unfortunately, that stacktrace isn't very useful. There is no recursion 
 there, but rather the perfectly normal drawing of the figure object that has 
 a child axes, which has child collections which have child artist objects.

 Without the accompanying code, it would be difficult to determine where the 
 memory hog is.
 Could there be places where gc.collect() could be introduced? Are there 
 places where matplotlib
 could del() unnecessary objects right away? I think the problem is with huge 
 lists or pythonic
 dicts. I could save 10GB of RAM when I converted one python dict to a bsddb3 
 file having just
 10MB on disk. I speculate matplotlib in that code keeps the data in some huge 
 list or more likely
 a dict and that is the same issue.

 Are you sure you cannot see where a problem is? It happens (is visible) only 
 with huge number of
 dots, of course.

Matplotlib generally keeps data in Numpy arrays, not lists or 
dictionaries (though given that matplotlib predates Numpy, there are 
some corner cases we've found recently where arrays are converted to 
lists and back unintentionally).

As Ben said, the traceback looks quite normal -- and it doesn't show 
what any of the values are.  If you can provide us with a script that 
reproduces this, that's the only way we can really plug in and see what 
might be going wrong.  It doesn't have to have anything proprietary, 
such as your data.  You can even start with one of the existing 
examples, if that helps.

Mike

 _
 |\/|o 

Re: [Matplotlib-users] Matplotlib eating memory

2013-10-10 Thread Michael Droettboom

Thanks.  This is much more helpful.

What we need, however, is a self contained, standalone example. The 
code below calls functions that are not present.  See http://sscce.org/ 
for why this is so important.  Again, I would have to guess what those 
functions do -- it may be relevant, it may not.  If I have something 
that I can *just run* then I can use various introspection tools to see 
what is going wrong.


Mike

On 10/10/2013 10:12 AM, Martin MOKREJŠ wrote:

Michael Droettboom wrote:

Can you provide a complete, standalone example that reproduces the
problem. Otherwise all I can do is guess.

The usual culprit is forgetting to close figures after you're done with
them.

Thanks, I learned that through matplotlib-1.3.0 give spit over me a warning 
message some weeks
ago. Yes, i do call _figure.clear() and pylab.clf()  but only after the 
savefig() returns, which
is not the case here. Also use gc.collect() a lot through the code, especially 
before and after
I draw every figure. That is not enough here.





from itertools import izip, imap, ifilter
import pylab
import matplotlib
# Force matplotlib not to use any X-windows backend.
matplotlib.use('Agg')
import pylab

F = pylab.gcf()

# convert the view of numpy array to tuple
# 
http://matplotlib.1069221.n5.nabble.com/RendererAgg-int-width-int-height-dpi-debug-False-ValueError-width-and-height-must-each-be-below-32768-td27756.html
DefaultSize = tuple(F.get_size_inches())



def draw_hist2d_plot(filename, mydata_x, mydata_y, colors, title_data, 
xlabel_data, ylabel_data, legends, legend_loc='upper right', 
legend_bbox_to_anchor=(1.0, 1.0), legend_ncol=None, xmin=None, xmax=None, 
ymin=None, ymax=None, fontsize=10, legend_fontsize=8, dpi=100, 
tight_layout=False, legend_inside=False, objsize=0.1):
 # hist2d(x, y, bins = None, range=None, weights=None, cmin=None, cmax=None 
**kwargs)

 if len(mydata_x) != len(mydata_y):
 raise ValueError, %s: len(mydata_x) != len(mydata_y): %s != %s % 
(filename, len(mydata_x), len(mydata_y))

 if colors and len(mydata_x) != len(colors):
 sys.stderr.write(Warning: draw_hist2d_plot(): %s: len(mydata_x) != 
len(colors): %s != %s.\n % (filename, len(mydata_x), len(colors)))

 if colors and legends and len(colors) != len(legends):
 sys.stderr.write(Warning: draw_hist2d_plot(): %s, len(colors) != 
len(legends): %s != %s.\n % (filename, len(colors), len(legends)))

 if mydata_x and mydata_y and filename:
 if legends:
 if not legend_ncol:
 _subfigs, _ax1_num, _ax2_num, _legend_ncol = get_ncol(legends, 
fontsize=legend_fontsize)
 else:
 _subfigs, _ax1_num, _ax2_num, _legend_ncol = 3, 213, 313, 
legend_ncol
 else:
 _subfigs, _ax1_num, _legend_ncol = 3, 313, 0

 set_my_pylab_defaults()
 pylab.clf()
 _figure = pylab.figure()
 _figure.clear()
 _figure.set_tight_layout(True)
 gc.collect()

 if legends:
 # do not crash on too tall figures
 if 8.4 * _subfigs  200:
 _figure.set_size_inches(11.2, 8.4 * (_subfigs + 1))
 else:
 # _figure.set_size_inches() silently accepts a large value but 
later on _figure.savefig() crashes with:
 # ValueError: width and height must each be below 32768
 _figure.set_size_inches(11.2, 200)
 sys.stderr.write(Warning: draw_hist2d_plot(): Wanted to set %s 
figure height to %s but is too high, forcing %s instead. You will likely get an 
incomplete image.\n % (filename, 8.4 * _subfigs, 200))
 if myoptions.debug  5: print Debug: draw_hist2d_plot(): Changed %s 
figure size to: %s % (filename, str(_figure.get_size_inches()))
 _ax1 = _figure.add_subplot(_ax1_num)
 _ax2 = _figure.add_subplot(_ax2_num)
 else:
 _figure.set_size_inches(11.2, 8.4 * 2)
 _ax1 = _figure.gca()
 if myoptions.debug  5: print Debug: draw_hist2d_plot(): Changed %s figure 
size to: %s % (filename, str(_figure.get_size_inches()))

 _series = []
 #for _x, _y, _c, _l in izip(mydata_x, mydata_y, colors, legends):
 for _x, _y, _c in izip(mydata_x, mydata_y, colors):
 # _Line2D = _ax1.plot(_x, _y) # returns Line2D object
 _my_PathCollection = _ax1.scatter(_x, _y, color=_c, s=objsize) # , 
label=_l) # returns PathCollection object
 _series.append(_my_PathCollection)

 if legends:
 #for _x, _y, _c, _l in izip(mydata_x, mydata_y, colors, legends):
 for _x, _y, _c in izip(mydata_x, mydata_y, colors):
 _my_PathCollection = _ax1.scatter(_x, _y, color=_c, s=objsize) 
# , label=_l)
 _series.append(_my_PathCollection)

 _ax2.legend(_series, legends, loc='upper left', 
bbox_to_anchor=(0,0,1,1), borderaxespad=0., ncol=_legend_ncol, mode='expand', 
fontsize

[Matplotlib-users] ANN: matplotlib 1.3.1

2013-10-10 Thread Michael Droettboom

I'm pleased to announce the release of matplotlib version 1.3.1.  This is a 
bugfix release.

It may be downloaded from here, or installed through the package manager of 
your choice (when available):

http://matplotlib.org/downloads

The changelog is copied below:

New in 1.3.1


1.3.1 is a bugfix release, primarily dealing with improved setup and
handling of dependencies, and correcting and enhancing the
documentation.

The following changes were made in 1.3.1 since 1.3.0.

Enhancements


- Added a context manager for creating multi-page pdfs (see
   `matplotlib.backends.backend_pdf.PdfPages`).

- The WebAgg backend should no have lower latency over heterogeneous
   Internet connections.

Bug fixes
`

- Histogram plots now contain the endline.

- Fixes to the Molleweide projection.

- Handling recent fonts from Microsoft and Macintosh-style fonts with
   non-ascii metadata is improved.

- Hatching of fill between plots now works correctly in the PDF
   backend.

- Tight bounding box support now works in the PGF backend.

- Transparent figures now display correctly in the Qt4Agg backend.

- Drawing lines from one subplot to another now works.

- Unit handling on masked arrays has been improved.

Setup and dependencies
``

- Now works with any version of pyparsing 1.5.6 or later, without displaying
   hundreds of warnings.

- Now works with 64-bit versions of Ghostscript on MS-Windows.

- When installing from source into an environment without Numpy, Numpy
   will first be downloaded and built and then used to build
   matplotlib.

- Externally installed backends are now always imported using a
   fully-qualified path to the module.

- Works with newer version of wxPython.

- Can now build with a PyCXX installed globally on the system from source.

- Better detection of Gtk3 dependencies.

Testing
```

- Tests should now work in non-English locales.

- PEP8 conformance tests now report on locations of issues.

Mike

--
   _
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com

--
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=60134071iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib installation with Python(x,y)

2013-10-02 Thread Michael Droettboom
On 10/02/2013 05:35 AM, ajdcds wrote:
 I have a system that has Python(x,y)-2.6.6.2.exe installed.
 When running the script file.py the following error occurs:

 /Traceback (most recent call last):
   File file.py, line xx, in module
 import something
   File includes\something.py, line 31, in module
 import matplotlib.pyplot as plt
   File C:\Python26\lib\site-packages\matplotlib\pyplot.py, line 95, in
 module
 new_figure_manager, draw_if_interactive, show = pylab_setup()
   File C:\Python26\lib\site-packages\matplotlib\backends\__init__.py, line
 25, in pylab_setup
 globals(),locals(),[backend_name])
   File C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py,
 line 12, in module
 from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
   File C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py,
 line 18, in module
 import matplotlib.backends.qt4_editor.figureoptions as figureoptions
   File
 C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py,
 line 11, in module
 import matplotlib.backends.qt4_editor.formlayout as formlayout
   File
 C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
 line 51, in module
 raise ImportError, Warning: formlayout requires PyQt4 v4.3
 ImportError: Warning: formlayout requires PyQt4 v4.3 /

 I think this error message is not related with the real problem, since this
 is just an hardcoded string that is displayed in case the import fails
 (formlayout.py):
 /try:
  from PyQt4.QtGui import QFormLayout
 except ImportError:
  raise ImportError, Warning: formlayout requires PyQt4 v4.3/

 If I remove this error message the new error message is that he cannot find
 the DLL.

Can you copy-and-paste the exact error message?  That will offer some clues.

Mike

-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
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=60134791iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib installation with Python(x,y)

2013-10-02 Thread Michael Droettboom
It looks like the PyQt4 installation in python(x,y) is somehow broken.  
If you just open up the python(x, y) interpreter and type

 from PyQt4.QtGui import QFormLayout


or

 from PyQt4 import QtGui


what happens?  If that fails too, I'd say the bug is in python(x, y) (or 
however PyQt4 got installled there).

Mike

On 10/02/2013 09:19 AM, ajdcds wrote:
 Hi Mike,

 thank you for your interest.

 If I replace the following statement on formlayout.py:

 /try:
  from PyQt4.QtGui import QFormLayout
 except ImportError:
  raise ImportError, Warning: formlayout requires PyQt4 v4.3/
   
 With this one:

 /from PyQt4.QtGui import QFormLayout/

 Then the error is the following:

 /Traceback (most recent call last):
File file.py, line 83, in module
  import something
File includes\something.py, line 31, in module
  import matplotlib.pyplot as plt
File C:\Python26\lib\site-packages\matplotlib\pyplot.py, line 95, in
 module
  new_figure_manager, draw_if_interactive, show = pylab_setup()
File C:\Python26\lib\site-packages\matplotlib\backends\__init__.py, line
 25, in pylab_setup
  globals(),locals(),[backend_name])
File
 C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4agg.py, line
 12, in module
  from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
File C:\Python26\lib\site-packages\matplotlib\backends\backend_qt4.py,
 line 18, in module
  import matplotlib.backends.qt4_editor.figureoptions as figureoptions
File
 C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\figureoptions.py,
 line 11, in module
  import matplotlib.backends.qt4_editor.formlayout as formlayout
File
 C:\Python26\lib\site-packages\matplotlib\backends\qt4_editor\formlayout.py,
 line 53, in module
  from PyQt4.QtGui import QFormLayout
 ImportError: DLL load failed: The specified procedure could not be found./



 --
 View this message in context: 
 http://matplotlib.1069221.n5.nabble.com/Matplotlib-installation-with-Python-x-y-tp42149p42152.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.

 --
 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=60134791iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
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=60134791iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] change the EPS font type ... afterwards!

2013-09-24 Thread Michael Droettboom
You could try ps2ps (which comes with ghostscript) or similar tools.

Mike

On 09/23/2013 06:13 PM, Grigoris Maravelias wrote:
 Hello to all!

 I have been using Matplotlib to create a series of plots and now the
 time to submit the paper has come! But I experience problems now with
 the font types of the eps images. The Type-3 fonts are not supported,
 and they accept only Type-1. Is there an easy way to do this ?(and of
 course not go through the reprocessing of all data to produce again the
 same plots).

 best
 Grigoris

 --
 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=60133471iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
_
|\/|o _|_  _. _ | | \.__  __|__|_|_  _  _ ._ _
|  ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |

http://www.droettboom.com


--
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=60133471iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Performance issue when drawing a dotted Rectangle patch then zooming

2013-09-04 Thread Michael Droettboom
On 09/04/2013 12:47 PM, Sylvain LÉVÊQUE wrote:
 Hello

 I have a performance issue when using a Rectangle patch with linestyle
 'dotted'. Here is some code showing it:


 from matplotlib import gridspec

 gs = gridspec.GridSpec(1, 2)
 ax1 = plt.subplot(gs[0, 0])
 ax2 = plt.subplot(gs[0, 1])

 data = [0, 1]

 r1 = Rectangle([10, 0.25], 10, 0.5, facecolor='None',
 edgecolor='red')
 r2 = Rectangle([10, 0.25], 10, 0.5, facecolor='None',
 edgecolor='red', linestyle='dotted')

 ax1.add_patch(r1)
 ax2.add_patch(r2)

 ax1.plot(data)
 ax2.plot(data)


 The steps to reproduce:
 - %paste the code in pylab
 - select the zoom tool
 - zoom on the left plot to the left of the figure until you see the data
 within the [0, 1] range, and zoom some more (no performance issue)
 - zoom on the right plot to the left of the figure until you see the
 data within the [0, 1] range, the more you try zooming, the longer it
 takes to render
 - try zooming on the left plot again, performance is now poor

 So I understand I have three performance issues:
 - behaviour is different depending on linestyle

Agg uses trapezoid rendering.  To render a regular solid rectangle the 
trapezoid renderer only needs to manage 8 points.  For a dotted line, 
it's (at least) 4 points per dot, and the number of dots goes into the 
thousands.  These each must be stored in memory and repeatedly sorted as 
the shape is rendered.

 - performance issue on second plot impacts first plot

That's not surprising.  Each frame is drawn in full.


 - data outside of the view limits are taken into account for the
 rendering (performance hit even if Rectangle starts from x=10 but xlim
 was reduced by zooming to eg [0, 1])

Yes.  Generally, it is much faster to just let the renderer perform 
culling outside the bounds than to do it upfront, so that's why it's 
done that way.  However, the case of dotted lines on a solid object is a 
degenerate case.  You could try drawing each side of the rectangle as a 
separate line -- this would bring the line clipping algorithm into 
effect.  (matplotlib has a line-clipping algorithm, but it does not have 
a solid polygon clipping algorithm).

Mike


 I initially observed the problem in a wx application using WxAgg, I can
 reproduce it in pylab with TkAgg, on two separate computers.

 I've tracked this down to an increasingly slow call in backend_agg.py
 (l.145, self._renderer.draw_path(gc, path, transform, rgbFace) in
 matplotlib 1.3.0). It then goes to native code, I stopped there.

 Python 2.7.5, matplotlib 1.3.0 (also observed on 1.2.1).

 (I have another issue if commenting out the two last lines and
 %paste-ing it to pylab, I then get an OverflowError, I don't know if
 this is related)

 Thanks for your help


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib installation issues

2013-09-03 Thread Michael Droettboom
On 08/31/2013 12:24 PM, Goyo wrote:
 2013/8/31 Dino Bektešević ljet...@gmail.com:
 Hello,

 After a little mishap from ubuntu 12.04 after which I reinstalled the
 OS, on this fresh install I did:

 sudo apt-get install python-numpy python-scipy python-matplotlib ipython 
 ipython-notebook python-pandas python-sympy python-nose
 as per scipy stack installation instructions and
 everything went more or less as it should have no errors reported
 during installation that I saw. Keep in mind the entire install like
 this had ~500MB or so and I wasn't always paying attention.
 I ran python, and did numpy.test(), returned:
 Ran 3161 tests in 50.667s
 OK (KNOWNFAIL=3, SKIP=4)
 nose.result.TextTestResult run=3161 errors=0 failures=0
 did scipy.test(), returned:
 Ran 3780 tests in 74.809s
 FAILED (KNOWNFAIL=11, SKIP=13, failures=2)
 nose.result.TextTestResult run=3780 errors=0 failures=2
 I send a mail to scipy mailing list couple of days ago, but still no answer,
 if someone knows how bad those 2 failures are please share and then
 did matplotlib.test() which was disasterous:
 Ran 1065 tests in 284.956s
 FAILED (KNOWNFAIL=267, errors=772)
 With mpl 1.3.0 (packaged for Raring by Thomas Kluyver):

 Ran 1465 tests in 402.499s
 FAILED (KNOWNFAIL=1, SKIP=5, errors=1331)

 But matplotlib itself is working pretty well. The output is full with
 error messages like:

 IOError: Baseline image
 '/home/goyo/result_images/test_triangulation/tripcolor1-expected.svg'
 does not exist.

 It maybe that distro packages do not ship with baseline images. Looks
 sensible to me since there must be an awful lot of them and most users
 do not need them.

That's correct.  We could probably do a better job reporting that to the 
user, though.  Would you mind creating an issue for that?

Mike

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Build failure

2013-08-30 Thread Michael Droettboom
It looks like a version mismatch with PyCXX.  Was it recently updated or 
changed?  What version of PyCXX do you have?  What was the last version 
of matplotlib that worked for you?


You can force matplotlib to use its local copy of PyCXX by uninstalling 
PyCXX, or adding the following lines to the top of PyCXX::check in 
setupext.py:


self.__class__.found_external = False
return Couldn't import.  Using local copy.

(But really, we should update setupext so users can specify the local 
override in setup.cfg).


Mike

On 08/30/2013 12:35 PM, Nils Wagner wrote:

Hi all,

I cannot build the latest matplotlib from git. The build log is attached.

Nils



--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk


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


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Build failure

2013-08-30 Thread Michael Droettboom

I wonder if it's commit 6b827cbf.

Can you do:

   git checkout 6b827cbf
   python setup.py build
   # confirm it fails

   git checkout 6b827cbf^
   python setup.py build
   # Does this work?

Mike

On 08/30/2013 01:06 PM, Nils Wagner wrote:

Hi Michael,

Thank you for your note.
If I remember correctly I was able to build matplotlib a week ago.
I am using opensuse12.3

Nils

rpm -qi python-cxx
Name: python-cxx
Version : 6.2.3
Release : 2.2
Architecture: noarch
Install Date: Sa 27 Jul 2013 15:48:45 CEST
Group   : Development/Languages/Python
Size: 9783
License : GPL
Signature   : RSA/SHA1, Mo 22 Jul 2013 20:26:22 CEST, Key ID 
45a1d0671abd1afb

Source RPM  : python-cxx-6.2.3-2.2.src.rpm
Build Date  : Mo 22 Jul 2013 15:27:08 CEST
Build Host  : swkj07
Relocations : (not relocatable)
Packager: pack...@links2linux.de mailto:pack...@links2linux.de
Vendor  : http://packman.links2linux.de
URL : http://CXX.sourceforge.net/
Summary : Write Python extensions in C++
Description :
PyCXX is a set of classes to help create extensions of Python in the C
language. The first part encapsulates the Python C API taking care of
exceptions and ref counting. The second part supports the building of 
Python

extension modules in C++.
Distribution: Extra / openSUSE_12.3



On Fri, Aug 30, 2013 at 6:46 PM, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


It looks like a version mismatch with PyCXX.  Was it recently
updated or changed?  What version of PyCXX do you have?  What was
the last version of matplotlib that worked for you?

You can force matplotlib to use its local copy of PyCXX by
uninstalling PyCXX, or adding the following lines to the top of
PyCXX::check in setupext.py:

self.__class__.found_external = False
return Couldn't import.  Using local copy.

(But really, we should update setupext so users can specify the
local override in setup.cfg).

Mike


On 08/30/2013 12:35 PM, Nils Wagner wrote:

Hi all,

I cannot build the latest matplotlib from git. The build log is
attached.

Nils




--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk


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




--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft
technologies
and advance your career. Get an incredible 1,500+ hours of
step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] I have a Mac!

2013-08-30 Thread Michael Droettboom
BTW: I've got uploading of test results to S3 working on the main 
matplotlib repository.  It would be cool to do that here, too, but I 
believe the encrypted keys are specific to the github repo.  We can 
coordinate off-line once the repo is transferred about how to do this.


Mike

On 08/29/2013 01:01 PM, Matt Terry wrote:


(Replying to the list, rather than just George)
On Aug 29, 2013 8:18 AM, Matt Terry matt.te...@gmail.com 
mailto:matt.te...@gmail.com wrote:


 I have 15/17 variants working.  each pulling binaries/source from 
some combination of macports/brew/python.org/pip 
http://python.org/pip on python 2.6, 2.7, 3.2, and 3.3.


 https://travis-ci.org/mrterry/mpl_on_travis_mac/builds/10733852

 I need to add python27 and python33 variants that install XQuartz.  
Other than that, are there any builds that should be added?  For 
reference,


 python.org http://python.org 27 / pip numpy
 python.org http://python.org 27 / numpy dmg
 python.org http://python.org 33 / pip numpy (no official python3 
numpy installer)

 (all built with static versions of libpng/freetype)

 system python + brew dependencies
 system python + brew dependencies*

 brew python27
 brew python27*

 brew python33
 brew python33*

 macports py26
 macports py27
 macports py32
 macports py33
 macports py26*
 macports py27*
 macports py32*
 macports py33*

 * = virtual envs. python  c dependencies installed from package 
manager; macports, numpy from macports. --with-site-packages



 I'm having a strange installation issue involving dateutil on python 
3.3 (only).  It is a bytes vs unicode (fight!) that manifests on 
installation.  I can't reproduce the issue on my machine, but it may 
have something to do with dateutil v2.1. Anyone seen something like 
this?  installing dateutil via macports cleans up the issue (it 
installs 2.0, i think).


 -matt




 On Thu, Aug 29, 2013 at 4:47 AM, George Nurser gnur...@gmail.com 
mailto:gnur...@gmail.com wrote:


 It might be useful to see how macports does it -- their builds have 
always worked for me.


 George Nurser.


 On 23 August 2013 18:53, Chris Barker - NOAA Federal 
chris.bar...@noaa.gov mailto:chris.bar...@noaa.gov wrote:


 On Fri, Aug 23, 2013 at 8:14 AM, Matt Terry matt.te...@gmail.com 
mailto:matt.te...@gmail.com wrote:
  I'm banging away at installing MPL on top of python.org 
http://python.org's python.


 This is why binary installers are good idea!

  the libfreetype/freetype issue.

 yeah, that's kind of uglyand where is doesn't just work for 
me...


  1) install libpng[1] and freetype[2] from source

 libpng and freetype are different, though install from source may be
 the way to go:

 libpng is there, but is not properly installed, I'm not sure it's got
 the header for the same version as the lib, and libpng-config is
 either not there or not for the right version or somethign ugly. It
 look, form messages at build time, that someone has hacked some code
 into the MPL build that figures all that out, but for other stuff I'm
 doing, I just punt and build libpng -- that's pretty straighforward,
 at least. But teh solution in the MPL code now seems to work.

  2) install XQuartz[3] and twiddle /opt/X11, /usr/X11 (per Russell's
  directions[4]) so MPL finds XQuartz's libpng/freetype

 I _think_ that OS-X now ships with X11, which has freetype (though
 installed weirdly once again...) we certainly should NOT expect people
 to install anything big to build MPL, and binaries should not depend
 on anything not shipped by Apple by default.

 According to Russell, you do need to install something, so I think 
that's out.


  4) create the MPL binary installer and use that

 That's what most people should do -- but one of us needs to build it.

  Option 1 seems simple-est, but installing freetype requires more 
than

  ./configure  make  sudo make install.

 darn. But hopefully we can figure it out.

  Option 4: This would require some input from whoever (Gohlke?, 
Owen?) makes

  the binary installers.

 I think Russell has been doing it for MPL lately.

 My thoughts:

 We want to support two user-bases:

 1) folks that don't mind a little command line work, and probably need
 other scientific libs, etc anyway, an want an MPL that runs on their
 machine:
- these folks should use homebrew or macports to build the
 dependencies (or even hand-compile them). Ideally we have setup.py
 that will find those libs, and test to see that the builds work once
 in a while.

 2) folks that just want to use it and/or want a binary they can
 re-distribute via py2app, etc.
   - for these folks, we need to provide binaries. These binaries 
should:
1) Match the python.org http://python.org python builds. 
(probably only the Intel ones now...)

2) statically link the non-sytem libs

 This has been done for a while, off and on, most recently by 
Russell, AFAIK.


 But this is not a problem unique to MPL. All sorts of python packages
 need this, and only some of the package 

Re: [Matplotlib-users] [matplotlib-devel] I have a Mac!

2013-08-30 Thread Michael Droettboom

Very impressive!  This is really great.

That does sure look like a dateutil bug.  Maybe we try reporting it over 
there?


As for transferring the repository...  I've added you as a developer in 
the matplotlib organization, so you can work over there.  And it looks 
like you are the only one who can do the transfer, see here: 
https://help.github.com/articles/how-to-transfer-a-repository


I'll ping Travis again about how multi-OS testing might work, because it 
would be *absolutely killer* to get this going on matplotlib PRs.


Mike

On 08/29/2013 01:01 PM, Matt Terry wrote:


(Replying to the list, rather than just George)
On Aug 29, 2013 8:18 AM, Matt Terry matt.te...@gmail.com 
mailto:matt.te...@gmail.com wrote:


 I have 15/17 variants working.  each pulling binaries/source from 
some combination of macports/brew/python.org/pip 
http://python.org/pip on python 2.6, 2.7, 3.2, and 3.3.


 https://travis-ci.org/mrterry/mpl_on_travis_mac/builds/10733852

 I need to add python27 and python33 variants that install XQuartz.  
Other than that, are there any builds that should be added?  For 
reference,


 python.org http://python.org 27 / pip numpy
 python.org http://python.org 27 / numpy dmg
 python.org http://python.org 33 / pip numpy (no official python3 
numpy installer)

 (all built with static versions of libpng/freetype)

 system python + brew dependencies
 system python + brew dependencies*

 brew python27
 brew python27*

 brew python33
 brew python33*

 macports py26
 macports py27
 macports py32
 macports py33
 macports py26*
 macports py27*
 macports py32*
 macports py33*

 * = virtual envs. python  c dependencies installed from package 
manager; macports, numpy from macports. --with-site-packages



 I'm having a strange installation issue involving dateutil on python 
3.3 (only).  It is a bytes vs unicode (fight!) that manifests on 
installation.  I can't reproduce the issue on my machine, but it may 
have something to do with dateutil v2.1. Anyone seen something like 
this?  installing dateutil via macports cleans up the issue (it 
installs 2.0, i think).


 -matt




 On Thu, Aug 29, 2013 at 4:47 AM, George Nurser gnur...@gmail.com 
mailto:gnur...@gmail.com wrote:


 It might be useful to see how macports does it -- their builds have 
always worked for me.


 George Nurser.


 On 23 August 2013 18:53, Chris Barker - NOAA Federal 
chris.bar...@noaa.gov mailto:chris.bar...@noaa.gov wrote:


 On Fri, Aug 23, 2013 at 8:14 AM, Matt Terry matt.te...@gmail.com 
mailto:matt.te...@gmail.com wrote:
  I'm banging away at installing MPL on top of python.org 
http://python.org's python.


 This is why binary installers are good idea!

  the libfreetype/freetype issue.

 yeah, that's kind of uglyand where is doesn't just work for 
me...


  1) install libpng[1] and freetype[2] from source

 libpng and freetype are different, though install from source may be
 the way to go:

 libpng is there, but is not properly installed, I'm not sure it's got
 the header for the same version as the lib, and libpng-config is
 either not there or not for the right version or somethign ugly. It
 look, form messages at build time, that someone has hacked some code
 into the MPL build that figures all that out, but for other stuff I'm
 doing, I just punt and build libpng -- that's pretty straighforward,
 at least. But teh solution in the MPL code now seems to work.

  2) install XQuartz[3] and twiddle /opt/X11, /usr/X11 (per Russell's
  directions[4]) so MPL finds XQuartz's libpng/freetype

 I _think_ that OS-X now ships with X11, which has freetype (though
 installed weirdly once again...) we certainly should NOT expect people
 to install anything big to build MPL, and binaries should not depend
 on anything not shipped by Apple by default.

 According to Russell, you do need to install something, so I think 
that's out.


  4) create the MPL binary installer and use that

 That's what most people should do -- but one of us needs to build it.

  Option 1 seems simple-est, but installing freetype requires more 
than

  ./configure  make  sudo make install.

 darn. But hopefully we can figure it out.

  Option 4: This would require some input from whoever (Gohlke?, 
Owen?) makes

  the binary installers.

 I think Russell has been doing it for MPL lately.

 My thoughts:

 We want to support two user-bases:

 1) folks that don't mind a little command line work, and probably need
 other scientific libs, etc anyway, an want an MPL that runs on their
 machine:
- these folks should use homebrew or macports to build the
 dependencies (or even hand-compile them). Ideally we have setup.py
 that will find those libs, and test to see that the builds work once
 in a while.

 2) folks that just want to use it and/or want a binary they can
 re-distribute via py2app, etc.
   - for these folks, we need to provide binaries. These binaries 
should:
1) Match the python.org http://python.org python builds. 
(probably only the 

Re: [Matplotlib-users] plotting large images

2013-08-27 Thread Michael Droettboom

On 08/27/2013 09:49 AM, Chris Beaumont wrote:
I've been burned by this before as well. MPL stores some intermediate 
data products (for example, scaled RGB copies) at full resolution, 
even though the final rendered image is downsampled depending on 
screen resolution.


I've used some hacky tricks to get around this, which mostly involve 
downsampling the image on the fly based on screen resolution. One such 
effort is at https://github.com/ChrisBeaumont/mpl-modest-image.


It looks like this wouldn't be too hard to include in matplotlib.  I 
don't think we'd want to change the current behavior, because sometimes 
its tradeoff curve makes sense, but in other cases, the modest image 
approach also makes sense.  It's just a matter of coming up with an API 
to switch between the two behaviors.  Pull request?


Cheers,
Mike



If you are loading your arrays from disk, you can also use 
memory-mapped arrays -- this prevents you from loading all the data 
into RAM, and further cuts down on the footprint.


cheers,
chris


On Tue, Aug 27, 2013 at 6:49 AM, S(te(pán Turek 
stepan.tu...@seznam.cz mailto:stepan.tu...@seznam.cz wrote:



You could look at whether or not you actually need 64-bit
precision. Often times, 8-bit precision per color channel is
justifiable, even in grayscale. My advice is to play with the
dtype of your array or, as you mentioned, resample.


thanks, this helped me significantly,  uint8 precision is enough.

Also, is it needed to keep all images? It sounds to me like
your application will become very resource hungry if you're
going to be displaying several of these 2D images over each
other (and if you don't use transparency, you won't get any
benefit at all from plotting them together).


Yes, I need them all .

To avoid it I am thinking about merging them into one image and
then plot it.


Stepan



--
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance
Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511iu=/4140/ostg.clktrk


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


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] I have a Mac!

2013-08-16 Thread Michael Droettboom
Thanks to the gracious donation from Hans Petter Langtangen and the 
Center for Biomedical Computing at Simula (http://home.simula.no/~hpl), 
I now have a new Mac Mini sitting at my desk.  This should allow me to 
keep on top of changes that affect the Mac builds and to better track 
down Mac-only issues.

Stay tuned over the next few weeks and months as we will most likely be 
using some more of these funds to pay for hosted continuous integration 
services (as discussed yesterday in our MEP19 Google Hangout).

Cheers,
Mike



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] I have a Mac!

2013-08-16 Thread Michael Droettboom
We actually discussed this very issue yesterday in our Google hangout 
about continuous integration. We're probably going to need to script a 
full setup from a clean Mac + XCode to a working matplotlib development 
environment in order to make that happen, and obviously that will be 
shared with the world.  Things are even more complex on Windows, and I'd 
like to do that there, too.  So stay tuned.


Mike

On 08/16/2013 10:02 AM, Paul Hobson wrote:

Mike,

That's great news. Is there any chance we can look forward to 
official instructions for setting up a Mac to develop matplotlib?


I gave up a long time ago and started piecing to together my meager 
PRs in a linux VM.

-paul


On Fri, Aug 16, 2013 at 6:52 AM, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


Thanks to the gracious donation from Hans Petter Langtangen and the
Center for Biomedical Computing at Simula
(http://home.simula.no/~hpl http://home.simula.no/%7Ehpl),
I now have a new Mac Mini sitting at my desk.  This should allow me to
keep on top of changes that affect the Mac builds and to better track
down Mac-only issues.

Stay tuned over the next few weeks and months as we will most
likely be
using some more of these funds to pay for hosted continuous
integration
services (as discussed yesterday in our MEP19 Google Hangout).

Cheers,
Mike




--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
matplotlib-de...@lists.sourceforge.net
mailto:matplotlib-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel




--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] I have a Mac!

2013-08-16 Thread Michael Droettboom
I've been in touch with the Travis-CI guys about this a little bit.  
They restrict each project to a single OS partly to reduce resource 
consumption, but they said they might reconsider for paying customers 
(which we may want to become).


Mike

On 08/16/2013 04:17 PM, Matt Terry wrote:


I was looking into the TravisCI Mac testing environment. Right now, 
you can only run tests on a single os. You also trigger a Mac build by 
declaring your language to be objective-c. There are probably more q 
quirks, but that's what I've found thus far.


-matt

On Aug 16, 2013 12:45 PM, Matthew Brett matthew.br...@gmail.com 
mailto:matthew.br...@gmail.com wrote:


Hi,

On Fri, Aug 16, 2013 at 10:36 AM, Kevin Hunter Kesling
kmhun...@ncsu.edu mailto:kmhun...@ncsu.edu wrote:
 At 12:11pm -0400 Fri, 16 Aug 2013, Matthew Brett wrote:

 We've got 5 macs running OSX 10.4 through 10.8 for us, you'd be
 welcome to remote access to those, and we'd be happy to run builds
 for you. Paul Ivanov has or will have access to the buildbot master
 and all the slaves. We also have an XP and Windows 7 64 bit machine
 you are welcome to use.


 Bless you for supporting OS X prior to 10.6!  My family still
has a quite
 functional OS X 10.5 machine that we should update but can't for
various
 (less than stellar, but unfortunately real) reasons.  I'm
chagrined that
 Apple et al. no longer supports 10.5.  I'm sure others feel
similarly about
 their 10.4- machines.

 On the other hand, no one would blame a development team that
decided not to
 support what even Apple does not support.

:) - we just happened to have them lying around.  Actually, the 10.5
machine is PPC and catches endian errors fairly often, but I'm sure
we'll retire the 10.4 machine fairly soon.

Cheers,

Matthew


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk


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


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Is anyone producing matplotlib daily builds?

2013-08-13 Thread Michael Droettboom
As I'm researching what we may want to do for better continuous 
integration, I'm remembering that at least one person, Thomas Kluyver, 
is producing daily automated builds (for Ubuntu) here:


https://launchpad.net/~takluyver/+archive/matplotlib-daily 
https://launchpad.net/%7Etakluyver/+archive/matplotlib-daily


Is anyone else out there doing anything similar for other Linux distros 
or other platforms?  a) I'd like to list these things on the main 
website, and b) I'd like to look at how these kinds of things might make 
sense as part of a broader CI strategy.


Cheers,
Mike
--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Calling to those embedding matplotlib in applications

2013-08-12 Thread Michael Droettboom
I'm considering changing the behavior of the rcParam |interactive| 
(which also can be set through |matplotlib.interactive()| and 
|pyplot.ion()| and |pyplot.ioff()|). Currently, when setting 
|interactive| to |True|, running any sort of matplotlib plot as a script 
will fail to display a window. This can be very surprising if a user 
turns on |interactive| because they prefer its behavior in IPython, but 
are then surprised that none of their scripts continue to work. I 
propose to fix this by turning on |interactive| only when running at an 
interactive console.


See the pull request http://github.com/matplotlib/matplotlib/pull/2286 
for an implementation.


I'm trying to rule out any negative impact of this change, and I would 
appreciate any feedback if this change will have a negative impact on 
your application.


Mike

--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] pip install 0SX 10.7

2013-08-07 Thread Michael Droettboom
It should look in /usr/include and /usr/local/include by default.  Is it 
in either place?

On 08/06/2013 10:16 PM, Matthew Brett wrote:
 Hi,

 Continuing my adventures with setuptools

 I'm installing matplotlib into a clean + numpy virtualenv with python.org 2.7

 I have CC=clang in order to involve some header problems with the
 default gcc compiler.

 numpy compiles and installs OK.

 pip install matplotlib errors with:

 clang -fno-strict-aliasing -fno-common -dynamic -isysroot
 /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG
 -g -O3 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API
 -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include
 -I/usr/X11/include -I.
 -I/Users/mb312/.virtualenvs/py27-mpl/lib/python2.7/site-packages/numpy/core/include
 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
 -c src/ft2font.cpp -o build/temp.macosx-10.6-intel-2.7/src/ft2font.o

 In file included from src/ft2font.cpp:3:

 In file included from src/ft2font.h:16:

 /usr/X11/include/ft2build.h:56:10: fatal error:
 'freetype/config/ftheader.h' file not found

 #include freetype/config/ftheader.h

   ^

 1 error generated.

 error: command 'clang' failed with exit status 1

 I guess I need freetype installed in /usr/local separately?

 Thanks for your help,

 Matthew

 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] wrong link at http://matplotlib.org?

2013-08-07 Thread Michael Droettboom
Hmm...  It takes me to the matplotlib project page on sourceforge, which 
I think is as close to a direct permalink as we can get.  Not sure why 
it takes you somewhere else.  Did you get redirected?

Mike

On 08/07/2013 11:47 AM, keith.bri...@bt.com wrote:
 The link join the matplotlib mailing lists actually goes to the sourceforge 
 download page.

 Keith


 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] pip install 0SX 10.7

2013-08-07 Thread Michael Droettboom
On 08/07/2013 01:24 PM, Matthew Brett wrote:
 Hi,

 On Wed, Aug 7, 2013 at 4:50 AM, Michael Droettboom md...@stsci.edu wrote:
 It should look in /usr/include and /usr/local/include by default.  Is it
 in either place?
 There are no freetype* files in either place, no.  How would they get
 there (other than an explicit install)?

I think the usual advice here is to install the freetype development 
packages with MacPorts or homebrew -- but this is probably where I 
should step back at let one of the Mac OS-X folks speak up.

Mike

--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] corrupt fonts problem

2013-08-07 Thread Michael Droettboom
You can set the rcParam verbose.level to debug-annoying.  Then, when 
it runs through all of your fonts, it should be clear which one caused 
the problem.

Note that I'm in the process of rewriting large parts of the font 
infrastructure as part of MEP14, so these sorts of things should 
hopefully be less common in the future.

Mike

On 08/07/2013 11:56 AM, vwf wrote:
 Hello,

 Matplotlib does not like one (or more) of my fonts. Since I own a
 considerable set it is very hard to find out which one violates the
 requirements. Is it possible to let matplotlib which font is the
 problem?

 Thanks

 --
 Get 100% visibility into Java/.NET code with AppDynamics Lite!
 It's a free troubleshooting tool designed for production.
 Get down to code-level detail for bottlenecks, with 2% overhead.
 Download for free and get started troubleshooting in minutes.
 http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 1.3.0 and py2exe regression

2013-08-06 Thread Michael Droettboom
I have little to no experience with py2exe, so I don't know how much I 
can help there.

However, between 1.2.1 and 1.3.0, mpl_toolkits was changed to a 
namespace package, which allowed basemap to install into it despite it 
coming from matplotlib (and being installed with setuptools).  I don't 
know if that has any bearing on py2exe.

Mike

On 08/06/2013 07:19 AM, ruidc wrote:
 we have some code that was working fine with matplotlib 1.2.1 using:

 from mpl_toolkits.axes_grid import make_axes_locatable, axes_size

 now trying to freeze with py2exe (both 0.6.9 and Christoph Gohlke's
 0.6.10dev)
 results in ImportError: No module named mpl_toolkits

 when preparing the actual executable.
 running  from mpl_toolkits.axes_grid import make_axes_locatable, axes_size
 itself in python works fine.

 I've built a machine afresh and am getting this. Also, it seems to build
 fine on win amd64 - but as that is my main development machine, there may be
 some polution there

 options={'py2exe': {'packages' : ['matplotlib', 'mpl_toolkits', ...

 I've tried various different permutations of the above in includes with no
 success.
 Can anybody suggest why this is failing in 1.3.0 when it is working in 1.2.1
 ?

 Regards,
 RuiDC



 --
 View this message in context: 
 http://matplotlib.1069221.n5.nabble.com/1-3-0-and-py2exe-regression-tp41723.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.

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


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


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

2013-08-06 Thread Michael Droettboom

On 08/06/2013 08:39 AM, Rita wrote:

Yes, I mean a self-built package.

When linking I think  setupext.py is using /usr/lib and /usr/local/lib 
first, instead it should use PKG_CONFIG_PATH and then /usr/lib and 
then /usr/local/lib. Basically, the ordering or linking matters. I 
hope that helps. This isnt a big deal but just though I put out the 
solution.


I don't think PKG_CONFIG_PATH is supposed to have anything to do with 
linking directories.  PKG_CONFIG_PATH tells pkg-config where to look for 
.pc files, which *in turn*, by querying pkg-config, may contain 
information about link directories.  So when you say it should prepend 
PKG_CONFIG_PATH, do you mean it should prepend what pkg-config 
returns?  I think that probably what it should be doing, and it's a 
bonafide bug that it is not.


Any chance you can share the linker command line that you think is 
wrong, and how it needs to be re-ordered?


Mike




On Mon, Aug 5, 2013 at 10:29 AM, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


On 08/03/2013 07:50 AM, Rita wrote:

Same problem in Linux also. Here is what I did to fix it: Remove
the freetype/fontconfig rpm from my local install (yum remove)
and then place the proper PKG_CONFIG_PATH to point to my remote
freetype/fontconfig.


By remote, you mean self-built, rather than from a package?



The problem is there is a bug with setupext.py. We ought to
prepend PKG_CONFIG_PATH in the gcc compile statement.  I hope
this helps.


Can you elaborate?  The setupext.py just calls whatever pkg-config
is first on the PATH, which should then in turn obey
PKG_CONFIG_PATH.  If the user needs a custom PKG_CONFIG_PATH, it
is generally the resposibility of the user to set it correctly --
and matplotlib's build system should (and does) use it.  Or maybe
I'm just misunderstanding what you're suggesting.

Cheers,
Mike








On Fri, Aug 2, 2013 at 6:53 AM, Andrew Jaffe a.h.ja...@gmail.com
mailto:a.h.ja...@gmail.com wrote:

Hi,


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

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

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


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

ImportError:

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

/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so
   Expected in: flat namespace
  in

/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so


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

Andrew




--
Get your SQL database under version control now!
Version control is standard for application code, but
databases havent
caught up. So what steps can you take to put your SQL
databases under
version control? Why should you start doing it? Read more to
find out.

http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




-- 
--- Get your facts first, then you can distort them as you please.--




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


___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net  
mailto:Matplotlib-users@lists.sourceforge.net

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

2013-08-05 Thread Michael Droettboom

On 08/03/2013 07:50 AM, Rita wrote:
Same problem in Linux also. Here is what I did to fix it: Remove the 
freetype/fontconfig rpm from my local install (yum remove) and then 
place the proper PKG_CONFIG_PATH to point to my remote 
freetype/fontconfig.


By remote, you mean self-built, rather than from a package?

The problem is there is a bug with setupext.py. We ought to prepend 
PKG_CONFIG_PATH in the gcc compile statement.  I hope this helps.


Can you elaborate?  The setupext.py just calls whatever pkg-config is 
first on the PATH, which should then in turn obey PKG_CONFIG_PATH.  If 
the user needs a custom PKG_CONFIG_PATH, it is generally the 
resposibility of the user to set it correctly -- and matplotlib's build 
system should (and does) use it.  Or maybe I'm just misunderstanding 
what you're suggesting.


Cheers,
Mike







On Fri, Aug 2, 2013 at 6:53 AM, Andrew Jaffe a.h.ja...@gmail.com 
mailto:a.h.ja...@gmail.com wrote:


Hi,


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

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

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


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

ImportError:

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

/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so
   Expected in: flat namespace
  in

/Volumes/Data/Users/jaffe/Library/Python/2.7/lib/python/site-packages/matplotlib/ft2font.so


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

Andrew




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




--
--- Get your facts first, then you can distort them as you please.--


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


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


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


Re: [Matplotlib-users] Rendering SciPy docstrings as markup text within matplotlib

2013-08-05 Thread Michael Droettboom
docutils is the library that supports the format (restructuredtext) that 
these docstrings are written in.  It *may* (I haven't looked) contain 
functionality to render as clean plain text.


Mike

On 08/05/2013 09:57 AM, federico vaggi wrote:

Hi,

SciPy (and NumPy) docstrings are written with a special kind of mark up:

For example, the docstring for the russellrao distance function looks 
like this:


'\nComputes the Russell-Rao dissimilarity between two boolean 1-D 
arrays.\n\nThe Russell-Rao dissimilarity between two boolean 1-D 
arrays, `u` and\n`v`, is defined as\n\n.. math::\n\n 
 \\frac{n - c_{TT}}\n {n}\n\nwhere :math:`c_{ij}` is the number of 
occurrences of\n:math:`\\mathtt{u[k]} = i` and 
:math:`\\mathtt{v[k]} = j` for\n:math:`k  n`.\n\nParameters\n 
 --\nu : (N,) array_like, bool\nInput array.\n   
 v : (N,) array_like, bool\nInput array.\n\nReturns\n   
 ---\nrussellrao : double\nThe Russell-Rao 
dissimilarity between vectors `u` and `v`.\n\n'


What's the most efficient way to turn this into a format where you can 
format it nicely as a matplotlib text object?


I tried:

fig = plt.figure()

ax = fig.add_subplot(111)

props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)

textstr = dist_fcn.__doc__

textstr = textstr.replace('math:',' ')

textstr = textstr.replace('`', '$')

textstr = textstr.replace('\n\n where', '$\n\n where')

ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=14,

verticalalignment='top', bbox=props)


Which does an 'ok' job, at best, since fractions aren't converted 
properly.  Is there a way to do it nicely short of using some 
horrendous regular expressions?



Federico



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


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


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


Re: [Matplotlib-users] Bug in Custom Dash List

2013-08-05 Thread Michael Droettboom
The problem is that a 0-length dash or space is undefined.  In Agg, it 
causes an infinite loop (presumably because the line cursor never 
moves).  Saving it to a PDF file and opening it in Acrobat Reader 
reveals a blank page (presumably because it's doing something smarter, 
but also basically throwing up its hands).  In SVG, you get a solid 
line, which may or may not be the right behavior.


Given that a value of 0 doesn't make much sense anyway, I thought it 
best to just disallow it.  Jeffrey: Do you have a good need for this?


Here's the original PR:

https://github.com/matplotlib/matplotlib/pull/1999

Mike

On 08/05/2013 01:36 PM, Benjamin Root wrote:
@mdboom, from git blame, this looks to be specifically introduced by 
you via |7e7b5320 
https://github.com/matplotlib/matplotlib/commit/7e7b532057c08541489203697987a924e56a7aeb 
on May 15th, and you even added some tests for handling path 
clipping.  Perhaps the choice of = should have been just ?|



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


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


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


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

2013-08-02 Thread Michael Droettboom
Can you provide the output of the build?

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


 On 01/08/2013 19:06, Michael Droettboom wrote:
 On behalf of a veritable army of super coders, I'm pleased to announce
 the release of matplotlib 1.3.0.
 Two issues on OSX 10.8.4. I had been previously using the dmg installer.
 Lacking that, I tried easy-install and pip install, both of which gave
 me the following problems:

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

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

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


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

 Andrew



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


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


[Matplotlib-users] ANN: matplotlib 1.3.0 released

2013-08-01 Thread Michael Droettboom
On behalf of a veritable army of super coders, I'm pleased to announce 
the release of matplotlib 1.3.0.



 Downloads

Downloads are available here:

http://matplotlib.org/downloads.htmlhttp://matplotlib.org/downloads.html

as well as through |pip|. Check with your distro for when matplotlib 
1.3.0 will become packaged for your environment.


(Note: Mac .dmg installers are still forthcoming due to some issues with 
the new installation approach.)



 Important known issues

matplotlib no longer ships with its Python dependencies, including 
dateutil, pytz, pyparsing and six. When installing from source or |pip|, 
|pip| will install these for you automatically. When installing from 
packages (on Linux distributions, MacPorts, homebrew etc.) these 
dependencies should also be handled automatically. The Windows binary 
installers do not include or install these dependencies.


You may need to remove any old matplotlib installations before 
installing 1.3.0 to ensure matplotlib has access to the latest versions 
of these dependencies.


The following backends have been removed: QtAgg (Qt version 3.x only), 
FlktAgg and Emf.


For a complete list of removed features, see 
http://matplotlib.org/api/api_changes.html#changes-in-1-3http://matplotlib.org/api/api_changes.html#changes-in-1-3



 What's new

 * xkcd-style sketch plotting
 * webagg backend for displaying and interacting with plots in a web
   browser
 * event plots
 * triangular grid interpolation
 * control of baselines in stackplot
 * many improvements to text and color handling

For a complete list of what's new, see

http://matplotlib.org/users/whats_new.html#new-in-matplotlib-1-3http://matplotlib.org/users/whats_new.html#new-in-matplotlib-1-3

Have fun, and enjoy matplotlib!

Michael Droettboom

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


[Matplotlib-users] MEP19: Continuous integration virtual meeting

2013-08-01 Thread Michael Droettboom
(Apologies for cross-posting).

matplotlib has a dire need to improve its continuous integration 
testing.  I've drafted MEP19 and solicited comments, but there hasn't 
been a lot of feedback thus far.

As an alternative to mailing list discussion, where this sort of upfront 
planning can sometimes be difficult, I'm considering holding a Google 
Hangout in the next few weeks on the subject.  It's ok to participate 
even if you don't have the time to work on matplotlib -- I would also 
like feedback from advice from those that have configured similar 
systems for other projects.  matplotlib's needs are somewhat more 
complex in terms of dependencies, cpu, ram and storage, so we're pushing 
things pretty far here.

If there's enough people with an interest in participating in the 
discussion, I'll send around a Doodle poll to find a good time.

Mike

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


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

2013-08-01 Thread Michael Droettboom

Choose it as a backend.  See here:

http://matplotlib.org/faq/usage_faq.html#what-is-a-backend

Then when you call plt.show(), it will fire up the webserver and 
launch a browser window.


Mike

On 08/01/2013 03:03 PM, K.-Michael Aye wrote:


Very nice, congrats!


I was looking for some example to setup webagg but can't seem to find 
any? Is there anything written down about it?



Cheers,

Michael





On 2013-08-01 18:06:35 +, Michael Droettboom said:


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



  Downloads

Downloads are available here:

http://matplotlib.org/downloads.html

as well as through pip. Check with your distro for when matplotlib 
1.3.0 will become packaged for your environment.


(Note: Mac .dmg installers are still forthcoming due to some issues 
with the new installation approach.)



  Important known issues

matplotlib no longer ships with its Python dependencies, including 
dateutil, pytz, pyparsing and six. When installing from source or pip, 
pip will install these for you automatically. When installing from 
packages (on Linux distributions, MacPorts, homebrew etc.) these 
dependencies should also be handled automatically. The Windows binary 
installers do not include or install these dependencies.


You may need to remove any old matplotlib installations before 
installing 1.3.0 to ensure matplotlib has access to the latest 
versions of these dependencies.


The following backends have been removed: QtAgg (Qt version 3.x only), 
FlktAgg and Emf.


For a complete list of removed features, see 
http://matplotlib.org/api/api_changes.html#changes-in-1-3



  What's new

  * xkcd-style sketch plotting
  * webagg backend for displaying and interacting with plots in a web
browser
  * event plots
  * triangular grid interpolation
  * control of baselines in stackplot
  * many improvements to text and color handling

For a complete list of what's new, see

http://matplotlib.org/users/whats_new.html#new-in-matplotlib-1-3

Have fun, and enjoy matplotlib!

Michael Droettboom

___

NumPy-Discussion mailing list

numpy-discuss...@scipy.org

http://mail.scipy.org/mailman/listinfo/numpy-discussion




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


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


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


Re: [Matplotlib-users] Pdf File sizes on newer versions of matplotlib is a lot larger

2013-07-31 Thread Michael Droettboom

On 07/30/2013 04:20 PM, Jeffrey Spencer wrote:

Michael,

Thanks that is very informative. Answers most of the problems I was 
having and read MEP14 which looks really useful


That being said does the ps backend subset the fonts or use 
collections for drawing (is the collections feature global or just in 
the pdf backend)?


The ps backend has the same behavior as pdf on both counts.  TTF fonts 
are subsetted, but the fonts that come from TeX come to use as Type1 
fonts, which matplotlib currently does not know how to subset.  It also 
handles collections in the same way (by creating a stamp and reusing it).


I usually use .eps output and convert to pdf using epstopdf unless the 
figure has an alpha channel because always results in a much smaller 
file (60kB roughly for this file or plain figure around 10kB) than 
direct pdf output with the output looking the same. I pretty much 
always have usetex=True so maybe the pdf file is always embedding the 
full fonts.


Yes, when usetex=True, matplotlib does not do any font subsetting (in 
any backend).  To get around this limitation, one can use the 
`pdftocairo` tool (part of poppler utils), to convert from pdf to a pdf 
with subsetted fonts.  With your example, I was able to get the pdf down 
to ~80k.  With MEP14, we would basically move such functionality into 
matplotlib itself, but that's sort of a long term, semi-back-burner 
project so it could be a while.


It's possible that epstopdf is doing some font subsetting of its own.  
But as you point out, Postscript (as a specification) doesn't support 
alpha, so it's not useful when you need alpha.




Also, does the Cairo backend support usetex=True or subsetting? I know 
I had read it did not support usetex but that was maybe 2 years ago or 
so. The x,y,z axis look correct with cairo but the IPA Fonts don't 
render properly. The legend font says it is size 12 but if you zoom in 
extremely close you can see they are the correct fonts just way to 
small. The file size is around 60kB as well so I am guessing it 
supports subsetting of fonts.


Cairo does support font subsetting, but the matplotlib Cairo backend has 
no support for usetex.  I'm surprised this worked for you at all.  When 
I run your example with the Cairo backend, the IPA characters appear as 
raw TeX source code, i.e. \textipa{i}, which is what I would expect 
given that the regular font renderer doesn't understand that syntax.




The pgf backend would also subset fonts if output to .pdf I'm assuming 
because that is the default with pdftex? It results in similar size 
files to the .eps output for this file (roughly 60kB also).


Yes.



The IPA font uses the package (\usepackage{tipa}) and therefore that 
is why I think these look differently. That package draws these fonts 
with its' font libraries instead of whatever is selected as the text 
font. Maybe I'm wrong about this but that is my understanding because 
even in normal latex code the fonts look different than the standard text.


That is correct.  The default font for usetex=True is Computer Modern, 
whereas it is Bitstream Vera Sans in the default font rendering.  I was 
referring to the difference between 1.2 and 1.4 which was using TeX 
fonts in both cases, but due to a bug in 1.3/1.4 was rendering the IPA 
in serif when you had requested sans-serif.


Mike



Cheers,
Jeff


On Wed, Jul 31, 2013 at 4:43 AM, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


There are two different things going on here.

Between 1.2.1 and now, there was a bugfix to the font selection
routine that inadvertently introduced a bug selecting fonts in the
usetex backend.  You may notice that on master, the IPA font
selected is different.  The file size difference can be attributed
to the slightly larger font size of the one it selected vs. the
one it should have.  Note that when usetex is True, the fonts are
not subsetted, so you always get the full font embedded in the
file (MEP14 work will fix this in the future).

See b5c340 for the bug that introduced the commit, and
https://github.com/matplotlib/matplotlib/pull/2260 for the fix
(which should make it into 1.3.0 final).

Between 1.1.1 and 1.2.1 a change was made in how collections are
handled.  Previously, each path was redrawn individually.  In 1.2,
if a path is reused multiple times, a stamp is created and then
it is used multiple times.  In principle, this generally reduces
file sizes by a large amount.  However, in the case of this figure
with the 3D spheres, each path is used only once, so rather than
getting the file size savings of that approach, we only get the
overhead.  The backend could be smarter by not doing this when the
path is only used a small number of times.  Such a fix would be
welcome, but is probably too large/risky to try to get into the
current release cycle.  It will have to wait for 1.3.1

Cheers,
Mike

Re: [Matplotlib-users] Pdf File sizes on newer versions of matplotlib is a lot larger

2013-07-31 Thread Michael Droettboom

On 07/31/2013 10:38 AM, Jeffrey Spencer wrote:

Michael,

Pdftocairo is a good tool to know so thanks for that tip.

I still think currently it is a regression with the current 'stamp' 
method to use it on all accounts. I understand in a complicated figure 
with a bunch of subplots that this would be beneficial and create 
smaller code. I don't see how in single figures this would often 
result in reduced files sizes.


The case where it has an enormous impact is when the same shape is used 
multiple times.  For example in a scatter, hexbin or pcolor plot.


I usually output single figures with one plot and I don't think one of 
them that I am currently working on was smaller in 1.4.x. They all 
resulted in reduced file sizes with mpl 1.1.1. This figure of 3d 
spheres resulted in 60kb instead of roughly 80kb after running 
pdftocairo. Anyway, you said in coming versions a threshold should be 
set before stamping of objects occurs so a fix is on the way eventually.


Yes, but it's too complex of a fix to throw in quickly.  I think the 
overall benefit of stamping is preferable to not doing it at all at this 
point.


Mike



Thanks for all the help,
Jeff


On Wed, Jul 31, 2013 at 11:31 PM, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


On 07/30/2013 04:20 PM, Jeffrey Spencer wrote:

Michael,

Thanks that is very informative. Answers most of the problems I
was having and read MEP14 which looks really useful

That being said does the ps backend subset the fonts or use
collections for drawing (is the collections feature global or
just in the pdf backend)?


The ps backend has the same behavior as pdf on both counts.  TTF
fonts are subsetted, but the fonts that come from TeX come to use
as Type1 fonts, which matplotlib currently does not know how to
subset.  It also handles collections in the same way (by creating
a stamp and reusing it).



I usually use .eps output and convert to pdf using epstopdf
unless the figure has an alpha channel because always results in
a much smaller file (60kB roughly for this file or plain figure
around 10kB) than direct pdf output with the output looking the
same. I pretty much always have usetex=True so maybe the pdf file
is always embedding the full fonts.


Yes, when usetex=True, matplotlib does not do any font subsetting
(in any backend).  To get around this limitation, one can use the
`pdftocairo` tool (part of poppler utils), to convert from pdf to
a pdf with subsetted fonts.  With your example, I was able to get
the pdf down to ~80k.  With MEP14, we would basically move such
functionality into matplotlib itself, but that's sort of a long
term, semi-back-burner project so it could be a while.

It's possible that epstopdf is doing some font subsetting of its
own.  But as you point out, Postscript (as a specification)
doesn't support alpha, so it's not useful when you need alpha.




Also, does the Cairo backend support usetex=True or subsetting? I
know I had read it did not support usetex but that was maybe 2
years ago or so. The x,y,z axis look correct with cairo but the
IPA Fonts don't render properly. The legend font says it is size
12 but if you zoom in extremely close you can see they are the
correct fonts just way to small. The file size is around 60kB as
well so I am guessing it supports subsetting of fonts.


Cairo does support font subsetting, but the matplotlib Cairo
backend has no support for usetex.  I'm surprised this worked for
you at all.  When I run your example with the Cairo backend, the
IPA characters appear as raw TeX source code, i.e. \textipa{i},
which is what I would expect given that the regular font renderer
doesn't understand that syntax.




The pgf backend would also subset fonts if output to .pdf I'm
assuming because that is the default with pdftex? It results in
similar size files to the .eps output for this file (roughly 60kB
also).


Yes.




The IPA font uses the package (\usepackage{tipa}) and therefore
that is why I think these look differently. That package draws
these fonts with its' font libraries instead of whatever is
selected as the text font. Maybe I'm wrong about this but that is
my understanding because even in normal latex code the fonts look
different than the standard text.


That is correct.  The default font for usetex=True is Computer
Modern, whereas it is Bitstream Vera Sans in the default font
rendering.  I was referring to the difference between 1.2 and 1.4
which was using TeX fonts in both cases, but due to a bug in
1.3/1.4 was rendering the IPA in serif when you had requested
sans-serif.

Mike




Cheers,
Jeff


On Wed, Jul 31, 2013 at 4:43 AM, Michael Droettboom
md...@stsci.edu mailto:md...@stsci.edu wrote:

There are two different things

Re: [Matplotlib-users] Pdf File sizes on newer versions of matplotlib is a lot larger

2013-07-30 Thread Michael Droettboom
On 07/30/2013 09:23 AM, Jouni K. Seppänen wrote:
 Jeffrey Spencer jeffspenc...@gmail.com writes:

 I have three different versions of matplotlib that all output different
 file sizes with matplotlib 1.1.1 providing the smallest. This is for the
 same exact script. I can post the script if that helps.

 MPL 1.4.x: 539.32kb, Ubuntu 12.10
 MPL 1.1.1: 172.56kb Ubuntu 12.10
 MPL 1.2.1: 475.9kb, Ubuntu 13.04
 Yes, it would be interesting to know what the plotting commands are.
 Just as a guess, since all the sizes are a few hundred kilobytes, it
 could be a difference in e.g. font embedding - many TrueType fonts are
 of comparable size.

In addition to your plot script, any matplotlibrc customizations that 
you may have in effect would be helpful.

Mike

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


Re: [Matplotlib-users] Pdf File sizes on newer versions of matplotlib is a lot larger

2013-07-30 Thread Michael Droettboom

There are two different things going on here.

Between 1.2.1 and now, there was a bugfix to the font selection routine 
that inadvertently introduced a bug selecting fonts in the usetex 
backend.  You may notice that on master, the IPA font selected is 
different.  The file size difference can be attributed to the slightly 
larger font size of the one it selected vs. the one it should have.  
Note that when usetex is True, the fonts are not subsetted, so you 
always get the full font embedded in the file (MEP14 work will fix this 
in the future).


See b5c340 for the bug that introduced the commit, and 
https://github.com/matplotlib/matplotlib/pull/2260 for the fix (which 
should make it into 1.3.0 final).


Between 1.1.1 and 1.2.1 a change was made in how collections are 
handled.  Previously, each path was redrawn individually.  In 1.2, if a 
path is reused multiple times, a stamp is created and then it is 
used multiple times.  In principle, this generally reduces file sizes 
by a large amount.  However, in the case of this figure with the 3D 
spheres, each path is used only once, so rather than getting the file 
size savings of that approach, we only get the overhead.  The backend 
could be smarter by not doing this when the path is only used a small 
number of times.  Such a fix would be welcome, but is probably too 
large/risky to try to get into the current release cycle.  It will have 
to wait for 1.3.1


Cheers,
Mike


On 07/30/2013 12:24 PM, Jeffrey Spencer wrote:
K, I have just made the script self-contained but it loads external 
data so I have attached that as well. If you want me to just separate 
out the plotting commands let me know. I have also attached my 
matplotlib rc file which is the same on all three systems. All the 
modifications to the matplotlibrc file are copied to the top and in 
the first 30 lines or so.


Of note, the smallest file sizes for pdf are using the pgf backend 
around 60kb. Not sure if that helps at all. It is also around the same 
size if I export to .eps and then convert to pdf. About 60kb. The 
problem with eps in these 3d figures though is the back wall I think 
has an alpha channel because just becomes a solid wall in the output. 
No lines through it like the other two walls.



On Tue, Jul 30, 2013 at 11:23 PM, Jouni K. Seppänen j...@iki.fi 
mailto:j...@iki.fi wrote:


Jeffrey Spencer jeffspenc...@gmail.com
mailto:jeffspenc...@gmail.com writes:

 I have three different versions of matplotlib that all output
different
 file sizes with matplotlib 1.1.1 providing the smallest. This is
for the
 same exact script. I can post the script if that helps.

 MPL 1.4.x: 539.32kb, Ubuntu 12.10
 MPL 1.1.1: 172.56kb Ubuntu 12.10
 MPL 1.2.1: 475.9kb, Ubuntu 13.04

Yes, it would be interesting to know what the plotting commands are.
Just as a guess, since all the sizes are a few hundred kilobytes, it
could be a difference in e.g. font embedding - many TrueType fonts are
of comparable size.

--
Jouni K. Seppänen
http://www.iki.fi/jks



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




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


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


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


[Matplotlib-users] Results of matplotlib user survey 2013

2013-07-18 Thread Michael Droettboom
We have had 508 responses to the matplotlib user survey.  Quite a nice 
turnout!


You can view the results here:

https://docs.google.com/spreadsheet/viewanalytics?key=0AjrPjlTMRTwTdHpQS25pcTZIRWdqX0pNckNSU01sMHcgridId=0#chart

and from there, you can access the complete raw results.

I will be doing more analysis of the results over the coming days and 
weeks, including dedup'ing some of the responses and converting some of 
the free-form responses into github issues etc.  Volunteers to help with 
this are of course welcome!


Cheers,
Mike
--
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] Results of matplotlib user survey 2013

2013-07-18 Thread Michael Droettboom
Apologies: I didn't realize the link to the raw results only exists for 
users with edit permissions.  The public URL for the raw results is:


https://docs.google.com/spreadsheet/ccc?key=0AjrPjlTMRTwTdHpQS25pcTZIRWdqX0pNckNSU01sMHcusp=sharing

Mike

On 07/18/2013 09:42 AM, Michael Droettboom wrote:
We have had 508 responses to the matplotlib user survey.  Quite a nice 
turnout!


You can view the results here:

https://docs.google.com/spreadsheet/viewanalytics?key=0AjrPjlTMRTwTdHpQS25pcTZIRWdqX0pNckNSU01sMHcgridId=0#chart

and from there, you can access the complete raw results.

I will be doing more analysis of the results over the coming days and 
weeks, including dedup'ing some of the responses and converting some 
of the free-form responses into github issues etc.  Volunteers to help 
with this are of course welcome!


Cheers,
Mike


--
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] Smooth animations

2013-07-17 Thread Michael Droettboom
There is nothing available to push points -- matplotlib uses Numpy 
arrays internally for the data, and they can not be (efficiently) 
resized.  I would try implementing this before assuming it's too slow.


Mike

On 07/05/2013 12:02 PM, v0idnull wrote:
Yes, but this is where I am failing. I don't have the code with me 
right now but I can explain it:


I get a new number every 2000 milliseconds, and I want to update the 
graph say, every 50 milliseconds, and keep a minute of history visible 
in the graph.


So that's 30 x-axis ticks.

But if I want to draw this out smoothly, I need 40 more ticks per 
update interval. I have five lines I want to show, so every 50ms, 600 
points need to be plotted out.


Now, my proof of concept code is just working with arrays in a sort of 
FIFO queue, I haven't actually tried to plug those arrays into 
matplotlib, but it seems like replotting 600 points is a lot of work.


Maybe I am over reacting? Or is there some feature of matplotlib that 
allows me to push data onto a plot instead of replotting all points?


I dunno, I'm not confident in my approach. I seek inspiration.

thanks,
--alex

This means that every 50ms, 600 points need to be updated.

On 13-07-04 05:11 PM, Michael Droettboom wrote:
I see -- you want to basically interpolate between points?  I don't 
think there's anything built in to matplotlib to do that, but you 
could always do that interpolation outside and just update the graph 
more often.


Mike

On 07/04/2013 04:28 PM, v0idnull wrote:

eh

Let me explain my problem in a different way:

Every two seconds I get a value from a service. Let's say I over 8 
seconds I get 1, 5, 10, 5 as values.


So if my application updates the graph every two seconds, this will 
look choppy and ugly. This is because every two seconds, an entire 
line is added onto the graph between the two points.


Imagine if I could control the drawing of said line though. If I 
could draw the individual pixels of the line every couple of ticks 
instead of just dumping a line in every two seconds, I will end up 
with a nice smooth animation. It may not be 100% real time anymore, 
but my focus on this personal project of mine is vanity, not 
practicality ;)


I hope this better explains what I am trying to accomplish...

Thanks,
--alex

On 13-07-04 04:09 PM, Michael Droettboom wrote:
Have you looked at the simple_anim.py example -- other than the 
networking piece, it seems to do what you describe, and it's pretty 
fast. Maybe start from that and make changes until it gets slow in 
order to determine where the slowness comes from...?


Mike

On 07/03/2013 09:19 PM, v0idnull wrote:
I am receiving a number from a server every two seconds. I would 
like to plot this number.out over time for the past say... 30 polls.


Would it be possible to use... Anything, to produce a smooth 
animation of the plot line getting drawn? As it stands now the 
animation is well... Quite choppy. ;)


I'm using pygame currently to render my graphs on this full screen 
application I'm making just for my self. I am not bound to it 
though if there are better linux-only things out there.


Thanks in advance,
--alex


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


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




--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

!DSPAM:51d5d60416102691037314!


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


!DSPAM:51d5d60416102691037314!




--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


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


!DSPAM:51d5e4c116101841011479!


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

!DSPAM:51d5e4c116101841011479!


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


!DSPAM:51d5e4c116101841011479!




--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Re: [Matplotlib-users] [Patch] Patch for fontmanager crash

2013-07-17 Thread Michael Droettboom
This patch doesn't make a whole lot of sense to me.  get_name should 
work just fine if self._family is None, and indeed it does in my own 
testing:

```
from matplotlib import font_manager

f = font_manager.FontProperties(None)
print f._family
print f.get_family()
print f.get_name()
```

So I'd much prefer to get to the bottom of the root cause of this 
problem than patch it unnecessarily in this way.  Any idea what that is?

Mike


On 07/08/2013 10:57 AM, Nicolas Mailhot wrote:
 Hi,

 In matplotlib 1.2.1, the  get_name function is not garding against none
 self (unlike other functions); Unfortunately it seems I have a workload
 that makes matplotlib call get_name with None (wasn't the case in 1.2.0).
 I couldn't isolate the exact trigger, when I reduce the volume of data
 processed the problem goes away so I have to simple shareable reproducer.

 Anyway, the following patch makes it all work for me, could it (or
 something similar) be merged?

 diff -uNr matplotlib-1.2.1.orig/lib/matplotlib/font_manager.py
 matplotlib-1.2.1/lib/matplotlib/font_manager.py
 --- matplotlib-1.2.1.orig/lib/matplotlib/font_manager.py2013-03-26
 14:04:37.0 +0100
 +++ matplotlib-1.2.1/lib/matplotlib/font_manager.py 2013-07-08
 14:49:37.791845661 +0200
 @@ -721,6 +721,8 @@
   Return the name of the font that best matches the font
   properties.
   
 +if self._family is None:
 +  return rcParams['font.family']
   return ft2font.FT2Font(str(findfont(self))).family_name

   def get_style(self):

 Regards,



--
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] Smooth animations

2013-07-04 Thread Michael Droettboom
Have you looked at the simple_anim.py example -- other than the 
networking piece, it seems to do what you describe, and it's pretty 
fast.  Maybe start from that and make changes until it gets slow in 
order to determine where the slowness comes from...?


Mike

On 07/03/2013 09:19 PM, v0idnull wrote:
I am receiving a number from a server every two seconds. I would like 
to plot this number.out over time for the past say... 30 polls.


Would it be possible to use... Anything, to produce a smooth animation 
of the plot line getting drawn? As it stands now the animation is 
well... Quite choppy. ;)


I'm using pygame currently to render my graphs on this full screen 
application I'm making just for my self. I am not bound to it though 
if there are better linux-only things out there.


Thanks in advance,
--alex


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


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


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Smooth animations

2013-07-04 Thread Michael Droettboom
I see -- you want to basically interpolate between points?  I don't 
think there's anything built in to matplotlib to do that, but you could 
always do that interpolation outside and just update the graph more often.


Mike

On 07/04/2013 04:28 PM, v0idnull wrote:

eh

Let me explain my problem in a different way:

Every two seconds I get a value from a service. Let's say I over 8 
seconds I get 1, 5, 10, 5 as values.


So if my application updates the graph every two seconds, this will 
look choppy and ugly. This is because every two seconds, an entire 
line is added onto the graph between the two points.


Imagine if I could control the drawing of said line though. If I could 
draw the individual pixels of the line every couple of ticks instead 
of just dumping a line in every two seconds, I will end up with a nice 
smooth animation. It may not be 100% real time anymore, but my focus 
on this personal project of mine is vanity, not practicality ;)


I hope this better explains what I am trying to accomplish...

Thanks,
--alex

On 13-07-04 04:09 PM, Michael Droettboom wrote:
Have you looked at the simple_anim.py example -- other than the 
networking piece, it seems to do what you describe, and it's pretty 
fast.  Maybe start from that and make changes until it gets slow in 
order to determine where the slowness comes from...?


Mike

On 07/03/2013 09:19 PM, v0idnull wrote:
I am receiving a number from a server every two seconds. I would 
like to plot this number.out over time for the past say... 30 polls.


Would it be possible to use... Anything, to produce a smooth 
animation of the plot line getting drawn? As it stands now the 
animation is well... Quite choppy. ;)


I'm using pygame currently to render my graphs on this full screen 
application I'm making just for my self. I am not bound to it though 
if there are better linux-only things out there.


Thanks in advance,
--alex


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


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


!DSPAM:51d5d60416102691037314!


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

!DSPAM:51d5d60416102691037314!


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


!DSPAM:51d5d60416102691037314!




--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


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


--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Reports from SciPy 2013

2013-07-02 Thread Michael Droettboom

On 07/02/2013 10:04 AM, Jason Grout wrote:

On 7/1/13 9:33 AM, Michael Droettboom wrote:

SciPy 2013 was a great success.  I didn't get good headcount at the
matplotlib BOF, but it was a good number, and we had 15 participants at
various points during the sprints.  It was nice to see the diversity of
experience with matplotlib at the sprints, and I hope we oldtimers were
helpful to the newtimers getting started so they can continue to
contribute in the future.  It was also great to put some faces to many
of the talented names I've been seeing on github and the mailing list
lately.


On a slightly different, but related topic: is there any chance the
entries (or at least the winning entries) to the plotting contest could
be posted online?

My understanding is that they will be posted soon, along with the slides 
and other materials from the other papers.


For the impatient, they are in this git repo:

https://github.com/scipy/scipy2013_talks

Mike
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] matplotlib user survey 2013

2013-07-02 Thread Michael Droettboom

[Apologies for cross-posting]

The matplotlib developers want to hear from you!

We are conducting a user survey to determine how and where matplotlib is 
being used in order to focus its further development.


This should only take a couple of minutes.  To fill it out, visit:

https://docs.google.com/spreadsheet/viewform?fromEmail=trueformkey=dHpQS25pcTZIRWdqX0pNckNSU01sMHc6MQ 
https://docs.google.com/spreadsheet/viewform?fromEmail=trueformkey=dHpQS25pcTZIRWdqX0pNckNSU01sMHc6MQ


Please forward to your colleagues, particularly those who don't read 
these mailing lists.


Cheers,
Michael Droettboom, and the matplotlib team
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib Sprints

2013-06-28 Thread Michael Droettboom
For those not in Austin who are interested in following along with the 
matplotlib sprint at Scipy, feel free to visit here:

https://etherpad.mozilla.org/MatplotlibSprint

Mike

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] EPS backend

2013-06-07 Thread Michael Droettboom
On 06/07/2013 05:07 AM, Yoshi Rokuko wrote:
 I'm having problems recently with printing EPS figures created by
 matplotlib. To me this is strange because printing postscript should
 just work in my opinion.

 My most recent example is a Basemap thing with AxesGrid. Basically the
 idea was to have six maps nicely arranged on a DIN A4 paper for
 printout. The EPS looked nice on my notebook but printing them on our
 freshly leased printers at the institute failed in the middle of the
 fifth map (six maps in total). I have Ghostscript 9.07 and it turned out
 that this EPS stopped working with just one earlier version (a college
 with Ghostscript 9.06 could not open the EPS or more correct Ghostview
 failed in the middle of map number five).

 I expect such a Ghostscript version thing to be the problem also with
 the printer. If that is the case don't you think that's ridiculous?
 Isn't at least some legacy support wanted?

Yes -- legacy support is of course intended...  matplotlib has been 
going for over 10 years, after all, and we're very conservative about 
intentionally breaking legacy systems.

Have you tried setting ps.usedistiller to False, or xpdf?  There have 
been problems using Ghostscript as a distiller with recent versions of 
Ghostscript.

We'll need a minimal example, or at least a copy of the PS file to 
investigate this further, however.  Also, what platform, version of 
matplotlib and Python are you using?

Mike


 I don't have a minimal example yet, but I could try to create one next
 week if the need is there. The above mentioned thing was something
 along the lines of:

 ...
 import matplotlib.pyplot as pl
 from mpl_toolkits.basemap import Basemap
 from mpl_toolkits.axes_grid1 import AxesGrid

 # loading data
 ...

 fig = pl.figure(1, (16,19))
 grid = AxesGrid(fig, 111,
  nrows_ncols = (3, 2),
  axes_pad = 0.3,
  cbar_location = 'top',
  cbar_mode = 'each',
  cbar_size = '3%',
  cbar_pad = '1%',
 )
 for i in range(6):
  bmap = Basemap(projection='aeqd', ..., ax=grid[i])
  ...

 pl.savefig('sixer.eps', bbox_inches='tight')

 Best regards, Yoshi

 --
 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] matshow unequal element sizes

2013-06-06 Thread Michael Droettboom
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

On 06/06/2013 05:52 AM, Michiel de Hoon wrote:

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.


--
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] Font issue while trying to save PS/EPS/SVG but not PDF

2013-05-28 Thread Michael Droettboom
Which version of Windows are you on? Apparently, the Segoe UI font is 
different on Windows 7 and 8 and I'd like to download and test with the 
correct one.

Mike

On 05/28/2013 06:12 AM, klo uo wrote:
 As suggested by Phil, I'm reposting github issue #2067 on this list.

 I use MPL 1.2.1 on Windows with Python 2.7.5. In my matplotlibrc I've
 set sans-serif font to Segoe UI.

 Now, if I try to save a plot to PDF, MPL saves it fine, but if I try
 PS or EPS or SVG it fails, because of the font set. (If I don't change
 the font everything is fine)

 Here is PDF info from mutool:
 
 PDF-1.4
 Info object (27 0 R):
 
/CreationDate (D:20130528120149+02'00')
/Producer (matplotlib pdf backend)
/Creator (matplotlib 1.2.1, http://matplotlib.sf.net)
 Pages: 1

 Retrieving info from pages 1-1...
 Mediaboxes (1):
  1 ( 10 0 R): [ 0 0 576 432 ]

 Fonts (1):
  1 ( 10 0 R): Type3 'SegoeUI' (14 0 R)
 


 So I wonder how can MPL output PDF, but can't output PS/EPS, let aside SVG?


 And here is full trace from IPython:
 
 KeyError  Traceback (most recent call last)
 ipython-input-63-6bec7f50eb05 in module()
  1 savefig('test.eps')

 C:\Python27\lib\site-packages\matplotlib\pyplot.pyc in savefig(*args, 
 **kwargs)
  470 def savefig(*args, **kwargs):
  471 fig = gcf()
 -- 472 return fig.savefig(*args, **kwargs)
  473
  474 @docstring.copy_dedent(Figure.ginput)

 C:\Python27\lib\site-packages\matplotlib\figure.pyc in savefig(self,
 *args, **kwargs)
 1368 kwargs.setdefault('edgecolor',
 rcParams['savefig.edgecolor'])
 1369
 - 1370 self.canvas.print_figure(*args, **kwargs)
 1371
 1372 if transparent:

 C:\Python27\lib\site-packages\matplotlib\backend_bases.pyc in
 print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
 format, **kwargs)
 2094 orientation=orientation,
 2095 bbox_inches_restore=_bbox_inches_restore,
 - 2096 **kwargs)
 2097 finally:
 2098 if bbox_inches and restore_bbox:

 C:\Python27\lib\site-packages\matplotlib\backend_bases.pyc in
 print_eps(self, *args, **kwargs)
 1841 from backends.backend_ps import FigureCanvasPS # lazy import
 1842 ps = self.switch_backends(FigureCanvasPS)
 - 1843 return ps.print_eps(*args, **kwargs)
 1844
 1845 def print_pdf(self, *args, **kwargs):

 C:\Python27\lib\site-packages\matplotlib\backends\backend_ps.pyc in
 print_eps(self, outfile, *args, **kwargs)
  972
  973 def print_eps(self, outfile, *args, **kwargs):
 -- 974 return self._print_ps(outfile, 'eps', *args, **kwargs)
  975
  976

 C:\Python27\lib\site-packages\matplotlib\backends\backend_ps.pyc in
 _print_ps(self, outfile, format, *args, **kwargs)
 1005 self._print_figure(outfile, format, imagedpi,
 facecolor, edgecolor,
 1006orientation, isLandscape, papertype,
 - 1007**kwargs)
 1008
 1009 def _print_figure(self, outfile, format, dpi=72,
 facecolor='w', edgecolor='w',

 C:\Python27\lib\site-packages\matplotlib\backends\backend_ps.pyc in
 _print_figure(self, outfile, format, dpi, facecolor, edgecolor,
 orientation, isLandscape, papertype, **kwargs)
 1098 bbox_inches_restore=_bbox_inches_restore)
 1099
 - 1100 self.figure.draw(renderer)
 1101
 1102 if dryrun: # return immediately if dryrun (tightbbox=True)

 C:\Python27\lib\site-packages\matplotlib\artist.pyc in
 draw_wrapper(artist, renderer, *args, **kwargs)
   52 def draw_wrapper(artist, renderer, *args, **kwargs):
   53 before(artist, renderer)
 --- 54 draw(artist, renderer, *args, **kwargs)
   55 after(artist, renderer)
   56

 C:\Python27\lib\site-packages\matplotlib\figure.pyc in draw(self, renderer)
 1004 dsu.sort(key=itemgetter(0))
 1005 for zorder, a, func, args in dsu:
 - 1006 func(*args)
 1007
 1008 renderer.close_group('figure')

 C:\Python27\lib\site-packages\matplotlib\artist.pyc in
 draw_wrapper(artist, renderer, *args, **kwargs)
   52 def draw_wrapper(artist, renderer, *args, **kwargs):
   53 before(artist, renderer)
 --- 54 draw(artist, renderer, *args, **kwargs)
   55 after(artist, renderer)
   56

 C:\Python27\lib\site-packages\matplotlib\axes.pyc in draw(self,
 renderer, inframe)
 2084
 2085 for zorder, a in dsu:
 - 2086 a.draw(renderer)
 2087
 2088 renderer.close_group('axes')

 C:\Python27\lib\site-packages\matplotlib\artist.pyc in

Re: [Matplotlib-users] missing ticks on inverted log axis

2013-05-21 Thread Michael Droettboom
On 05/20/2013 06:42 PM, gaspra wrote:
 Michael Droettboom-3 wrote
 I have created https://github.com/matplotlib/matplotlib/issues/2025 to
 track this.
 Hi Michael, thanks. I am somewhat convinced the problem is related to
 matplotlib 1.3.x, not the Tk library. I tried on Linux that uses Tk8.5 and I
 got the missing ticks for inverted log axes as well. So the TkAgg backend
 only works properly with matplotlib 1.2.0.

 I further tested macports python, matplotlib 1.3.x and system Tk 8.5 on Mac.
 I did so by uninstalling macports version of Tk/Tcl (8.6). The ticks are
 also missing.

 Additional test on gtkagg backend shows the same thing: matplotlib 1.2.0
 works perfectly fine with gtkagg, while matplotlib 1.3.x has the missing
 ticks.

 Probably you have a better sense on what is going on?

The issue I filed was related to the build problem you reported -- that 
building matplotlib with a MacPorts python is trying to use the system 
(framework) Tcl/Tk.  That's completely independent of the other problem 
related to ticks, which should not be affected by the backend at all.  
In my quick skimming of this thread, I thought that that issue was 
resolved, but apparently not.  I'll look into that further and file a 
separate issue for that if need be.

Mike

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


Re: [Matplotlib-users] missing ticks on inverted log axis

2013-05-21 Thread Michael Droettboom

I have opened an issue (with a fix) here:

https://github.com/matplotlib/matplotlib/pull/2036

Gregorio: Could you please confirm that the patch there addresses your 
original problem?


Mike

On 05/21/2013 08:54 AM, Michael Droettboom wrote:

On 05/20/2013 06:42 PM, gaspra wrote:

Michael Droettboom-3 wrote

I have created https://github.com/matplotlib/matplotlib/issues/2025 to
track this.

Hi Michael, thanks. I am somewhat convinced the problem is related to
matplotlib 1.3.x, not the Tk library. I tried on Linux that uses Tk8.5 and I
got the missing ticks for inverted log axes as well. So the TkAgg backend
only works properly with matplotlib 1.2.0.

I further tested macports python, matplotlib 1.3.x and system Tk 8.5 on Mac.
I did so by uninstalling macports version of Tk/Tcl (8.6). The ticks are
also missing.

Additional test on gtkagg backend shows the same thing: matplotlib 1.2.0
works perfectly fine with gtkagg, while matplotlib 1.3.x has the missing
ticks.

Probably you have a better sense on what is going on?


The issue I filed was related to the build problem you reported -- that
building matplotlib with a MacPorts python is trying to use the system
(framework) Tcl/Tk.  That's completely independent of the other problem
related to ticks, which should not be affected by the backend at all.
In my quick skimming of this thread, I thought that that issue was
resolved, but apparently not.  I'll look into that further and file a
separate issue for that if need be.

Mike

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


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


Re: [Matplotlib-users] missing ticks on inverted log axis

2013-05-20 Thread Michael Droettboom
I have created https://github.com/matplotlib/matplotlib/issues/2025 to 
track this.


On 05/19/2013 05:18 PM, gaspra wrote:

Michael Droettboom-3 wrote

If you use the macports version of Python, this shouldn't be a problem.
I think the problem is (perhaps) that you're trying to use the system
Python with packages from MacPorts?

Yes, I can confirm the system Python doesn't work with TkAgg and
matplotlib 1.3.x. The problem with matplotlib 1.3.x and Macports Python
is that the Tk/Tcl library used in setupext.py is hardwired to system Tk/Tcl
for Mac platform. Here is the piece of code from setupext.py:

elif sys.platform == 'darwin':
 # this config section lifted directly from Imaging - thanks to
 # the effbot!

 # First test for a MacOSX/darwin framework install
 from os.path import join, exists
 framework_dirs = [
 join(os.getenv('HOME'), '/Library/Frameworks'),
 '/Library/Frameworks',
 '/System/Library/Frameworks/',
 ]

Therefore matplotlib 1.3.x is compiled with system Tk/Tcl regardless which
python is used (macports or system). I have tried to hardwire the macports
Tk dynamic library but there are errors when importing matplotlib in python.
It would be great if the devs can modify the setupext.py to use macports
Tk/Tcl
libraries properly, e.g., enabling a choice for using system or macports
Tk/Tcl
libraries.


Michael Droettboom-3 wrote

I really need the tri package in matplotlib 1.3.x. Is there anyway I
can
manually replace the tri package in matplotlib 1.2.0 (installed by
macports) with the one in matplotlib 1.3.x (downloaded from the latest
master in github repository?

Possible, but probably not straightforward.  I would try to tackle the
environmental problem above first.

I guess I will just modify the codes in tri package so I can use them as
standalone modules.

Thanks.
Yuan




--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/missing-ticks-on-inverted-log-axis-tp41063p41086.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] missing ticks on inverted log axis

2013-05-18 Thread Michael Droettboom
On 05/18/2013 04:17 AM, gaspra wrote:
 I find the issue came from the matplotlib backend. The problem is gone when
 using TkAgg backend. However, TkAgg doesn't work with matplotlib 1.3.x,
 which has some conflict of Tk dynamic library due to different Tk version,
 i.e., macports uses Tk8.6 and Mac OSX 10.8.3 uses Tk8.5.

If you use the macports version of Python, this shouldn't be a problem.  
I think the problem is (perhaps) that you're trying to use the system 
Python with packages from MacPorts?


 I really need the tri package in matplotlib 1.3.x. Is there anyway I can
 manually replace the tri package in matplotlib 1.2.0 (installed by
 macports) with the one in matplotlib 1.3.x (downloaded from the latest
 master in github repository?

Possible, but probably not straightforward.  I would try to tackle the 
environmental problem above first.

Mike


 Thanks.





 --
 View this message in context: 
 http://matplotlib.1069221.n5.nabble.com/missing-ticks-on-inverted-log-axis-tp41063p41084.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.

 --
 AlienVault Unified Security Management (USM) platform delivers complete
 security visibility with the essential security capabilities. Easily and
 efficiently configure, manage, and operate all of your security controls
 from a single console and one unified framework. Download a free trial.
 http://p.sf.net/sfu/alienvault_d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem with a umlaut

2013-05-15 Thread Michael Droettboom

I've created an issue in the tracker for this:

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

Mike

On 05/15/2013 06:26 PM, Christoph Gohlke wrote:

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



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


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

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




work for you?


The bug only happens if I try to save the figure as EPS. So I suppose 
that

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

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



I can reproduce the crash on Python 2.7, 32 and 64 bit. Python 2.6 and 
3.3 appear to work. The call stack is attached. The crash is in 
ttfont_add_glyph_dependencies() at 
https://github.com/matplotlib/matplotlib/blob/v1.2.x/ttconv/pprdrv_tt2.cpp#L703


Christoph





--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d


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


--
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] QT backend bug

2013-05-10 Thread Michael Droettboom
Yeah -- I can confirm this.  I'm not sure what the most desired behavior 
is, but I think it's worth opening a discussion in a Github issue.

Mike

On 05/09/2013 08:44 PM, K.-Michael Aye wrote:
 If someone confirms this, I'd be happy to put it into github, but I
 thought I send it here first, to see if this is another PEBKAC.

 Michael


 On 2013-05-10 00:39:48 +, K.-Michael Aye said:

 Problem: New y-axis max value set by edit-curve interface is forgotten
 after zoom-in-zoom-out cycle.

 Reproduction steps:

 * change y-axis max to a larger value than used by the default layouter
 with the edit-curve interface (click on the green hook)
 * Click Ok
 * Zoom into the plot
 * click the 'Back' button and see the max on y-axis going back to the
 default value.

 I would understand if the Home button goes to the default layout,
 although that's debatable, but the back button really should go to the
 previous layout, not the default layout values.

 Michael




 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and
 their applications. This 200-page book is written by three acclaimed
 leaders in the field. The early access version is available now.
 Download your free book today! http://p.sf.net/sfu/neotech_d2d_may



 --
 Learn Graph Databases - Download FREE O'Reilly Book
 Graph Databases is the definitive new guide to graph databases and
 their applications. This 200-page book is written by three acclaimed
 leaders in the field. The early access version is available now.
 Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to make matplotlib use my own libpng over the systemwide

2013-05-06 Thread Michael Droettboom
On 05/03/2013 02:41 PM, Ondřej Čertík wrote:
 Hi,

 As part of building matplotlib for the one python based distribution [1],
 I want to always link against our own version of libpng, even if there
 is some other systemwide version available. I am on linux (Ubuntu).

 Currently, here is what I am doing:

 CFLAGS=-I$PNG/include -I$FREETYPE/include
 -I$FREETYPE/include/freetype2 LDFLAGS=-L$FREETYPE/lib -L$PNG/lib
 -Wl,-rpath=$PNG/lib $PYTHON/bin/python setup.py build
 $PYTHON/bin/python setup.py install
This *should* work. Can you provide a full build log of a clean build?

Mike

--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to make matplotlib use my own libpng over the systemwide

2013-05-06 Thread Michael Droettboom
My understanding is that distutils builds up the commandline arguments 
for gcc in this order:


  1) From Python's Makefile.
  2) From environment variables
  3) From whatever was added by the setup.py script

It looks like you have some extra stuff in (1), namely

-L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu

You can find the Python Makefile that is being used to source this 
information here:


 from distutils import sysconfig
 sysconfig.get_makefile_filename()

You can edit that file, though obviously that's a bit of a hack.

I've run into this problem before, and there doesn't seem to be any good 
way around it -- i.e. there doesn't seem to be a way to insert local 
environment variables in front of the global Python configuration.  
Reason number #47 why distutils is a poor build system for C/C++ code.


Mike


On 05/06/2013 05:03 PM, Ondřej Čertík wrote:

On Mon, May 6, 2013 at 7:18 AM, Michael Droettboom md...@stsci.edu wrote:

On 05/03/2013 02:41 PM, Ondřej Čertík wrote:

Hi,

As part of building matplotlib for the one python based distribution [1],
I want to always link against our own version of libpng, even if there
is some other systemwide version available. I am on linux (Ubuntu).

Currently, here is what I am doing:

CFLAGS=-I$PNG/include -I$FREETYPE/include
-I$FREETYPE/include/freetype2 LDFLAGS=-L$FREETYPE/lib -L$PNG/lib
-Wl,-rpath=$PNG/lib $PYTHON/bin/python setup.py build
$PYTHON/bin/python setup.py install

This *should* work. Can you provide a full build log of a clean build?

Sure:

https://gist.github.com/certik/5528134

The build was produced by the build.sh script, also in the gist.

On the line 48 (https://gist.github.com/certik/5528134#file-mpl_log-txt-L48)
you can see where our own PNG lib is:

[matplotlib] lrwxrwxrwx 1 ondrej cnls 11 May  3 11:48
/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/png/qhle/lib/libpng.so
- libpng16.so
[matplotlib] lrwxrwxrwx 1 ondrej cnls 18 May  3 11:48
/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/png/qhle/lib/libpng16.so
- libpng16.so.16.2.0

as printed by the line 5 in build.sh:

echo Our PNG library:
ls -l $PNG/lib/libpng*.so


The actual mpl build starts at the line 52
(https://gist.github.com/certik/5528134#file-mpl_log-txt-L52). As you
can see, it found the systemwide PNG lib:

[matplotlib] OPTIONAL BACKEND DEPENDENCIES
[matplotlib] libpng: 1.2.46

and just to verify this, at the line 2636
(https://gist.github.com/certik/5528134#file-mpl_log-txt-L2636) I
print:

echo The linked PNG library:
ldd $PYTHON/lib/python2.7/site-packages/matplotlib/_png.so

which gives:

[matplotlib] The linked PNG library:
[matplotlib] linux-vdso.so.1 = (0x7fffd8bc1000)
[matplotlib] libpng12.so.0 = /lib/x86_64-linux-gnu/libpng12.so.0
(0x7f1fd0c0a000)
[matplotlib] libstdc++.so.6 =
/usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f1fd090a000)
[matplotlib] libgcc_s.so.1 = /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x7f1fd06f3000)
[matplotlib] libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0
(0x7f1fd04d6000)
[matplotlib] libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f1fd0117000)
[matplotlib] libz.so.1 = /lib/x86_64-linux-gnu/libz.so.1 (0x7f1fcfeff000)
[matplotlib] libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7f1fcfc03000)
[matplotlib] /lib64/ld-linux-x86-64.so.2 (0x7f1fd107e000)

So the systemwide png /lib/x86_64-linux-gnu/libpng12.so.0 is linked instead:

ondrej@kittiwake:~$ ls -l /lib/x86_64-linux-gnu/libpng12.so.0
lrwxrwxrwx 1 root root 18 Apr  5  2012
/lib/x86_64-linux-gnu/libpng12.so.0 - libpng12.so.0.46.0

as you can see, it is exactly the one as advertised by the mpl build
info above. So the mpl build seems consistent,
and the bug is that it finds the systemwide version before our own version.

Ondrej


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to make matplotlib use my own libpng over the systemwide

2013-05-06 Thread Michael Droettboom
Well, we could try a different approach.  matplotlib will use pkg-config 
to find its dependencies, if available.

If you can get your local libpng to include a libpng.pc (i.e. a 
pkg-config information file) and then add your local pkg-config path 
(probably
/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/profile/eoul/lib/pkgconfig) 
to the PKG_CONFIG_PATH environment variable, it should pick up the right 
name for the library as well.  If you get that working, you may be able 
to avoid setting CFLAGS and LDFLAGS explicitly and the Makefile 
modifications.

Mike



On 05/06/2013 06:53 PM, Ondřej Čertík wrote:
 On Mon, May 6, 2013 at 3:53 PM, Michael Droettboom md...@stsci.edu wrote:
 My understanding is that distutils builds up the commandline arguments for
 gcc in this order:

1) From Python's Makefile.
2) From environment variables
3) From whatever was added by the setup.py script

 It looks like you have some extra stuff in (1), namely

 -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu

 You can find the Python Makefile that is being used to source this
 information here:

 from distutils import sysconfig
 sysconfig.get_makefile_filename()
 This gives:

 In [1]: from distutils import sysconfig

 In [2]: sysconfig.get_makefile_filename()
 Out[2]: 
 '/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/profile/eoul/lib/python2.7/config/Makefile'



 You can edit that file, though obviously that's a bit of a hack.
 It contains the lines:

 CPPFLAGS=   -I. -IInclude -I$(srcdir)/Include -I/usr/include/x86_64-linux-gnu
 LDFLAGS=-L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu


 So indeed this is causing it. I think this comes from building our own
 Python, which I do with:

 --

 #!/bin/bash

 set -e

 export arch=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
 export LDFLAGS=-L/usr/lib/$arch -L/lib/$arch
 export CFLAGS=-I/usr/include/$arch
 export CPPFLAGS=-I/usr/include/$arch
 # Fix for #21:
 export HAS_HG=no
 ./configure --prefix=${PYTHONHPC_PREFIX}

 ---

 And this is a bit of a hack too, Ubuntu specific etc. I think I should
 start fixing things here.

 It just wouldn't occur to me, that remains of how I built Python would
 bite me later when building
 matplotlib.

 So to test if modifying the Python makefile fixes it, I did:

 --- Makefile.old2013-05-06 16:26:25.426440205 -0600
 +++ Makefile2013-05-06 16:27:05.282439550 -0600
 @@ -73,8 +73,8 @@
   # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py 
 to
   # be able to build extension modules using the directories specified in the
   # environment variables
 -CPPFLAGS=-I. -IInclude -I$(srcdir)/Include 
 -I/usr/include/x86_64-linux-gnu
 -LDFLAGS=-L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu
 +CPPFLAGS=-I. -IInclude -I$(srcdir)/Include
 +LDFLAGS=
   LDLAST=
   SGI_ABI=
   CCSHARED=-fPIC

 but mpl build system still shows the system one. The _png.so is built with:

 [matplotlib] g++ -pthread -shared
 -L/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/freetype/lfqj/lib
 -L/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/png/qhle/lib
 -Wl,-rpath=/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/png/qhle/lib
 -I/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/png/qhle/include
 -I/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/freetype/lfqj/include
 -I/auto/nest/nest/u/ondrej/repos/python-hpcmp2/opt/freetype/lfqj/include/freetype2
 build/temp.linux-x86_64-2.7/src/_png.o
 build/temp.linux-x86_64-2.7/src/mplutils.o
 build/temp.linux-x86_64-2.7/CXX/IndirectPythonInterface.o
 build/temp.linux-x86_64-2.7/CXX/cxxsupport.o
 build/temp.linux-x86_64-2.7/CXX/cxx_extensions.o
 build/temp.linux-x86_64-2.7/CXX/cxxextensions.o -L/usr/local/lib
 -L/usr/lib -lpng12 -lz -lstdc++ -lm -o
 build/lib.linux-x86_64-2.7/matplotlib/_png.so

 Which in my opinion looks good -- my own version of PNG is offered
 first on the gcc command line. But the -lpng12 part spoils it --- that
 forces gcc to use the systemone, because my own version is newer.


 So I think that part of the problem gets fixed by modifying the Python
 Makefile, but the other part of the problem is how to force distutils
 to look for my PNG version before the systemwide. Any ideas?

 Maybe it is something that is added by the mpl setup.py script.

 I've run into this problem before, and there doesn't seem to be any good way
 around it -- i.e. there doesn't seem to be a way to insert local environment
 variables in front of the global Python configuration.  Reason number #47
 why distutils is a poor build system for C/C++ code.
 This is amazingly broken.

 Ondrej


--
Learn Graph Databases - Download FREE O'Reilly Book
Graph Databases is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your

Re: [Matplotlib-users] wxPython Phoenix - backend_wxagg

2013-05-03 Thread Michael Droettboom

Would you mind submitting this as a pull request?

Mike

On 04/27/2013 06:23 PM, Werner F. Bruhin wrote:

Hi Michael,

On 26/04/2013 14:40, Michael Droettboom wrote:

On 04/26/2013 02:57 AM, Werner F. Bruhin wrote:

Hi,

Anyone can provide some info on what agg.buffer_rgba returns and 
maybe

even some suggestion on how to resolve this issue in the wxagg backend.

It returns a Python buffer object on Python 2, though on Python 3 it is
a memoryview, since buffer was deprecated.  Perhaps wx is also doing
something different depending on the version of Python.
As of Phoenix 2.9.5.81-r73873 matplot works with Phoenix, here is 
Robin Dunn's comment to the change he did on Phoenix with regards to 
the buffer handling.


Quote

The new buffer APIs go as far back as 2.6, IIRC, and the memoryview 
and bytearray object types are available in 2.7 in addition to 3.x and 
that I what I'm using in Phoenix.  I would have expected MPL to do so 
also since numpy is an integral part of MPL and the new buffer 
interface was basically designed for and by numpy...


Anyway, while double checking all this I realized that it would not be 
hard for me to accept old or new buffer objects for source buffers 
(I'll still use memoryviews or bytearrays when on the producer side of 
things) so try again after the next snapshot build.  My unittests with 
array.arrrays started working after the change so I expect that MPL's 
rgba buffer should work too.


EndQuote

Enclosed is the patch for backend_wx.py and for embedding_in_wx5.py 
which I used for testing, in the later I use wxversion.select to force 
selection of a particular version - I think the distribution should 
still just use ensureMinimal.


FYI, documentation for wxPython Phoenix are here:
http://wxpython.org/Phoenix/docs/html/index.html

And snapshots can be found here:
http://wxpython.org/Phoenix/snapshot-builds/

I tested only on Python 2.7.2 on Windows 7.

Werner


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


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


--
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] wxPython Phoenix - backend_wxagg

2013-05-03 Thread Michael Droettboom
FWIW: Matplotlib uses the older buffer interface because that is what 
the older version of wx used (as well as other GUI toolkits).  It would 
be nice to move to the new memoryview objects, but all of the GUI 
frameworks will need to move in tandem...


Mike

On 04/27/2013 06:23 PM, Werner F. Bruhin wrote:

Hi Michael,

On 26/04/2013 14:40, Michael Droettboom wrote:

On 04/26/2013 02:57 AM, Werner F. Bruhin wrote:

Hi,

Anyone can provide some info on what agg.buffer_rgba returns and 
maybe

even some suggestion on how to resolve this issue in the wxagg backend.

It returns a Python buffer object on Python 2, though on Python 3 it is
a memoryview, since buffer was deprecated.  Perhaps wx is also doing
something different depending on the version of Python.
As of Phoenix 2.9.5.81-r73873 matplot works with Phoenix, here is 
Robin Dunn's comment to the change he did on Phoenix with regards to 
the buffer handling.


Quote

The new buffer APIs go as far back as 2.6, IIRC, and the memoryview 
and bytearray object types are available in 2.7 in addition to 3.x and 
that I what I'm using in Phoenix.  I would have expected MPL to do so 
also since numpy is an integral part of MPL and the new buffer 
interface was basically designed for and by numpy...


Anyway, while double checking all this I realized that it would not be 
hard for me to accept old or new buffer objects for source buffers 
(I'll still use memoryviews or bytearrays when on the producer side of 
things) so try again after the next snapshot build.  My unittests with 
array.arrrays started working after the change so I expect that MPL's 
rgba buffer should work too.


EndQuote

Enclosed is the patch for backend_wx.py and for embedding_in_wx5.py 
which I used for testing, in the later I use wxversion.select to force 
selection of a particular version - I think the distribution should 
still just use ensureMinimal.


FYI, documentation for wxPython Phoenix are here:
http://wxpython.org/Phoenix/docs/html/index.html

And snapshots can be found here:
http://wxpython.org/Phoenix/snapshot-builds/

I tested only on Python 2.7.2 on Windows 7.

Werner


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


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


--
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with sans-serif fonts and tick labels with TeX

2013-05-03 Thread Michael Droettboom

On 05/02/2013 03:16 PM, Paul Hobson wrote:


On Thu, May 2, 2013 at 11:19 AM, Michael Droettboom md...@stsci.edu 
mailto:md...@stsci.edu wrote:


I think the confusion here stems from the fact that you're mixing
TeX and non-TeX font commands.

This turns on TeX mode, so all of the text is rendered with an
external TeX installation:

rc('text', usetex=True)

In this line, setting it to sans-serif will get passed along to
TeX, but a specific ttf font name can not be used by TeX, so the
second part (involving Helvetica) is ignored.  And setting the
default body text in TeX does not (by default) change the math
font.  This is (unfortunately standard TeX behavior).

rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})

This affects the font set used by matplotlib's internal mathtext
renderer, and has no effect on TeX:

rc('mathtext', fontset='stixsans')

The solution I use when I want all sans-serif out of TeX is to use
the cmbright package, which can be turned on by adding:

rc('text.latex', preamble=r'\usepackage{cmbright}')

That may require installing the cmbright LaTeX package if you
don't already have it.

I know all this stuff is confusing, but providing a flat interface
over both the internal text rendering and the TeX rendering isn't
really possible -- they have different views of the world -- and
I'm actually not sure it's desirable.  Though I wonder if we
couldn't make it more obvious (somehow) when the user is mixing
configuration that applies to the different contexts.

Mike


Mike,

Thanks for the guidance. I know this stuff is complicated and the work 
everyone has put into it to make it work is fantastic.


I now see that this was more of TeX issue than an MPL configuration 
issue. Your help prompted me to find this solution (similar to yours):

mpl.rcParams['text.latex.preamble'] = [
   r'\usepackage{siunitx}',   # i need upright \micro symbols, but 
you need...
   r'\sisetup{detect-all}',   # ...this to force siunitx to 
actually use your fonts

   r'\usepackage{helvet}',# set the normal font here
   r'\usepackage{sansmath}',  # load up the sansmath so that math 
- helvet

   r'\sansmath']  # - tricky! -- gotta actually tell tex to use!


Wow.  That's some serious TeX voodoo magic!  Want to work that into an 
example that we could include in the docs?


Cheers,
Mike
--
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with 2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problems with sans-serif fonts and tick labels with TeX

2013-05-02 Thread Michael Droettboom
I think the confusion here stems from the fact that you're mixing TeX 
and non-TeX font commands.


This turns on TeX mode, so all of the text is rendered with an external 
TeX installation:


rc('text', usetex=True)

In this line, setting it to sans-serif will get passed along to TeX, but 
a specific ttf font name can not be used by TeX, so the second part 
(involving Helvetica) is ignored.  And setting the default body text in 
TeX does not (by default) change the math font.  This is (unfortunately 
standard TeX behavior).


rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})

This affects the font set used by matplotlib's internal mathtext 
renderer, and has no effect on TeX:


rc('mathtext', fontset='stixsans')

The solution I use when I want all sans-serif out of TeX is to use the 
cmbright package, which can be turned on by adding:


rc('text.latex', preamble=r'\usepackage{cmbright}')

That may require installing the cmbright LaTeX package if you don't 
already have it.


I know all this stuff is confusing, but providing a flat interface over 
both the internal text rendering and the TeX rendering isn't really 
possible -- they have different views of the world -- and I'm actually 
not sure it's desirable.  Though I wonder if we couldn't make it more 
obvious (somehow) when the user is mixing configuration that applies to 
the different contexts.


Mike

On 05/02/2013 11:58 AM, Paul Hobson wrote:

Hey folks,

I'm having trouble getting a consistent sans-serif font in my figures:
https://gist.github.com/phobson/5503195 (see attached output)

This is pretty much the same issue as this Stack Overflow post:
http://stackoverflow.com/questions/12322738/how-do-i-change-the-axis-tick-font-in-a-matplotlib-plot-when-rendering-using-lat

But, the end result I'm looking for is to process the whole figure 
through latex and have sans-serif fonts everywhere, even in math text.


The accepted solution on SO is to manually set the font properties of 
the ticks for the figure prior to saving.


Is there a configuration-based work around for this? I'd like to avoid 
having to pick through everywhere that I call fig.savefig and manually 
set tick font properties if possible.


Thanks,
-Paul



--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1


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


--
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] wxPython Phoenix - backend_wxagg

2013-04-26 Thread Michael Droettboom
On 04/26/2013 02:57 AM, Werner F. Bruhin wrote:
 Hi,

 Anyone can provide some info on what agg.buffer_rgba returns and maybe
 even some suggestion on how to resolve this issue in the wxagg backend.

It returns a Python buffer object on Python 2, though on Python 3 it is 
a memoryview, since buffer was deprecated.  Perhaps wx is also doing 
something different depending on the version of Python.

 Thanks
 Werner

 P.S.
 The archive on Sourceforge for this list stops in June 2012, noticed
 this as I wanted to check if there are answers I didn't get for some reason.
 http://sourceforge.net/mailarchive/forum.php?forum_name=matplotlib-users

Yeah -- I've reported that to sourceforge many times.  Not sure what the 
issue is.  Personally, I use gmane when I need to search the archive and 
it works rather well.

Mike


 On 20/04/2013 08:58, Werner F. Bruhin wrote:
 Hi,

 I am trying to get matplotlib 1.2.0 to work with wxPython Phoenix - will
 provide a patch when it is working.

 Made the changes to backend_wx* for things like EmptyImage/EmptyBitmap
 and Toolbar but I am stuck on the following.

if bbox is None:
# agg = rgba buffer - bitmap
if 'phoenix' in wx.PlatformInfo:
return wx.Bitmap.FromBufferRGBA(int(agg.width),
 int(agg.height),
 memoryview(agg.buffer_rgba()))
else:
return wx.BitmapFromBufferRGBA(int(agg.width), 
 int(agg.height),
   agg.buffer_rgba())
else:
# agg = rgba buffer - bitmap = clipped bitmap
return _WX28_clipped_agg_as_bitmap(agg, bbox)

 TypeError: cannot make memory view because object does not have the
 buffer interface
 File h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py, line 63, in
 module
  demo()
 File h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py, line 60, in demo
  app.MainLoop()
 File c:\Python27\Lib\site-packages\wx-2.9.6-msw-phoenix\wx\core.py,
 line 1841, in MainLoop
  rv = wx.PyApp.MainLoop(self)
 File c:\Python27\Lib\site-packages\matplotlib\backends\backend_wx.py,
 line 1209, in _onPaint
  self.draw(drawDC=drawDC)
 File
 c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py,
 line 61, in draw
  self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
 File
 c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py,
 line 173, in _convert_agg_to_wx_bitmap
  memoryview(agg.buffer_rgba()))

 I tried using memoryview based on a suggestion by Robin Dunn, and
 based on the following info I see in the debugger that should work no?

 agg.buffer_rgba()
 read-write buffer ptr 0x05400638, size 229200 at 0x055FC680
 type(agg.buffer_rgba())
 type 'buffer'
 agg
 matplotlib.backends.backend_agg.RendererAgg instance at 0x04BA0670

 If I don't use memoryview (which would probably be preferred) I get
 the following exception.

 Can someone help us figure this one out.

 Thanks
 Werner


 TypeError: Bitmap.FromBufferRGBA(): argument 3 has unexpected type 'buffer'
 File h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py, line 63, in
 module
  demo()
 File h:\devProjectsT\aaTests\matplotlib\wxembedding-5.py, line 60, in demo
  app.MainLoop()
 File c:\Python27\Lib\site-packages\wx-2.9.6-msw-phoenix\wx\core.py,
 line 1841, in MainLoop
  rv = wx.PyApp.MainLoop(self)
 File c:\Python27\Lib\site-packages\matplotlib\backends\backend_wx.py,
 line 1209, in _onPaint
  self.draw(drawDC=drawDC)
 File
 c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py,
 line 61, in draw
  self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
 File
 c:\Python27\Lib\site-packages\matplotlib\backends\backend_wxagg.py,
 line 173, in _convert_agg_to_wx_bitmap
  agg.buffer_rgba())

 --
 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


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

Re: [Matplotlib-users] matplotlib and opensuse 12.3

2013-04-25 Thread Michael Droettboom

I believe this PR fixes this bug:

https://github.com/matplotlib/matplotlib/pull/1884

I had been waiting for the original poster to confirm before merging, 
but I think I'll go ahead and do this anyway at this point.


Mike

On 04/23/2013 02:57 PM, Nils Wagner wrote:

Hi all,

I cannot install matplotlib. Please find enclosed the logfile of
python setup.py install --prefix=$HOME/local  log.txt

Any idea how to resolve the problem is appreciated.

Thanks in advance.
   Nils



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


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


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


Re: [Matplotlib-users] Save pdf with plot_surface

2013-04-21 Thread Michael Droettboom
Just curious -- where is the formula for matplotlib in homebrew?  I 
can't find it.  I thought I would look into why that was failing -- it 
may just be simply that it's an old version of matplotlib and this bug 
is now fixed in the latest release.


Mike

On 04/20/2013 11:12 PM, Derek Thomas wrote:
I was able to fix this by uninstalling the matplotlib from homebrew 
and installing with pip.



On Sat, Apr 20, 2013 at 9:33 AM, Derek Thomas derekctho...@gmail.com 
mailto:derekctho...@gmail.com wrote:


This may be known, but the following modified example from
http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html fails
with a TypeError at matplotlib/backends/backend_pdf.pyc in
draw_path_collection.  Is it possible to save pdf files with
surface plots?

from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.gca(projection='3d')
X = np.arange(-5, 5, 0.25)
Y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
cmap=cm.coolwarm,
linewidth=0, antialiased=False)
ax.set_zlim(-1.01, 1.01)

ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))

fig.colorbar(surf, shrink=0.5, aspect=5)
fig.savefig('test.pdf')
plt.show()




--
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


--
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] Trying to migrate to Python 3.2, Matplotlib 1.2.1

2013-04-19 Thread Michael Droettboom



On 04/19/2013 01:59 AM, C M wrote:



On Thu, Apr 18, 2013 at 11:03 PM, John Ladasky 
john_lada...@sbcglobal.net mailto:john_lada...@sbcglobal.net wrote:


.
Reading more, I realize that the way I was getting GUI output
previously
(with Python 2.7 and Matplotlib 1.1) was through wxPython.
Unfortunately, it appears that wxPython's star is fading, and a Python
3-compatible version will not be written.  In fact, wxPython hasn't
released a new version in nine months.


wxPython is alive and well and the newest developmental version of it 
(Phoenix) runs on Python 3. It should be released fairly soon.  One 
of the wxPython list regulars mentioned getting his software to run 
with it, with a few minor issues, just six days ago.  So you might 
want to give Phoenix a try.
That's great news.  Unfortunately, I'm not aware of any testing with it 
and matplotlib on Python 3, so for someone who just wants to get things 
to work, I would still recommend Tk, gtk or Qt4 on Python3.


Mike
--
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] TypeError: unsupported operand type(s) for +: 'NoneType' and 'float' on 1.2.1

2013-04-18 Thread Michael Droettboom
Can you please provide a complete, minimal and self-contained script 
that reproduces the error?  The example below has many undefined 
variables etc.

Cheers,
Mike

On 04/16/2013 07:09 PM, Christophe Pettus wrote:
 # preamble code collecting data

  ind = np.arange(len(table_name))
  
  width = 0.35
  
  fig = plot.figure(figsize=DEFAULT_FIGURE_SIZE)
  ax = fig.add_subplot(111, axisbg='#fafafa', alpha=0.9)
  
  ax.set_title('Largest Tables')
  
  ax.set_xlabel('Size (log scale)')
  
  ax.set_xscale('log')
  ax.grid(True)
  
  ax.xaxis.set_major_formatter(FuncFormatter(magnitude_ticks))

  dbar = ax.barh(ind, data_size, width, linewidth=0, color='blue', 
 label='Main Data')  # exception here
  ibar = ax.barh(ind, index_toast_size, width, left=data_size, 
 linewidth=0, color='red', label='Toast/Indexes')
  ax.set_yticks(ind + width/2)
  ax.set_yticklabels(table_name, fontproperties=xx_small_font)

  ax.legend(loc='lower right', prop=x_small_font)

  plot.tight_layout()
  
  plot.savefig(REPORT_DIR_PATH + '/table_sizes.pdf')

  plot.close()


--
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] difficult LaTeX formula for rendering

2013-03-28 Thread Michael Droettboom
matplotlib does not support the `\begin{array}` construct.  You can see 
what is supported here:


http://matplotlib.org/users/mathtext.html

If you need something like that in Sphinx, there are a number of other 
math plugins here:


http://sphinx-doc.org/ext/math.html

Mike

On 03/28/2013 02:45 AM, Ilias Miroslav wrote:

Hi again,

if you did not receive the attachement of my previous email, the files are here:

https://docs.google.com/folder/d/0B8qBHKNhZAipZ2pnS0ViTUZBdXM/edit?usp=sharing

The log of the simplest non-rendering formula:

.. math::
  \begin{array}{c}
  {\Psi}^{L} \\
  {\Psi}^{S}
  \end{array}

is as follows:

ilias@miro_ilias_desktop:~/Dokumenty/Work/programming/sphinx-math-test/.sphinx-build
 .  .
Running Sphinx v1.1.3

loading pickled environment... not yet created
No builder selected, using default: html
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
/usr/lib/pymodules/python2.7/matplotlib/sphinxext/mathmpl.py:56: Warning: Could 
not render math expression $\begin{array}{c}{\Psi}^{L} \\{\Psi}^{S}\end{array}$
   Warning)
#
writing additional files... genindex search
copying static files... done
dumping search index... done
dumping object inventory... done
build succeeded.


Best, Miro


From: Ilias Miroslav
Sent: Wednesday, March 27, 2013 8:28 PM
To: matplotlib-users@lists.sourceforge.net
Subject: difficult LaTeX formula for rendering

Dear experts,

in our sphinx-based project documentation (www.diracprogram.org) we have a 
complicated latex math formula, which is not rendered:

/usr/lib/pymodules/python2.7/matplotlib/sphinxext/mathmpl.py:56: Warning: Could 
not render math expression $i \hbar \frac{\partial}{\partial t} \left( 
\begin{array}{c}\Psi^L \\\Psi^S \end{array} \right) = c  \left( 
\begin{array}{c}(\vec{\sigma} \cdot \vec{\pi}) \Psi^S \\(\vec{\sigma} \cdot 
\vec{\pi}) \Psi^L \end{array} \right)+ m_ec^2  \left( \begin{array}{c} \Psi^L 
\\-\Psi^S \end{array} \right) + V  \left( \begin{array}{c}\Psi^L \\\Psi^S 
\end{array} \right)$

The index.rst file with the sole math formula is attached.

I have most recent Ubuntu 12.10 (x86_64) with default packages python-sphinx 
1.1.2, python-matplotlib 1.1.1.

Any help, please ? I was trying to cut this formula down; the smallest LaTeX part not 
rendered is \begin{array}{c}\Psi^L \\ \Psi^S \end{array}.

Yours,

Miro
--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] ANN: matplotlib 1.2.1 release

2013-03-27 Thread Michael Droettboom
I'm pleased to announce the release of matplotlib 1.2.1.  This is a bug 
release and improves stability and quality over the 1.2.0 release from 
four months ago.  All users on 1.2.0 are encouraged to upgrade.


Since github no longer provides download hosting, our tarballs and 
binaries are back on SourceForge, and we have a master index of 
downloads here:


http://matplotlib.org/downloads http://matplotlib.org/downloads.html

Highlights include:

- Usage of deprecated APIs in matplotlib are now displayed by default on 
all Python versions
- Agg backend: Cleaner rendering of rectilinear lines when snapping to 
pixel boundaries, and fixes rendering bugs when using clip paths

- Python 3: Fixes a number of missed Python 3 compatibility problems
- Histograms and stacked histograms have a number of important bugfixes
- Compatibility with more 3rd-party TrueType fonts
- SVG backend: Image support in SVG output is consistent with other backends
- Qt backend: Fixes leaking of window objects in Qt backend
- hexbin with a log scale now works correctly
- autoscaling works better on 3D plots
- ...and numerous others.

Enjoy!  As always, there are number of good ways to get help with 
matplotlib listed on the homepage at http://matplotlib.org/ and I thank 
everyone for their continued support of this project.


Mike Droettboom
--
Own the Future-Intelreg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] removing paths inside polygon

2013-03-22 Thread Michael Droettboom

See https://github.com/matplotlib/matplotlib/pull/1846

On 03/22/2013 11:17 AM, Michael Droettboom wrote:

It's puzzler.  I'm looking at it now.

Mike

On 03/22/2013 06:33 AM, Andrew Dawson wrote:
Thanks, the clipping is working now. But as you say the weird line 
width issue still remains for Agg (and png, perhaps that uses Agg, I 
don't know...). PDF output looks correct.



On 20 March 2013 05:48, Jae-Joon Lee lee.j.j...@gmail.com 
mailto:lee.j.j...@gmail.com wrote:



On Wed, Mar 13, 2013 at 2:17 AM, Andrew Dawson
daw...@atm.ox.ac.uk mailto:daw...@atm.ox.ac.uk wrote:

You should see that the circle is no longer circular, and
also there are weird line width issues. What I want it
basically exactly like the attached without_clipping.png but
with paths inside the circle removed.


The reason that circle is no more circle is that simply inverting
the vertices does not always results in a correctly inverted path.
Instead of following line.

interior.vertices = interior.vertices[::-1]

You should use something like below.

interior = mpath.Path(np.concatenate([interior.vertices[-2::-1],
interior.vertices[-1:]]),
interior.codes)

It would be good if we have a method to invert a path.

This will give you a circle. But the weird line width issue
remains. This seems to be an Agg issue, and the line width seems
to depend on the dpi.
I guess @mdboom nay have some insight on this.

Regards,

-JJ




--
Dr Andrew Dawson
Atmospheric, Oceanic  Planetary Physics
Clarendon Laboratory
Parks Road
Oxford OX1 3PU, UK
Tel: +44 (0)1865 282438
Email: daw...@atm.ox.ac.uk mailto:daw...@atm.ox.ac.uk
Web Site: http://www2.physics.ox.ac.uk/contacts/people/dawson


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


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




--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


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


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


[Matplotlib-users] SciPy John Hunter Excellence in Plotting Contest

2013-03-08 Thread Michael Droettboom

Apologies for any accidental cross-posting.

Email not displaying correctly? View it in your browser. 
http://us1.campaign-archive1.com/?u=e91b4574d5d1709a9dc4f7ab7id=999d7ba343e=7c1fb2879c 



Scientific Computing with Python-Austin, Texas-June 24-29, 2013


 SciPy John Hunter Excellence in Plotting Contest

In memory of John Hunter, we are pleased to announce the first SciPy 
John Hunter Excellence in Plotting Competition. This open competition 
aims to highlight the importance of quality plotting to scientific 
progress and showcase the capabilities of the current generation of 
plotting software. Participants are invited to submit scientific plots 
to be judged by a panel. The winning entries will be announced and 
displayed at the conference.


NumFOCUS is graciously sponsoring cash prizes for the winners in the 
following amounts:


 * 1st prize: $500
 * 2nd prize: $200
 * 3rd prize: $100


   Instructions

 * Entries must be submitted by April 3 via e-mail
   mailto:plotting-cont...@scipy.org.
 * Plots may be produced with any combination of Python-based tools (it
   is not required that they use matplotlib, for example).
 * Source code for the plot must be provided, along with a rendering of
   the plot in a vector format (PDF, PS, etc.). If the data can not be
   shared for reasons of size or licensing, fake data may be
   substituted, along with an image of the plot using real data.
 * Entries will be judged on their clarity, innovation and aesthetics,
   but most importantly for their effectiveness in illuminating real
   scientific work. Entrants are encouraged to submit plots that were
   used during the course of research, rather than merely being
   hypothetical.
 * SciPy reserves the right to display the entry at the conference, use
   in any materials or on its website, providing attribution to the
   original author(s).


   Important dates:

 * April 3rd: Plotting submissions due
 * Monday-Tuesday, June 24 - 25: SciPy 2013 Tutorials, Austin TX
 * Wednesday-Thursday, June 26 - 27: SciPy 2013 Conference, Austin TX *
   Winners will be announced during the conference days
 * Friday-Saturday, June 27 - 28: SciPy 2013 Sprints, Austin TX  remote

We look forward to exciting submissions that push the boundaries of 
plotting, in this, our first attempt at this kind of competition.


The SciPy Plotting Contest Organizer

-Michael Droettboom, Space Telescope Science Institute
You are receiving this email because you subscribed to the mailing list 
or registered for the SciPy 2010 or SciPy 2011 conference in Austin, TX.


Unsubscribe 
http://scipy.us1.list-manage.com/unsubscribe?u=e91b4574d5d1709a9dc4f7ab7id=069dcb6ee4e=7c1fb2879cc=999d7ba343 
mdb...@gmail.com mailto:mdb...@gmail.com from this list | Forward to a 
friend 
http://us1.forward-to-friend1.com/forward?u=e91b4574d5d1709a9dc4f7ab7id=999d7ba343e=7c1fb2879c 
| Update your profile 
http://scipy.us1.list-manage.com/profile?u=e91b4574d5d1709a9dc4f7ab7id=069dcb6ee4e=7c1fb2879c 


*Our mailing address is:*
Enthought, Inc.
515 Congress Ave.
Austin, TX 78701

Add us to your address book 
http://scipy.us1.list-manage.com/vcard?u=e91b4574d5d1709a9dc4f7ab7id=069dcb6ee4


/Copyright (C) 2013 Enthought, Inc. All rights reserved./




--
Michael Droettboom
http://www.droettboom.com/




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


Re: [Matplotlib-users] Missing Edit Curves... button in NavigationToolbar2Wx

2013-02-27 Thread Michael Droettboom

That feature is specific to the Qt4 backend.

Mike

On 02/27/2013 02:23 PM, Jonno wrote:
Can anyone explain to me why I don't see the Edit Curves Line and 
Axes Parameters button in the matplotlib toolbar when using 
matplotlib.backends.backend_wxagg.NavigationToolbar2Wx


The example code here creates a Matplotlib plot with the matplotlib 
toolbar including all buttons except for the one above.



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb


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


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


Re: [Matplotlib-users] CMYK

2013-01-30 Thread Michael Droettboom
We don't currently have any support -- and we're still struggling in 
certain areas supporting RGBA consistently across the system.

I think this would take someone writing a MEP (as a preliminary study of 
all of the changes that would be involved) and then shepherding it 
through implementation.

Mike

On 01/30/2013 11:10 AM, Ignas Anikevičius wrote:
 On 29/01/13 03:37:51 -0800, Dieter wrote:
 I was wondering if anything changed regarding this within the last 2.5 years
 since the last thread. Is there a way to produce CMYK with matplotlib?
 Hello everybody,

 I would be also interested in how to produce CMYK graphics without
 external fiddling.

 Cheers,
 Ignas

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


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


Re: [Matplotlib-users] Problems installing matplotlib - compiling error

2013-01-28 Thread Michael Droettboom
As a shortcut, you can also install all of the build dependencies for a 
package (without installing the package itself) using:

sudo apt-get build_dep python-matplotlib

Mike

On 01/28/2013 01:40 PM, Orgun wrote:
 Thanks, that helped a lot! I don't know why the dev-package hasn't been
 installed. That has been the first think I thought I did when re-installing
 after my latest hardware change in December.

 Thanks a lot. That saved my day.

 Christian



 --
 View this message in context: 
 http://matplotlib.1069221.n5.nabble.com/Problems-installing-matplotlib-compiling-error-tp40343p40345.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.

 --
 Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
 MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
 with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
 MVPs and experts. ON SALE this month only -- learn more at:
 http://p.sf.net/sfu/learnnow-d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] BUG: RuntimeError: dictionary changed size during iteration

2013-01-23 Thread Michael Droettboom

Does this pull request:

https://github.com/matplotlib/matplotlib/pull/1697

fix your issue?  I have no way of knowing without a test case...

Mike

On 01/22/2013 08:33 AM, Massimiliano Costacurta wrote:

Hello everyone,

in my program I'm encountering an error when calling the function 
axes.set_xticks (Matplotlib 1.2.0 on python 2.7-64 bit). It is really 
difficult for me to build a test case, because my program is really 
complex. Here is the error traceback:


File C:\Python27\Lib\site-packages\matplotlib\axes.py, line 2596, in 
set_xticks

  return self.xaxis.set_ticks(ticks, minor=minor)
File C:\Python27\Lib\site-packages\matplotlib\axis.py, line 1489, in 
set_ticks

  self.set_view_interval(min(ticks), max(ticks))
File C:\Python27\Lib\site-packages\matplotlib\axis.py, line 1771, in 
set_view_interval

  max(vmin, vmax, Vmax))
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
932, in _set_intervalx

  self.invalidate()
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
131, in invalidate

  return self._invalidate_internal(value, invalidating_node=self)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
155, in _invalidate_internal

  invalidating_node=self)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
155, in _invalidate_internal

  invalidating_node=self)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
155, in _invalidate_internal

  invalidating_node=self)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
2141, in _invalidate_internal

  invalidating_node=invalidating_node)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
155, in _invalidate_internal

  invalidating_node=self)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
2141, in _invalidate_internal

  invalidating_node=invalidating_node)
File C:\Python27\Lib\site-packages\matplotlib\transforms.py, line 
153, in _invalidate_internal

  for parent in self._parents.itervalues():
File C:\Python27\Lib\weakref.py, line 147, in itervalues
  for wr in self.data.itervalues():
RuntimeError: dictionary changed size during iteration

I googled and found that this is a well known bug due to the use of 
self.data.itervalues() in the for loop (i think the correct syntax 
should be for wr in iter(self.data.items()). So I would like to point 
out the bug (if it is) to the matplotlib guys, how can I do it?
In the meantime, how can I work around it without changing the source 
code?

Thanks in advance!


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d


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


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib lag on windows seven

2013-01-17 Thread Michael Droettboom
Which backends are you using on each platform.  A difference there is 
the most likely culprit.


Mike

On 01/17/2013 08:16 AM, Fabien Lafont wrote:

Hello everyone,

I've just changed my computer from a old core 2 duo on windows Xp to a 
intel Xeon with 12 Gb Ram. I've installed matplotlib but I plot a 
graph it's about 10 times slower than windows Xp to pan the axis or 
move the graph. Even if I'm plotting something very simple like that:


from pylab import *

x = [0,1,2]

plot(x,x)

show()


Do you have any idea?


Thanks,


Fabien



--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712


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


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2013-01-17 Thread Michael Droettboom
Christoph,

The patch you attach looks like it might be helpful to us.  I'll 
investigate further.

Mike

On 01/17/2013 12:10 PM, Christoph Gohlke wrote:
 I can reproduce this. The Windows 8 Arial font is different from the one
 in Windows 7. It seems other projects encountered and fixed the same
 issue: http://code.google.com/p/sumatrapdf/issues/detail?id=2056

 Christoph


 On 1/17/2013 7:20 AM, Michael Droettboom wrote:
 Is the Arial font file different on Windows 8 vs. Windows 7?  (Just a
 difference in file size would be enough to know).  If so, it's probably
 the nature of those differences that we need to look into.

 Mike

 On 01/16/2013 10:04 AM, CAB wrote:
 Dear Mike  Paul,
 Thanks for your replies.  I tried Mike's protocol, and I found that
 font_manager found the Arial font (C:\\Windows\\fonts\\Arial.ttf) in
 the right place.  I don't have fontforge yet, so I guess I need to
 install and check it out.
 But the thing that bothers me about this error is that it only occurs
 if I try to mix mathtext and non-matplotlib font.  So matplotlib finds
 Arial just fine.  And it finds the mathtext font fine.  Only the
 mixture is fatal.  It's as if the parser loses track of the Arial
 font, or it looks for a mathtext glyph in Arial.  Very strange that it
 occurs only in Windows 8.
 Regarding Paul's response, I don't have LaTeX on the W8 computer, and
 my impression is that mathtext doesn't look for mathematical Arial,
 instead there are some packaged fonts that it uses for this purpose,
 like Computer Modern and STIX.
 I'll try to hunt this down further, and let you know if I find anything.
 Best,
 Chad

 *From:* Michael Droettboom md...@stsci.edu
 *To:* matplotlib-users@lists.sourceforge.net
 *Sent:* Thursday, January 10, 2013 7:35 AM
 *Subject:* Re: [Matplotlib-users] mathtext and fonts under Windows 8

 Since this is specific to Windows 8, I wonder if the Arial font has
 been updated in that version.  If it's a newer OTF font, rather than a
 TTF font, it's possible matplotlib can't read it correctly.

 You can see what font file is on each platform by starting up a Python
 prompt and doing:

 from matplotlib import font_manager
 font_manager.findfont(Arial)

 It should display the path to the font.  From that, you should be able
 to get the Arial file on each of your platforms and see if they are
 different.  To get more details, you could open them up in the open
 source fontforge tool.  Sorry I can't do this myself, as I don't
 have access to anything past XP.

 If the fonts turn out to be different, as a workaround, you could try
 backing up and then replacing the Arial font on your Windows 8 machine
 with the one on your Windows 7 machine.

 Cheers,
 Mike

 On 01/09/2013 11:59 PM, Paul Hobson wrote:
 Sounds like it might have something to do with your Latex
 installation (if any) or the barebones Latex-rendering done by MPL
 alone. Namely, they simply don't have the characters for mathematical
 Arial available.

 Not too sure though. Hopefully someone more knowledgeable responds.
 -paul


 On Tue, Jan 8, 2013 at 9:31 PM, CAB cabr...@yahoo.com
 mailto:cabr...@yahoo.com wrote:

  Hi, All,

  I am encountering a thorny problem when trying to run matplotlib
  under Windows 8. If I label an axis using a command like

  ax.set_ylabel(r'time (s)', name='Arial'),

  all is well.  But if  try to add mathtext to that, as in

  ax.set_ylabel(r'time ($s$)', name='Arial'),

  mathtext.py http://mathtext.py/ throws an error (a very long
  stream) ending in RuntimeError: Face has no glyph names. If I
  remove the name='Arial' above and let the program default to
  Bitstream Vera Sans, the mathtext works.

  This problem does not occur under Windows 7 or XP; only under two
  different Windows 8 installations.  Any ideas what's going on?

  Chad

  
 --
  Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript,
  jQuery
  and much more. Keep your Java skills current with LearnJavaNow -
  200+ hours of step-by-step video tutorials by Java experts.
  SALE $49.99 this month only -- learn more at:
  http://p.sf.net/sfu/learnmore_122612
  ___
  Matplotlib-users mailing list
  Matplotlib-users@lists.sourceforge.net
  mailto:Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users




 --
 Master Visual Studio, SharePoint, SQL,ASP.NET  http://asp.net/, C# 2012, 
 HTML5, CSS,
 MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
 with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
 MVPs and experts. ON SALE this month only -- learn more at:
 http://p.sf.net/sfu/learnmore_122712

Re: [Matplotlib-users] Sorry, could not import Basemap in http://matplotlib.org/users/screenshots.html

2013-01-15 Thread Michael Droettboom
Thanks.  It should be restored momentarily when github fetches the new 
revision of the docs.

Mike

On 01/15/2013 11:52 AM, Alejandro Weinstein wrote:
 Hi:

 I just want to report that in the screenshots section of the website
 (http://matplotlib.org/users/screenshots.html), in the Basemap demo
 (http://matplotlib.org/users/screenshots.html#basemap-demo) section,
 instead of the plot there is a message saying Sorry, could not import
 Basemap.

 Alejandro.

 --
 Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
 and more. Get SQL Server skills now (including 2012) with LearnDevNow -
 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
 SALE $99.99 this month only - learn more at:
 http://p.sf.net/sfu/learnmore_122512
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2013-01-10 Thread Michael Droettboom
Since this is specific to Windows 8, I wonder if the Arial font has been 
updated in that version.  If it's a newer OTF font, rather than a TTF 
font, it's possible matplotlib can't read it correctly.


You can see what font file is on each platform by starting up a Python 
prompt and doing:


   from matplotlib import font_manager
   font_manager.findfont(Arial)

It should display the path to the font.  From that, you should be able 
to get the Arial file on each of your platforms and see if they are 
different.  To get more details, you could open them up in the open 
source fontforge tool.  Sorry I can't do this myself, as I don't have 
access to anything past XP.


If the fonts turn out to be different, as a workaround, you could try 
backing up and then replacing the Arial font on your Windows 8 machine 
with the one on your Windows 7 machine.


Cheers,
Mike

On 01/09/2013 11:59 PM, Paul Hobson wrote:
Sounds like it might have something to do with your Latex installation 
(if any) or the barebones Latex-rendering done by MPL alone. Namely, 
they simply don't have the characters for mathematical Arial available.


Not too sure though. Hopefully someone more knowledgeable responds.
-paul


On Tue, Jan 8, 2013 at 9:31 PM, CAB cabr...@yahoo.com 
mailto:cabr...@yahoo.com wrote:


Hi, All,

I am encountering a thorny problem when trying to run matplotlib
under Windows 8.  If I label an axis using a command like

ax.set_ylabel(r'time (s)', name='Arial'),

all is well.  But if  try to add mathtext to that, as in

ax.set_ylabel(r'time ($s$)', name='Arial'),

mathtext.py throws an error (a very long stream) ending in
RuntimeError: Face has no glyph names.  If I remove the
name='Arial' above and let the program default to Bitstream Vera
Sans, the mathtext works.

This problem does not occur under Windows 7 or XP; only under two
different Windows 8 installations.  Any ideas what's going on?

Chad


--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript,
jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712


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


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib is slow

2013-01-02 Thread Michael Droettboom
I think using the profiler is the best bet here.  We've used that in the 
past to track down things that take a long time to import quite 
successfully.  I'm not seeing any slowness here, so that is likely do to 
an environmental difference on your machine, implying you'll really need 
to run the profiler yourself.  I recommend runsnakerun to examine the 
profile output -- if you have trouble interpreting it, feel free to send 
me your raw profiler data to me off list.


Mike

On 12/31/2012 02:21 PM, C M wrote:

Resurrecting an old thread here

On Tue, Mar 29, 2011 at 3:23 PM, David Kremer da...@david-kremer.fr 
mailto:da...@david-kremer.fr wrote:


 I would recommend running the import in the Python profiler to
determine
 where most of the time is going.  When I investigated this a few
years
 back, it was mainly due to loading the GUI toolkits, which are
 understandably quite large.  You can avoid most of that by using
the Agg
 backend.  If you're using the Agg backend and still experiencing
 slowness, it may be that load-up issues have crept back into
matplotlib
 since then -- but we need profiling data to figure out where and
how.


Importing Matplotlib is very slow for me, too.  For a wxPython 
application with embedded Matplotlib, I am getting load times of  
20 seconds when cold importing matplotlib, with this (circa mid 
2004) computer setup:  Windows XP, sp3, Intel Pentium, 1.70 Ghz, 1 GB 
RAM.


This is, by the way, an import well after Python and wxPython have 
already been loaded into RAM, as it happens by a user action, so none 
of the time involved here is due to loading Python or wxPython (they 
both load more quickly--about 10 seconds to cold import them, my code, 
images, and some other libraries).


First of all:  does that amount of time seem appropriate for that fast 
of a system--or is that too long?  It definitely *feels* way too long 
from a user perspective (for comparison Word or PowerPoint loads on 
this computer in about 2.5 seconds).


Trying to improve it and following this old thread, I have switched to

matplotlib.use('Agg')

instead of

matplotlib.use('wxAgg')

as suggested to speed things up...but it is no faster.

I see, though, that I also have lines such as:

from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg

Would the presence of these imports obviate the fact that I switched 
to using the Agg instead of the wxAgg?  If so, is there any way to use 
something faster here (I suspect not but thought I'd ask).


Also, what else should I consider doing to reduce the import time 
significantly?  (I have to learn how to use the profiler, so I haven't 
done that yet).


Thanks,
Che


 Mike

Thank you a lot for your answer.

I noticed than _matplotlib.pyplot_ is longer to be imported the
first time than
if it has already been imported previously (maybe things are
already loaded in
ram memory), and we don't need to fetch it from the hard drive
thanks to the
kernel.

As far I see, the function calls are the same for the two logs I
obtained,
except than the first took 6s instead of 1.4s.




The two logs have been obtained using :
code
python -m cProfile temp.py
/code

where temp.py consist of two lines :

code
#!/usr/bin/env python2

import matplotlib.pyplot
/code






--
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
mailto:Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users




--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412


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


--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 ___
Matplotlib-users 

Re: [Matplotlib-users] compile numpy with UCS4

2012-12-20 Thread Michael Droettboom
When you recompile Python in a new unicode mode, you then need to 
recompile all extensions (such as Numpy), since an extension compiled 
for one mode will not work with the other.  Annoying if you have a lot 
of extensions.

However, I don't think that UCS4 mode is required for Tkinter -- it 
could just be that the Tkinter you have compiled was compiled against a 
Python of a different unicode mode.  (RHEL builds its python packages 
with --enable-unicode=UCS4, so if you're using the RH package for 
Tkinter with a self compiled Python, that may be what you're running into.)

Mike

On 12/19/2012 06:08 PM, Kurt Peters wrote:
 I had to compile and install Python 2.7 on RHEL with the
 --enable-unicode=USC4 to get it to work with Tkinter.  Unfortunately, I'm
 now trying to install numpy, and get an error when importing it into python
 ImportError: numpy/core/multiarray.so: undefined symbol:
 PyUnicodeUCS2_AsASCIIString.

 Is there are way to get the two to play together nicely?  Such as
 recompiling numpy with USC4 support?
 KURT


 --
 LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
 Remotely access PCs and mobile devices and provide instant support
 Improve your efficiency, and focus on delivering more value-add services
 Discover what IT Professionals Know. Rescue delivers
 http://p.sf.net/sfu/logmein_12329d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Undocumented transform API change between 1.1 and 1.2?

2012-12-18 Thread Michael Droettboom
 Is there anything we could do to give this important information a
 little more visibility on the webpage? The webpage still indicates
 that 1.2.0 is a development version.

Oops.  That's been updated.

   Perhaps we could update it to
 say:

 1.2.0 The most current stable release. Click here to see what's new
 since 1.1.1

 And have Click here link to the page Phil mentioned. Thoughts?

I think I'm fine with this, but I'll hold off a bit on making this 
change in case there are better ideas raised.

Cheers,
Mike

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 3d performance question

2012-12-18 Thread Michael Droettboom
This is a great summary of the issues related to OpenGL, and how it can 
help but is not a universal panacea.

Thanks,
Mike

On 12/18/2012 08:53 AM, Sturla Molden wrote:
 Interactive 2D plots can be sluggish too, if you have enough objects in
 them. It is not the backend that is sluggish. Replacing the backend does
 not speed up the frontend.

 OpenGL is only 'fast' if you have a frontend that exploits it (e.g. uses
 vertex buffers and vertex shaders). If you just use OpenGL for
 bitblitting an image or drawing vertices individually (glVertex*), it is
 not going to help at all.

 My impression is that whenever Matplotlib is 'too slow', I have to go
 down to the iron and use OpenGL directly. It tends to happen when there
 are too many objects to draw, and the drawing has to happen in 'real-time'.

 Observe that if we let OpenGL render to a frame buffer, we can copy its
 content into a Matplotlib canvas. Unless we are doing some really heavy
 real-time graphics, displaying the image is not going to be the speed
 limiting factor. Even though using OpenGL to swap framebuffers will be
 'faster', you will not be able to tell the difference in an interactive
 Matplotlib plotting.

 Sturla


 On 14.12.2012 15:51, Ethan Gutmann wrote:
 Hi Neal, my understanding is that matplotlib does not use OpenGL (thus
 the terrible performance you see). You might want to look into glumpy
 for mplot3d OpenGL acceleration.

 Ethan


 On Dec 14, 2012, at 5:23 AM, Neal Beckerndbeck...@gmail.com  wrote:

 I'm using fedora (17) linux.  I notice on complicated 3d plot, interactive
 performance can get sluggish.  I'm using nouveau driver now, but wondering 
 if
 installing nvidia driver will improve mpl 3d performance?  Does mpl use 
 opengl?


 --
 LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
 Remotely access PCs and mobile devices and provide instant support
 Improve your efficiency, and focus on delivering more value-add services
 Discover what IT Professionals Know. Rescue delivers
 http://p.sf.net/sfu/logmein_12329d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 --
 LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
 Remotely access PCs and mobile devices and provide instant support
 Improve your efficiency, and focus on delivering more value-add services
 Discover what IT Professionals Know. Rescue delivers
 http://p.sf.net/sfu/logmein_12329d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

 --
 LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
 Remotely access PCs and mobile devices and provide instant support
 Improve your efficiency, and focus on delivering more value-add services
 Discover what IT Professionals Know. Rescue delivers
 http://p.sf.net/sfu/logmein_12329d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 3d performance question

2012-12-18 Thread Michael Droettboom
On 12/18/2012 09:21 AM, Jason Grout wrote:
 On 12/18/12 6:53 AM, Sturla Molden wrote:
 Interactive 2D plots can be sluggish too, if you have enough objects in
 them. It is not the backend that is sluggish. Replacing the backend does
 not speed up the frontend.

 OpenGL is only 'fast' if you have a frontend that exploits it (e.g. uses
 vertex buffers and vertex shaders). If you just use OpenGL for
 bitblitting an image or drawing vertices individually (glVertex*), it is
 not going to help at all.

 My impression is that whenever Matplotlib is 'too slow', I have to go
 down to the iron and use OpenGL directly. It tends to happen when there
 are too many objects to draw, and the drawing has to happen in 'real-time'.

 Observe that if we let OpenGL render to a frame buffer, we can copy its
 content into a Matplotlib canvas. Unless we are doing some really heavy
 real-time graphics, displaying the image is not going to be the speed
 limiting factor. Even though using OpenGL to swap framebuffers will be
 'faster', you will not be able to tell the difference in an interactive
 Matplotlib plotting.
 I'm curious: how come Chaco is so much faster for real-time plots?  What
 are the main technical differences to enable it to plot things much more
 quickly?

I think this a great question -- one way to address this might be to 
find certain examples or plot types where the performance has a large 
gap and then drill down from there.  There are so many different plot 
types and methods in both matplotlib and Chaco that it's hard to be 
general about performance issues.  (And raw drawing performance isn't 
always the same thing as interactive performance, or file size or memory 
performance).  I know years ago when I was working on the path 
simplification code in matplotlib it was way ahead of what Chaco was 
doing in that (very narrow and specific) case, but I haven't looked at 
Chaco much since.

Mike

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?

2012-11-16 Thread Michael Droettboom
One of the reasons (historically) is that the build scripts predate 
setuptools and ships copies of dependencies rather than using 
easy_install or pip to install them.  There is an open PR to address 
this here:


https://github.com/matplotlib/matplotlib/pull/1454

But you do make a good point that `pip` should be mentioned in the docs 
as part of that change.


Mike

On 11/16/2012 05:54 AM, Mathew Topper wrote:

Hi,

I'm interested to know why the pip package manager is not more widely 
supported for installation of python packages like matplotlib? 
Matplotlib seems to be particularly slowly updated in the Fedora 
repositories, for example, so I often find that a source installation 
is necessary. I know this isn't especially difficult for the 
experienced user, but surely using something like pip would make this 
process for accessible for all users of python packages, particularly 
those that do not receive much attention from the big distribution 
maintainers? Yet, pip doesn't get a mention on the installation 
documentation of matplotlib or many other python packs.


I would love to hear anyone's thoughts on this matter.

Many Thanks,

Mat
--
Dr. Mathew Topper
Institute for Energy Systems
School of Engineering
The University of Edinburgh
Faraday Building
The King's Buildings
Edinburgh EH9 3JL
Tel: +44 (0)131 650 5570
School fax: +44 (0)131 650 6554
mathew.top...@ed.ac.uk mailto:mathew.top...@ed.ac.uk
http://www.see.ed.ac.uk http://www.see.ed.ac.uk/


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov


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


--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


  1   2   3   4   5   6   7   8   9   10   >