Re: [Matplotlib-users] Lorenz animation

2010-01-14 Thread Reinier Heeres
Hi, You could have a look at this 3D demo: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/examples/mplot3d/wire3d_animation_demo.py?revision=8015&view=markup I think you can do something similar to your matlab file using mplot3d. Cheers, Reinier On Fri, Jan 15, 2010 at

[Matplotlib-users] Lorenz animation

2010-01-14 Thread David Arnold
All, I've attached lorenz.m from Matlab. It animates the trajectory of the solution of the lorenz system in 3D. Does anyone have a Matplotlib file that will do something similar? David. lorenz.m Description: Binary data --

[Matplotlib-users] Runtime Error from savefig( )

2010-01-14 Thread Echavarria Gregory, Maria Angelica
Good afternoon group, I am developing an application that had always before plotted a variable 2D numpy array of floats using contourf(), and then saved the figure produced as .png. Certain runs of the application (the ones with best precision) result in a failure while saving the figure using

Re: [Matplotlib-users] Possible bug in IndexFormatter

2010-01-14 Thread Jae-Joon Lee
This has indeed been fixed. http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/ticker.py?r1=7677&r2=7980 Some minor changes may not be listed in the changelog. Regards, -JJ On Thu, Jan 14, 2010 at 12:29 PM, Jeremy Lewi wrote: > Hello, > > > > I think I’m

Re: [Matplotlib-users] An other question about matplotlib

2010-01-14 Thread Andrew Straw
Yagua Rovi wrote: > Hello Andrew, > > For the same need as the previous message, I try to display in colour > a given surface based with on polar coordinates. Z = f (r, theta) > Can you show me which function I have to use? > I don't know what to do with "polar (theta, r)" function. > Is there an

Re: [Matplotlib-users] Ratio of a plot using matplotlib

2010-01-14 Thread Yagua Rovi
2010/1/14 Andrew Straw : > Yagua Rovi wrote: >> I use matplotlib since two days only. I have done some things pretty >> good but I am now in front of a problem an I didn't found a solution >> in the documentation. >> >> I would like to draw the surface defined by the lists X, Y and the matrix Z. >>

Re: [Matplotlib-users] bezier curve through set of 2D points

2010-01-14 Thread Christopher Barker
Jae-Joon Lee wrote: > On Thu, Jan 14, 2010 at 4:38 AM, Mark Bakker wrote: >> Does matplotlib have a routine that can fit a cubic Bezier curve through an >> array of 2D points? This looks like a pretty nice algorithm: http://www.antigrain.com/research/bezier_interpolation/index.html -Chris --

[Matplotlib-users] Dates on contour plots

2010-01-14 Thread Filipe Fernandes
Dear all, I new to matplotlib and I need some help with a very simple procedure. I've been successful to plot dates on the x-axis with the "plot" command. However, I've been unable to use dates with the contour and contourf commands. The command I'm using is: CS = contourf(time, depth, dens)

[Matplotlib-users] colorbar with date-time formatting

2010-01-14 Thread George Nurser
Hi, I've got data in terms of day numbers, and wish to plot it as a 2D scatter plot, with the color denoting the day. I'd like the colorbar to be annotated in Apr 7 type format... I've tried the following code without success. import numpy as np import matplotlib.pyplot as plt from matplotlib.d

Re: [Matplotlib-users] Can't get interative to work

2010-01-14 Thread Nico Schlömer
> I'm not sure, but one reason could be different backends. What kind of backend > are you using on the 2 machines? It was indeed a backend issue, fixed now. Thanks! --Nico -- Throughout its 18-year history, RSA Conferenc

Re: [Matplotlib-users] line drawing bug or it's me doing something wrong?

2010-01-14 Thread Michael Droettboom
I'm not sure what the cause may be, particularly since I can't reproduce it myself with matplotlib 0.99.1.1. What backend are you using? Agg, Cairo and Wx all check out for me. The examples you point to don't look like Agg output to me... Do you have anything in your matplotlibrc? Mike Paw

Re: [Matplotlib-users] bezier curve through set of 2D points

2010-01-14 Thread Jae-Joon Lee
On Thu, Jan 14, 2010 at 4:38 AM, Mark Bakker wrote: > Does matplotlib have a routine that can fit a cubic Bezier curve through an > array of 2D points? > > I saw some Bezier routines in Path, but couldn't find what I am looking for. > As far as I know, no. > If matplotlib doesn't have it, does a

[Matplotlib-users] Possible bug in IndexFormatter

2010-01-14 Thread Jeremy Lewi
Hello, I think I'm using matplotlib 0.99.0. IndexFormatter in matplotlib/ticker.py doesn't appear to subclass Formatter which I think might be a bug. I did a quick search of the changelog for 0.99.1 and I couldn't find any mention of this issue. Jeremy Lewi Engineering Scientist The

Re: [Matplotlib-users] Ratio of a plot using matplotlib

2010-01-14 Thread Andrew Straw
Yagua Rovi wrote: > I use matplotlib since two days only. I have done some things pretty > good but I am now in front of a problem an I didn't found a solution > in the documentation. > > I would like to draw the surface defined by the lists X, Y and the matrix Z. > I get to a nice graphical output

[Matplotlib-users] Ratio of a plot using matplotlib

2010-01-14 Thread Yagua Rovi
I use matplotlib since two days only. I have done some things pretty good but I am now in front of a problem an I didn't found a solution in the documentation. I would like to draw the surface defined by the lists X, Y and the matrix Z. I get to a nice graphical output with the following code. My

Re: [Matplotlib-users] Remove the white padding from a figure

2010-01-14 Thread Pierre de Buyl
For eps files, I use epstool: epstool --copy -b file.eps file_cropped.eps It does not leave any whitespace, which is sometimes annoying. Pierre Le 14 janv. 10 à 17:52, Damon McDougall a écrit : > Hi Ronald, > > I use: > > fig.savefig('graph.eps', bbox_inches='tight', pad_inches=0.03) > > Play w

Re: [Matplotlib-users] Remove the white padding from a figure

2010-01-14 Thread Damon McDougall
Hi Ronald, I use: fig.savefig('graph.eps', bbox_inches='tight', pad_inches=0.03) Play with the parameters and see what you like. Hope that helps. Regards, -- Damon -- Damon McDougall Mathematics Institute University of Warwick Coventry CV4 7AL d.mcdoug...@warwick.ac.uk

[Matplotlib-users] Remove the white padding from a figure

2010-01-14 Thread Ronald Römer
Hello, I try to find out how could I remove the white padding around my figure! I allready searched at google for a long time, but can't find any that changed my problem. Ich create the figure with this two lines: fig = plt.figure() subfig = fig.add_subplot(111) After adding some plots, lines, a

[Matplotlib-users] Plots dates on contour plot

2010-01-14 Thread Filipe Pires Alvarenga Fernandes
Dear matplotlib users, I've been successful to plot 2-D lines with dates in the x-axis directly like: > plot(time,dens[1,:]) Where times starts at 1998-01-11 01:00:00 and ends at 1998-02-06 08:00:00 (633 elements). and dens has 10 elements. Now I'm trying to make a contour plot like: > CS = con

Re: [Matplotlib-users] line drawing bug or it's me doing something wrong?

2010-01-14 Thread Michael Droettboom
Does this example work for you? http://matplotlib.sourceforge.net/examples/pylab_examples/masked_demo.html I don't have scikits.timeseries installed, so I can't confirm whether your original attached example works or not. Can you produce a standalone example that reproduces the problem? M

Re: [Matplotlib-users] Can't get interative to work

2010-01-14 Thread Matthias Michler
Hi Nico, I'm not sure, but one reason could be different backends. What kind of backend are you using on the 2 machines? import matplotlib.pyplot as plt print plt.get_backend() ( and what version of matplotlib import matplotlib print matplotlib.__version__ ) In case the backends are d

Re: [Matplotlib-users] line drawing bug or it's me doing something wrong?

2010-01-14 Thread Paweł Rumian
OK, I've done more tests. The problem occurs always when plotting data from masked array with lines. When there is a masked field in the array, drawing is stopped, and so if the first element is masked, no output can be seen. When all fields are unmasked, there is no problem. Also, drawing with

[Matplotlib-users] Can't get interative to work

2010-01-14 Thread Nico Schlömer
Hi, somehow I don't manage to set up matplotlib such that I can draw animations. I've been using the moving sin example from http://www.scipy.org/Cookbook/Matplotlib/Animations which spits out nicely moving sin-waves on one machine, but does nothing on the other. I'm puzzled. Checked pylab.is

[Matplotlib-users] line drawing bug or it's me doing something wrong?

2010-01-14 Thread Paweł Rumian
hello, I'm a quite new user of matplotlib - currently I'm working with scikits.timeseries and ran into a problem with rendering plots. I can draw scatter plots with dots ('.'), but when using lines ('-', '--', or similar) the graph breaks when missing data occurs. The best way to describe the pr

[Matplotlib-users] bezier curve through set of 2D points

2010-01-14 Thread Mark Bakker
Hello List, Does matplotlib have a routine that can fit a cubic Bezier curve through an array of 2D points? I saw some Bezier routines in Path, but couldn't find what I am looking for. If matplotlib doesn't have it, does anybody have another suggestion in Python? Thanks, Mark -

Re: [Matplotlib-users] xlim and xticks

2010-01-14 Thread Matthias Michler
Hi Pierre, I'm not sure I understand correctly - maybe you could provide a small stand-alone example which illustrates your problem. For me the following works fine: ax = axes() ax.bar(arange(10), np.random.uniform(size=10)) xticks(0.5+arange(10), ["$a_%i$" % (i) for i in arange(10)]) xlim(xmax

[Matplotlib-users] xlim and xticks

2010-01-14 Thread Pierre-Yves
Dear all, I am facing a small problem with xlim and xticks and nor google nor the api helped me (one of the reason being that I likely don't know the exact term I am looking for). I am plotting a barplot using pyplot and bar() on matplotlib 0.98.5.2. If I do not use xticks the x axis goes from 0

Re: [Matplotlib-users] Adding points gradually to the plot

2010-01-14 Thread Matthias Michler
Hello, I think you could do the following On Wednesday 13 January 2010 19:14:08 Someday... wrote: > Hello all, > > I am looking for a way to add points gradually to the plot over time. > Currently, in every iteration, I plot the entire array, like: > plt.ion() # turn on interactive mode (otherwi