Re: [Matplotlib-users] cbook.report_memory IOError

2013-07-17 Thread Benjamin Root
I have a vague recollection of a similar problem faced by @dopplershift when he was updating the animation module to pipe a stream to a mencoder/ffmpeg process on certain Macs. Maybe this is the same problem? On Wed, Jul 17, 2013 at 9:18 AM, Michael Droettboom wrote: > To debug, it might be he

Re: [Matplotlib-users] Axes3d have improved handling of label placement yet

2013-07-18 Thread Benjamin Root
Jeffrey, Sorry if the documentation is a bit vague on the _axinfo front. It was intentionally done that way to keep the number of people dependent upon that kludge down. It was created as an improvement upon the previous hard-coded constants that completely prevented anybody from making any cust

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

2013-07-19 Thread Benjamin Root
What does "print matplotlib.get_backend()" say? -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose roo

Re: [Matplotlib-users] animations with python and gtk3

2013-07-24 Thread Benjamin Root
On Wed, Jul 24, 2013 at 3:09 AM, Gurinder Singh Gill wrote: > I am using python 2.7 and matplotlib animations example . > when i am using gtk2 as a reference the plots works fine > but when i change the backend to gtk3 i start getting errors . > can someone help with that > how to work with animat

Re: [Matplotlib-users] Outputting to eps with Mplot3d one of the walls loses its lines.

2013-08-02 Thread Benjamin Root
On Fri, Jul 26, 2013 at 4:41 PM, Jeffrey Spencer wrote: > I have version 1.2.x of matplotlib. The minimal example shows the case > below. The back wall will lose its lines. Is there a reason for this? Is > there a transparent layer there so eps has to put it as a solid wall? If > so, is there a wa

Re: [Matplotlib-users] Splitting arrays into chunks that satisfy a condition?

2013-08-02 Thread Benjamin Root
On Fri, Aug 2, 2013 at 1:36 PM, Drain, Theodore R (392P) < theodore.r.dr...@jpl.nasa.gov> wrote: > I have three arrays (x,y,z). I want plot x vs y and draw the line > segments differently depending on whether or not z is positive or negative. > So I'm trying to split the x,y arrays into chunks d

Re: [Matplotlib-users] Axes3d have improved handling of label placement yet

2013-08-02 Thread Benjamin Root
On Sun, Jul 28, 2013 at 7:14 AM, Jeffrey Spencer wrote: > Ben, > > Thanks that works great and also one more question. If you look at the > previous example. I have noticed that at the angle the figure is at the > ticklabels look like they are at the center of the grid boxes. This is not > the cas

Re: [Matplotlib-users] Update legend when lines change color?

2013-08-02 Thread Benjamin Root
On Fri, Aug 2, 2013 at 3:32 PM, Eric Firing wrote: > On 2013/08/02 8:55 AM, Drain, Theodore R (392P) wrote: > > Thanks - we'll look into that. We might also see how hard it would > > be to implement an update or refresh method on the legend that could > > be called when the lines change to keep

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

2013-08-05 Thread Benjamin Root
@mdboom, from git blame, this looks to be specifically introduced by you via 7e7b5320on May 15th, and you even added some tests for handling path clipping. Perhaps the choice of "<=" should have been just "<"

Re: [Matplotlib-users] cannot understand http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show

2013-08-07 Thread Benjamin Root
On Wed, Aug 7, 2013 at 11:45 AM, wrote: > The last line of text below seems to say that setting block to either True > or False causes an override of the blocking behavior. I don't think this > is as intended. Which way round is it (in fact I find it has no effect)? > > The problem I have is t

Re: [Matplotlib-users] Turn off shading in ax.bar3d

2013-08-09 Thread Benjamin Root
On Fri, Aug 9, 2013 at 6:57 AM, SquirrelSeq wrote: > Hello everybody, > > I created 3D-Plots with 3D bars in matplotlib. The bars are colored > according to a colormap. > > Unfortunately, only vertical faces have the desired bright colors, whereas > the top sides of the bars are shaded darker to m

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Benjamin Root
On Fri, Aug 9, 2013 at 9:04 AM, Martin Mokrejs wrote: > Hi Phil, > > Phil Elson wrote: > > Hi Martin, > > > > Thanks for this - we are really interested in speeding up the scatter > and barchart plotting with large data sets. In fact, we've done some work ( > https://github.com/matplotlib/matplotl

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Benjamin Root
On Fri, Aug 9, 2013 at 11:15 AM, Martin Mokrejs wrote: > Hi Ben, > thank your for your comments. OK, here are revised patches. I see a hot > spot > in artist.py where the getattr() calls are too expensive. Actually, those > under > the callable() path. > > Ah, yes... one of the biggest warts in

Re: [Matplotlib-users] quiver plots on top of each other? [solved]

2013-08-15 Thread Benjamin Root
On Aug 15, 2013 1:31 PM, "vwf" wrote: > > Got it working! It would be nice to post your solution here in case others are interested. > > (new problems in the making...) > > Good, can't wait to hear them! Cheers! Ben Root -

Re: [Matplotlib-users] quiver linewidht problem

2013-08-15 Thread Benjamin Root
On Aug 15, 2013 3:07 PM, "vwf" wrote: > > After some struggling I got my first plots with quiver working. > A simple plot is very simple, but a complicated one is very different. > Right now I have a 80x80 grid with multiple plots and I plan to go up. > For this I need full control of the arrow di

Re: [Matplotlib-users] Plot Scatter plot with hist() method output

2013-08-19 Thread Benjamin Root
Perhaps hexbin() is what you are looking for? Cheers! Ben Root On Aug 19, 2013 7:29 PM, "dilpreet singh" wrote: > Hi > > i want to plot a scatter plot similar to the one attached with email . I > can plot a histogram but the hist method can't plot a scatter plot . Is > there a way to use the ou

Re: [Matplotlib-users] Matplotlib V1.3 suptitle

2013-08-23 Thread Benjamin Root
On Fri, Aug 23, 2013 at 9:57 AM, Peter Bloomfield < peter.bloomfi...@camhpet.ca> wrote: > Good morning, > > I am running openSuSE 12.2, and this morning I upgraded matplotlib to > v1.3, and now I am having a problem with suptitle. > I use the following lines to put a title and legend onto a plot

Re: [Matplotlib-users] Matplotlib V1.3 suptitle

2013-08-23 Thread Benjamin Root
On Fri, Aug 23, 2013 at 11:21 AM, Peter Bloomfield < peter.bloomfi...@camhpet.ca> wrote: > > On 08/23/2013 10:43 AM, Benjamin Root wrote: > > > > On Fri, Aug 23, 2013 at 9:57 AM, Peter Bloomfield < > peter.bloomfi...@camhpet.ca> wrote: > >> Good morn

Re: [Matplotlib-users] Explicitly clearing Matplotlib/Pylab figure buffers

2013-08-23 Thread Benjamin Root
On Fri, Aug 23, 2013 at 9:55 AM, Kari Aliranta < kari.p.alira...@student.jyu.fi> wrote: > Hello, fellow Matplotlib users, > > > I'm embedding some Matplotlib figures into GUI (PyQt4) windows or widget > canvases using qt4agg as the backend. I'm having problems with these > figures popping up any t

Re: [Matplotlib-users] Explicitly clearing Matplotlib/Pylab figure buffers

2013-08-23 Thread Benjamin Root
On Fri, Aug 23, 2013 at 1:57 PM, Eric Firing wrote: > On 2013/08/23 3:55 AM, Kari Aliranta wrote: > > Hello, fellow Matplotlib users, > > > > > > I'm embedding some Matplotlib figures into GUI (PyQt4) windows or widget > > canvases using qt4agg as the backend. I'm having problems with these > > f

Re: [Matplotlib-users] Explicitly clearing Matplotlib/Pylab figure buffers

2013-08-23 Thread Benjamin Root
On Fri, Aug 23, 2013 at 4:08 PM, Kari Aliranta < kari.p.alira...@student.jyu.fi> wrote: > 23.08.2013 20:57, Eric Firing kirjoitti: > > On 2013/08/23 3:55 AM, Kari Aliranta wrote: > >> Hello, fellow Matplotlib users, > >> > >> > >> I'm embedding some Matplotlib figures into GUI (PyQt4) windows or w

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2013-09-16 Thread Benjamin Root
On Sun, Sep 15, 2013 at 11:59 PM, C M wrote: > Just a follow-up on this problem... > > I've found now that the index is only off if the plot is zoomed, and in > the following way. When I zoom, the first point that is visible in the > plot window will have index = 0, the next point will have inde

Re: [Matplotlib-users] text color in matplotlib Table

2013-09-16 Thread Benjamin Root
On Sat, Sep 14, 2013 at 2:45 PM, Alexandre Voitenok < avoite...@acadian-asset.com> wrote: > Hi > I am trying to figure out how to change font color (as opposed to the fill > color) in select cells in Table. Is there a way to do this? > Below is an example: > > import matplotlib.pyplot as plt > im

Re: [Matplotlib-users] mplot3d

2013-09-17 Thread Benjamin Root
On Tue, Sep 17, 2013 at 4:25 AM, Nils Wagner wrote: > Hi all, > > How can I modify the grid linewidth and grid line color of an Axes3D > object ? > is it possible to use white instead of gray for the background color ? > > The following snippet doesn't show the desired effect. > > from mpl_toolki

Re: [Matplotlib-users] Qt4 Example timing out

2013-09-17 Thread Benjamin Root
On Tue, Sep 17, 2013 at 11:55 AM, Chad Kidder wrote: > I'm following the MPL Qt4 example given at > http://matplotlib.org/examples/user_interfaces/embedding_in_qt4.html and > it looks like I am timing out somewhere in the setup. The error I am > getting is: > > RuntimeError: super-class __init__

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

2013-09-24 Thread Benjamin Root
On Mon, Sep 23, 2013 at 6:13 PM, Grigoris Maravelias < gr.maravel...@gmail.com> 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 fon

Re: [Matplotlib-users] x axis non-uniform labeling (KURT PETERS)

2013-10-01 Thread Benjamin Root
On Tue, Oct 1, 2013 at 1:55 PM, KURT PETERS wrote: > > > > Date: Tue, 1 Oct 2013 19:35:39 +0200 > > > Subject: Re: [Matplotlib-users] x axis non-uniform labeling (KURT PETERS) > > From: goyod...@gmail.com > > To: petersk...@msn.com > > CC: pmhob...@gmail.com; matplotlib-users@lists.sourceforge.ne

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

2013-10-03 Thread Benjamin Root
On Thu, Oct 3, 2013 at 6:35 AM, ajdcds wrote: > Sorry, of course it does not work, the import is incorrect! > > It should be > > import matplotlib as plt > plt.rcParams['backend'] = 'TkAgg' > > or simply > import matplotlib > matplotlib.rcParams['backend'] = 'TkAgg' > > Errr... no, don't do "impo

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

2013-10-03 Thread Benjamin Root
On Thu, Oct 3, 2013 at 9:22 AM, ajdcds wrote: > Benjamin, thank you very much for the tip! > > If I do > > import matplotlib > matplotlib.use("TkAgg") > > This is only valid for the current script that is running, the matplotlibrc > remains the same, right? > > Yes, that is correct. -

Re: [Matplotlib-users] Setting y limits in a log scale scatter plot

2013-10-08 Thread Benjamin Root
On Thu, Oct 3, 2013 at 1:05 PM, dilpreet singh wrote: > Hi > > I am plotting a scatter plot where y axis has a log scale but in the graph > the y axis always starts from 10 to the power -1 . I tried setting the > limit with set_ylim() but i am not sure what value to give within this > method sinc

Re: [Matplotlib-users] Matplotlib eating memory

2013-10-10 Thread Benjamin Root
On Thu, Oct 10, 2013 at 9: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 recursio

Re: [Matplotlib-users] Matplotlib eating memory

2013-10-10 Thread Benjamin Root
On Thu, Oct 10, 2013 at 9:47 AM, Martin MOKREJŠ wrote: > Benjamin Root wrote: > > > > > > > > On Thu, Oct 10, 2013 at 9:05 AM, Martin MOKREJŠ mmokr...@gmail.com>> wrote: > > > > Hi, > > rendering some of my charts takes almost 50GB of

Re: [Matplotlib-users] Matplotlib eating memory

2013-10-10 Thread Benjamin Root
On Thu, Oct 10, 2013 at 10:21 AM, Michael Droettboom wrote: > 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 ha

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

2013-10-14 Thread Benjamin Root
I see you are using matplotlib 1.0.1. There have been several memory leak bugs fixed since then, so I would suggest upgrading. I also notice you are using the "emf" backend for saving figures. If I remember correctly, that backend has been deprecated (or maybe even removed) in the latest release (v

Re: [Matplotlib-users] Choosing optimal figure width/height automatically

2013-10-17 Thread Benjamin Root
On Thu, Oct 17, 2013 at 8:20 AM, Christoph Groth wrote: > Hello, > > I'm stuck trying to find a solution to the following problem. > > I'd like to show an array using imshow preserving the 1:1 aspect ratio > of its pixels. At the same time, I would like the axes to fit around > the image tightly

Re: [Matplotlib-users] viewing 3d plots with orthographic projection?

2013-10-19 Thread Benjamin Root
This has been requested before, and it probably wouldn't be that difficult to implement. If you want to take a crack at it, try making orthographic versions of the functions in mpl_toolkits/mplot3d/proj3d.py. The tricky part will be getting the right projection hooked up, but for now, you could jus

Re: [Matplotlib-users] Reset original view button and mplot3d

2013-10-30 Thread Benjamin Root
Good point. The underlying mechanism for recording the changes to the limits assume just x and y limits, and wouldn't record the z limits. Furthermore, it certainly doesn't take into account any changes with respect to the viewing angle. I am not familiar enough with the mechanisms to figure out h

Re: [Matplotlib-users] matplot3d: add_collection3d: Turn off baseline?

2013-10-31 Thread Benjamin Root
On Thu, Oct 31, 2013 at 9:43 AM, Guido Avvisati wrote: > Benjamin Root writes: > > > > > > > On Tue, Nov 20, 2012 at 8:12 PM, Stephen Gibson fcv4sgi5zeuqrrorzv6...@public.gmane.org> wrote: > > > > Ok. Adding an NaN as the last data point did not help. >

Re: [Matplotlib-users] wrong numpy version

2013-11-12 Thread Benjamin Root
On Tue, Nov 12, 2013 at 7:37 AM, Nemanja Savic wrote: > Hi all guys, > > I am using RHEL6 and I am ploting figures throughout my project, so I > wanted some workaroung blocking show() function call. I have found few > solutions that use multiprocessing, so finally i finished with this: > > pool.m

Re: [Matplotlib-users] Outline for histogram bars

2013-11-12 Thread Benjamin Root
On Tue, Nov 12, 2013 at 4:26 PM, Ted To wrote: > Hi, > > Is there an option to change the line style for the outline of histogram > bars? What I am looking for some something like the attached kernel > density plot. I can set different colors (attached) but this is not > very useful when printi

Re: [Matplotlib-users] Outline for histogram bars

2013-11-13 Thread Benjamin Root
On Tue, Nov 12, 2013 at 8:01 PM, Ted To wrote: > Perfect! Many thanks! Seems to be an undocumented feature... > > Not undocumented. In the docs for hist(), it says that it accepts any parameter that is used for Patch artists. This is also generally true for many of the other plotting functions.

Re: [Matplotlib-users] Outline for histogram bars

2013-11-15 Thread Benjamin Root
On Wed, Nov 13, 2013 at 8:16 PM, Ted To wrote: > Thanks Ben! > > I was wondering if you can help me with a related question. How does > one change the artist for the legend? Since I have a "step" histogram, > it would be nice to have the legend display lines rather than outlined > rectangles. >

Re: [Matplotlib-users] Question about basic_example_writer.py

2013-12-05 Thread Benjamin Root
Hmmm, sounds like a bug of some sort. Perhaps a pixel size is not being specified when creating the movie. Could you file an issue detailing exactly which version of mpl you are using and which movie writer you are using? Cheers! Ben Root On Wed, Nov 27, 2013 at 11:57 AM, Andreas Hilboll wrote:

Re: [Matplotlib-users] Matching shading on surfaces

2013-12-06 Thread Benjamin Root
Shading is a bit complicated in plot_surface(). In your particular case, it is simply shading based on the results of calculating the normal vector of each facet on the surface. It then normalizes the shading it has to do based on what it has to get the full dynamic. This is why your image looks th

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

2014-01-22 Thread Benjamin Root
On Wed, Jan 22, 2014 at 9:21 AM, Daryl Herzmann 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

Re: [Matplotlib-users] savefig - legend only

2014-01-31 Thread Benjamin Root
I would also like to point out that you can specify "auto" for a location, and matplotlib will attempt to find a good location for you (within the plot area). It isn't perfect, but it can be useful. Cheers! Ben Root On Fri, Jan 31, 2014 at 7:02 AM, Skip Montanaro wrote: > > 1. PNG file of figu

Re: [Matplotlib-users] Plotting a series of 3d quadrilaterals as a wireframe

2014-02-06 Thread Benjamin Root
I am not sure, but it sounds like you are talking about plot_wireframe()? Ben Root -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whi

Re: [Matplotlib-users] Happy Valentine's Day

2014-02-14 Thread Benjamin Root
I rolled a 20 today for necromancer, so I am going to do a thread resurrection. Given recent improvements in matplotlib, we should definitely make this web-enabled. That way, we can share our nerdiness with our non-nerdy significant others. Happy Valentine's day! Ben On Mon, Feb 14, 2011 at 8:25

Re: [Matplotlib-users] Can't plot NCEP reanalysis data

2014-03-05 Thread Benjamin Root
The issue I see is one of ensuring that your inputs into contourf() are of the expected shapes. If you want a generalized script, then you will need to do various steps that can prepare 3d data into a 2d by assuming a particular level. The fun part of all of this is that different data sources orga

Re: [Matplotlib-users] video without black bands

2014-03-12 Thread Benjamin Root
In your options to mencoder, you are specifying the width/height as: >>> 'type=png:w=9800:h=600:fps=0.6', But your PNGs have size of 704x538 pixels. That's why you have black bars on either side of your animation. Cheers! Ben Root On Wed, Mar 12, 2014 at 7:16 AM, diedro wrote: > sorry for t

Re: [Matplotlib-users] Matplotlib - Drawing a Trapezoid Isosceles with Poly3DCollection

2014-03-26 Thread Benjamin Root
Not that I am aware of. We kind of brute-force it in the plot_surface() function: polys = [] # Only need these vectors to shade if there is no cmap if cmap is None and shade : totpts = int(np.ceil(float(rows - 1) / rstride) * np.ceil(flo

Re: [Matplotlib-users] ipython --pylab interactive mode problem.

2014-03-27 Thread Benjamin Root
0.12.1 is a "very" old version of ipython. I know there have been some changes to matplotlib to deal with changes that ipython has made over the past two years, but I did think that they were all backwards compatible. @mdboom, do you think this could be related to that "fix" we made on detecting w

Re: [Matplotlib-users] RedHat and Release Upgrade to Numpy 1.8.1 and Matplotlib 1.3.1 / Install from Source

2014-03-27 Thread Benjamin Root
How long did you wait? Do allow approximately one minute for the first execution to allow for the font.cache to be built. It can appear that the process has "hung" because it is waiting for "fc-list" subprocess to complete. Cheers! Ben Root -

Re: [Matplotlib-users] RedHat and Release Upgrade to Numpy 1.8.1 and Matplotlib 1.3.1 / Install from Source

2014-03-27 Thread Benjamin Root
+55 13 9 9760 0453 <%2B55%2013%209%209760%200453> > cell: +55 13 9 8117 3316 <%2B55%2013%209%208117%203316> e-mail: > clau...@br.ibm.com * > > > From:Benjamin Root > To:falbriard , > Cc:Matplotlib Users > Date:27/03/201

Re: [Matplotlib-users] Set X,Y,and Z data for a pcolormesh

2014-04-03 Thread Benjamin Root
So, you would like to plot a surface, and then have some slices through it? Perhaps you are looking for something like this? http://matplotlib.org/examples/mplot3d/contourf3d_demo2.html In your case, I would use the contourf()'s "zdir" argument to set the direction of the slice's normal vector, an

Re: [Matplotlib-users] how to plot a sphere and two more curves, and the aspect ratio to be preserved

2014-04-08 Thread Benjamin Root
Which version of matplotlib are you using? There used to be some issues with this, but I could have sworn I resolved this a while back. Ben Root On Mon, Apr 7, 2014 at 2:40 PM, Emilia Petrisor wrote: > Dear all, > > > I want to visualize the image through the stereographic projection (that > m

Re: [Matplotlib-users] plotting oriented (two sided) surfaces

2014-04-14 Thread Benjamin Root
I think the closest you are going to get is with using the "shade=True" kwarg in plot_surface(). This is the only way that mplot3d utilizes normal vectors, and that really only makes one side look "duller" than the other. Since you mentioned wanting to eventually display self-intersecting surfaces

Re: [Matplotlib-users] testing issue involving matplotlib

2014-04-16 Thread Benjamin Root
Hmmm, it isn't the same, but I wonder if it is related to the oddities around https://github.com/matplotlib/matplotlib/pull/2925 . What I mean is that in that case, none of our unit tests caught the problem, even though it should have. In your case, your unit tests is catching a similar problem, bu

Re: [Matplotlib-users] Make clear figure used in the powerpoint slides?

2014-04-21 Thread Benjamin Root
While SVG isn't supported, EPS is... sort of. Be very careful going between windows and mac versions of Powerpoint. While they both support EPS, they seem to do it differently and I have had to make emergency fixes to presentations while at conferences because they were using Windows and I only ha

Re: [Matplotlib-users] Make clear figure used in the powerpoint slides?

2014-04-21 Thread Benjamin Root
JPGs will *always* have "bit blur" as it is a lossy image format. PNGs would be a better bet. Ben Root On Mon, Apr 21, 2014 at 3:33 PM, ChaoYue wrote: > Hi all, > > Thank you all for your kind response. I am sorry, but none of these > solutions significantly improved the visual quality on micr

Re: [Matplotlib-users] Make clear figure used in the powerpoint slides?

2014-04-22 Thread Benjamin Root
eyes in the attached case, maybe for other more complicated plots there >> will be real difference. Anyway, thanks to all for your nice discussions. >> And, BTW, I tried >2 hours trying to find a way to convert svg to emf, but >> now I konw :p >> >> Cheers, >> &g

Re: [Matplotlib-users] checking if an artist is in the list of artists for an axes

2014-04-22 Thread Benjamin Root
In most cases, you can also query the artist object for which axes it belongs to: ax = a.get_axes() Note that is can be None if it hasn't been attached anywhere. Cheers! Ben Root On Tue, Apr 22, 2014 at 3:35 AM, Eric Firing wrote: > On 2014/04/21 8:30 PM, Michael Mossey wrote: > > How do I c

Re: [Matplotlib-users] problem with patches in animation

2014-04-23 Thread Benjamin Root
Working off of very faded memory, try not to return any objects in your init function that you intend to be animated. If I remember correctly, when blitting is True, the animator treats any object returned by the init() function as background objects, and any objects returned by the animation funct

Re: [Matplotlib-users] problem with patches in animation

2014-04-23 Thread Benjamin Root
im = animation.FuncAnimation(fig, animate, >init_func=init, > frames=360, >interval=20, >blit=True) > > plt.show() > > > > > On Wed, Apr 23, 2014 at 10:29 A

Re: [Matplotlib-users] problem with patches in animation

2014-04-23 Thread Benjamin Root
suggestions, > > Mark > > > On Wed, Apr 23, 2014 at 5:12 PM, Benjamin Root wrote: > >> I think it is because the figure may or may not have some things drawn by >> the time the blitting starts. This is due to draw_idle(). So, it is trying >> to capture whateve

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

2014-04-30 Thread Benjamin Root
I wrote up my answer to this question on stackoverflow once: https://stackoverflow.com/questions/19895262/when-to-use-the-matplotlib-pyplot-class-and-when-to-use-the-plot-object-matplot/21004357#21004357 Others may have different opinions or variations on the theme, but this is how I look at the i

Re: [Matplotlib-users] Millions of data points saved to pdf

2014-05-01 Thread Benjamin Root
This makes me wonder if you would be better served with something like bokeh: http://bokeh.pydata.org/ Cheers! Ben Root On Thu, May 1, 2014 at 9:28 AM, nertskull wrote: > No we definitely aren't really interested in the gaps. Gaps are just where > we were unable to collect the data. > > I d

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

2014-05-01 Thread Benjamin Root
""" The pyplot interface is generally preferred for non-interactive plotting (i.e., scripting). The pylab interface is convenient for interactive calculations and plotting, as it minimizes typing. Note that this is what you get if you use the ipython shell with the -pylab option, which imports ever

Re: [Matplotlib-users] One colorbar for many plot

2014-05-21 Thread Benjamin Root
In v1.3, we added the ability to provide a list of axes objects to pyplot.colorbar() (and maybe fig.colorbar()?). All of the axes objects in that list would then get resized similarly to make room for the colorbar. http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.colorbar The AxesGrid

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2014-06-07 Thread Benjamin Root
d why one set of data doesn't have this problem and > another one does. Any suggestions for what's wrong greatly appreciated. > > Thanks, > Che > > > On Mon, Sep 16, 2013 at 9:15 AM, Benjamin Root wrote: > >> >> >> >> On Sun, Sep 15, 2013 a

Re: [Matplotlib-users] testing issue involving matplotlib

2014-06-10 Thread Benjamin Root
he six package developers and the > problem was resolved with the 1.7.0 release of six. > > > On Wed, Apr 16, 2014 at 12:37 PM, Benjamin Root wrote: > >> Hmmm, it isn't the same, but I wonder if it is related to the oddities >> around https://github.com/matplotlib/mat

Re: [Matplotlib-users] Error in atexit._run_exitfuncs

2014-06-25 Thread Benjamin Root
What it means, specifically, is that one (or more) figure objects still in memory at the time of exiting the python interpretor are missing the expected canvas attribute. I see this happen in various backends from time to time. The best I can figure is that somehow, the destructor for the figure ha

Re: [Matplotlib-users] Data plotting in a wrong place

2014-06-26 Thread Benjamin Root
don't know if this would make a difference, but meshgrid here is completely unnecessary given that the netcdf file has the lats and lons in 2 dimensions anyway. Given that this is a polar projection, I wouldn't be surprised if there is something wonky there. Are the longitudes and latitudes monoto

Re: [Matplotlib-users] 3D surface plot with box frame

2014-06-26 Thread Benjamin Root
If you supply the code you did to get where you got, I have a rough idea how to get what you need. Essentially, you need to set the edgecolor of the panes, I think. I have to dig a bit in the code to see how to do that, though. Cheers! Ben Root On Thu, Jun 26, 2014 at 7:42 PM, Dawes, Andrew M.

Re: [Matplotlib-users] Data plotting in a wrong place

2014-06-27 Thread Benjamin Root
actually, that is technically incorrect. That only works for monotonically increasing series, but not monotonically decreasing series. diffs = np.diff(lon) if np.all(diffs <= 0): return True if np.all(diffs >= 0): return True return False provided that len(lon) >= 2, obviously (and it doe

Re: [Matplotlib-users] installation problem

2014-07-04 Thread Benjamin Root
One possibility is that with v1.3, we changed how packaging was done. Unfortunately, this did cause some transitional issues. The best bet is to uninstall *all* versions of matplotlib, pylab, and mpl_toolkits first, then re-install v1.3.1. Note that waiting for the v1.4 release wouldn't necessarily

Re: [Matplotlib-users] PyNio

2014-07-04 Thread Benjamin Root
Perhaps Anaconda would be best for an easy to install environment and much of the commonly used scientific computing tools? http://continuum.io/downloads As for PyNIO, due to licensing issues, it isn't installable through pip or easy_install. If you go to their website and create a free account, y

Re: [Matplotlib-users] installation problem

2014-07-04 Thread Benjamin Root
I presume you mean pypi said that the latest version was 1.0.1? PyPi recently (and rightly so) stopped automatically pull eggs from third-party locations (this is a *huge* security risk). Version 1.0.1 was the last version that was directly hosted on PyPi because the test suite made the package so

Re: [Matplotlib-users] At.: draw Graph problem

2014-07-14 Thread Benjamin Root
How did you install or build matplotlib? It sounds like you built it from source, and did not have any GUI dev tools installed. At the very minimum, matplotlib will build only the non-interactive backends as they don't require external dependencies (which would explain why you can save images, but

Re: [Matplotlib-users] how to use transforms to rotate and shift a group of objects

2014-07-16 Thread Benjamin Root
Have you read through the transformation tutorial? http://matplotlib.org/users/transforms_tutorial.html There is a section on how to do a shadow transformation that might be helpful. Obviously, you wouldn't need to create the second artist, but it does show how to customize the transform on a per-

Re: [Matplotlib-users] How to add a basemap to a 3D surface plot

2014-07-17 Thread Benjamin Root
>From the docstring for readshapefile: A tuple (num_shapes, type, min, max) containing shape file info is returned. num_shapes is the number of shapes, type is the type code (one of the SHPT* constants defined in the shapelib module, see http://shapelib.maptools.org/shp_api.html) a

Re: [Matplotlib-users] why I can't see all the matplotlib user maillist email achieve from sourceforge

2014-07-28 Thread Benjamin Root
No clue. This question has come up from time to time. I recommend using Nabble to search the archives. On Mon, Jul 28, 2014 at 2:10 AM, asmwarrior wrote: > Hi, can any one view the full email achieve for the matplotlib user > maillist? > I can only see mails up to year 2012, see image shot here

Re: [Matplotlib-users] Basic matshow question

2014-07-30 Thread Benjamin Root
I think it is mostly an issue with how IPython interfaces with matplotlib. If you were running from a pure python prompt, then I would suspect it to work (haven't tried myself, though). Note that the --pylab option to ipython is now highly discouraged. Instead, I would try the "%matplotlib interact

Re: [Matplotlib-users] Basic matshow question

2014-07-30 Thread Benjamin Root
wrote: > Hi, > > On Wed, Jul 30, 2014 at 9:30 AM, Benjamin Root wrote: > > I think it is mostly an issue with how IPython interfaces with > matplotlib. > > If you were running from a pure python prompt, then I would suspect it to > > work (haven't tried myself, th

Re: [Matplotlib-users] Basic matshow question

2014-07-30 Thread Benjamin Root
Lab-Thanks.ipynb.html > > > On Wed, Jul 30, 2014 at 10:19 AM, Matthew Brett > wrote: > >> Hi, >> >> On Wed, Jul 30, 2014 at 9:30 AM, Benjamin Root wrote: >> > I think it is mostly an issue with how IPython interfaces with >> matplotlib. >> >

[Matplotlib-users] Matplotlib history

2014-07-30 Thread Benjamin Root
Hello all, I am trying to put together notes for a writeup on a short history of matplotlib (in particular, its uses for interactive plotting). I have John Hunter's SciPy 2012 Keynote, which helps, but I was hoping for some other sources. Unfortunately, searching for "matplotlib" and "history" ge

Re: [Matplotlib-users] Matplotlib history

2014-07-30 Thread Benjamin Root
. Probably quicker over skype/phone, ping me directly (at my Berkeley > address) if you want. > > Cheers > > f > > > > On Wed, Jul 30, 2014 at 7:20 PM, Benjamin Root wrote: > >> Hello all, >> >> I am trying to put together notes for a writeup on a short his

Re: [Matplotlib-users] Matplotlib history

2014-08-01 Thread Benjamin Root
ctive, having a fixed user interface (the pylab interface) has been very useful, because the guts of the code base can be redesigned without affecting user code. On Wed, Jul 30, 2014 at 11:51 PM, Benjamin Root wrote: > Fernando, > > This information is going to be the preface of my

Re: [Matplotlib-users] Matplotlib history

2014-08-03 Thread Benjamin Root
For those interested, I have found the release announcement that introduced the jet colormap: http://ehc.ac/p/matplotlib/mailman/message/188760/ . We have someone named "Perry" to blame... :-P Ben Root On Fri, Aug 1, 2014 at 9:01 PM, Benjamin Root wrote: > Just to keep my notes

Re: [Matplotlib-users] Matplotlib history

2014-08-03 Thread Benjamin Root
Whoops, I hadn't realized I stumbled onto a clone of sourceforge (a mirror?). Here is the real link: http://sourceforge.net/p/matplotlib/mailman/message/188760/ On Sun, Aug 3, 2014 at 9:37 PM, Benjamin Root wrote: > For those interested, I have found the release announcement that >

Re: [Matplotlib-users] Missing tests when trying to run unit tests with agg on linux

2014-08-07 Thread Benjamin Root
Just to note, the first log also has the font-manager issue as well. What I see as odd here is that while it was configured to install the tests (and presumedly the test data), it doesn't seem to have done that. At the very least, the test data wasn't installed. Ben On Thu, Aug 7, 2014 at 12:15

Re: [Matplotlib-users] pick_event after zooming/panning stops working.

2014-08-21 Thread Benjamin Root
Yes, those tools do "snarf" up pick events via the widgetlock mechanism, IIRC. This is entirely intentional, and I an not sure there is a bug here to fix. On Thu, Aug 21, 2014 at 12:01 PM, Thomas Caswell wrote: > On Thu, Aug 21, 2014 at 9:44 AM, Michael Kaufman > wrote: > > > ># plot axvli

Re: [Matplotlib-users] pick_event after zooming/panning stops working.

2014-08-21 Thread Benjamin Root
to allow that? > > M > > > On 8/21/14 2:29 PM, Benjamin Root wrote: > >> Yes, those tools do "snarf" up pick events via the widgetlock mechanism, >> IIRC. This is entirely intentional, and I an not sure there is a bug >> here to fix. >> >> >&g

Re: [Matplotlib-users] pick_event after zooming/panning stops working.

2014-08-21 Thread Benjamin Root
!!) > > It would be nice to have an easier way to "deactivate" the zoom/pan tool. > I think the "new" toolbar might have that, but I haven't checked. > > Cheers, > -Joe > > > On Thu, Aug 21, 2014 at 1:41 PM, Benjamin Root wrote: > >> Imagi

Re: [Matplotlib-users] Preserving figure over closes and reopenings of the window

2014-08-25 Thread Benjamin Root
Maciej, When you close a figure, just about everything gets destroyed (this is why you should always savefig() prior to doing a show()). There is a mechanism for "reloading" a plot using python pickles: http://stackoverflow.com/questions/7290370/store-and-reload-matplotlib-pyplot-object As for se

Re: [Matplotlib-users] Preserving figure over closes and reopenings of the window

2014-08-25 Thread Benjamin Root
gt; when i quit the window some part of it probably form the window framework > are deleted anyway. In this case i think i can redraw all the artists on > the newly created figure somehow but is there a relatively simple way to > just set up new window and attach the old figure there? &

Re: [Matplotlib-users] Region within contour --> 2D array

2014-08-28 Thread Benjamin Root
That stuff is done in the deep underbelly of matplotlib and isn't exposed to the user. It is done as part of the rendering process in AGG or whichever other backend is performing the render. I have done something very similar to what you are asking for my job, and while I can't share the code, I ca

Re: [Matplotlib-users] Region within contour --> 2D array

2014-08-28 Thread Benjamin Root
You are asking for the twinx() feature: http://matplotlib.org/examples/api/two_scales.html On Thu, Aug 28, 2014 at 9:24 AM, Shantha Kumara wrote: > Hi All, > > Thank you so much for your help, It really worked for me. > > > I need one more favor, > > > I have ploted the graph with 2 Y-axes > >

Re: [Matplotlib-users] violin plot

2014-08-28 Thread Benjamin Root
No reason why it shouldn't. I would be more than happy to see that feature added. I could perhaps be convinced that it is a "bug" that it is in the boxplot function and not the violin function so that it could get out into a 1.4.1 release sooner. ::wink:: On Thu, Aug 28, 2014 at 8:05 AM, Neal Bec

Re: [Matplotlib-users] Region within contour --> 2D array

2014-08-29 Thread Benjamin Root
slaps forehead... Joe, you just won the "duh!" moment of the month award! Cheers! Ben Root On Thu, Aug 28, 2014 at 10:18 PM, Joe Kington wrote: > Why not just use boolean indexing? > > E.g. to find the region that falls between 5 and 10, do "(z >=5) & (z <= > 10)": > > In [1]: import numpy a

  1   2   3   4   5   6   7   8   9   10   >