[Matplotlib-users] Comet

2010-02-05 Thread David Arnold
All, I am still wondering why there is no comet command in matplotlib. I was successful with the following: import matplotlib.pyplot as plt import numpy as np len=200 t=np.linspace(0,2*np.pi,len) x=np.cos(t) y=np.sin(t) xd=[x[0]] yd=[y[0]] l,=plt.plot(xd,yd) plt.axis([-1,1,-1,1]) for i in np.

[Matplotlib-users] clabel manual

2010-02-05 Thread David Arnold
Hi, I'm trying to get manual labeling of contours to work: import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt delta = 0.025 x = np.arange(-3.0, 3.0, delta) y = np.arange(-2.0, 2.0, delta) X, Y = np.meshgrid(x, y) Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)

[Matplotlib-users] matplotlib.figure and basemap

2010-02-05 Thread nbv4
I wrote a bunch of graph scripts for creating on-the-fly line plots with django. Since I'm running the site on a low memory VPS, I need to run apache in multi-threaded mode, which means all my code needs to be thread-safe. I was using Pyplot a lot, which is not thread-safe. A solution I came up wi

Re: [Matplotlib-users] Matplotlib conflicts with IDLE

2010-02-05 Thread Gary Pajer
On Fri, Feb 5, 2010 at 3:46 PM, David MacQuigg wrote: > > I can't get Matplotlib to work with IDLE.  plt.show() makes beutiful plots, > but IDLE is hung.  Entering "exit" in the little pop-up console window > raises an exception in IDLE, and then leaves the plot window hung. It looks > like the ol

Re: [Matplotlib-users] canvas.print_figure printing a variable amount of my figure

2010-02-05 Thread Eric Firing
David Goldsmith wrote: > On Mon, Oct 6, 2008 at 10:56 AM, Eric Firing > wrote: > > Christopher Barker wrote: > > David Goldsmith wrote: > > I feel like I must be missing something > > > yup -- though it's an understandable miss... >

Re: [Matplotlib-users] Matplotlib conflicts with IDLE

2010-02-05 Thread Michiel de Hoon
This is not a matplotlib problem but an issue with Python itself. Unlike for example Tcl/Tk, Python does not have support for event loops. Each of the graphics backends (Tkinter, PyGTK, PyQT, the Mac OS X native backend) therefore each implement an event loop on their own. In general, these will

Re: [Matplotlib-users] canvas.print_figure printing a variable amount of my figure

2010-02-05 Thread David Goldsmith
On Mon, Oct 6, 2008 at 10:56 AM, Eric Firing wrote: > Christopher Barker wrote: > >> David Goldsmith wrote: >> >>> I feel like I must be missing something >>> >> >> yup -- though it's an understandable miss... >> > > I think the longstanding separation between the figure.dpi and the > savefig.dpi

Re: [Matplotlib-users] Matplotlib conflicts with IDLE

2010-02-05 Thread Christopher Barker
David MacQuigg wrote: > I can't get Matplotlib to work with IDLE. Sorry, I don't know anything about IDLE, but... > I'm running on Mac OS-X, so it looks like IPython is not an option. Why not? I use Ipython on OS-X all the time, and it is fabulous, really fabulous. > Also, I > would rather s

[Matplotlib-users] Matplotlib conflicts with IDLE

2010-02-05 Thread David MacQuigg
I can't get Matplotlib to work with IDLE. plt.show() makes beutiful plots, but IDLE is hung. Entering "exit" in the little pop-up console window raises an exception in IDLE, and then leaves the plot window hung. It looks like the old "dualing event loops" problem with IDLE, although the Matplotl

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

2010-02-05 Thread Wayne Watson
I'm working in IDLE in Win7. It seems to me it gets stuck in site-packages under C:\Python25. Maybe this is as simple as deleting the entry? Well, yes there's a MPL folder under site-packages and an info MPL file of 540 bytes. There are also pylab.py, pyc,and py0 files under site. What to do

Re: [Matplotlib-users] long legend gets truncated if put outside

2010-02-05 Thread ealyaz
> On Fri, Feb 5, 2010 at 10:10 AM, Eymen Alyaz > wrote: >> Is there a way to automatically correct the area of figure and resize it >> such that every box drawn is visible? > > If you're only interested in the saved ouput, you may use > "bbox_inches" option of "savefig". It does not change the siz

Re: [Matplotlib-users] long legend gets truncated if put outside

2010-02-05 Thread Jae-Joon Lee
On Fri, Feb 5, 2010 at 10:10 AM, Eymen Alyaz wrote: > Is there a way to automatically correct the area of figure and resize it > such that every box drawn is visible? > Things like axes position is given in normalized figure coordinates, thus while you can change the figure size but it is quite h

[Matplotlib-users] Uninstalling MatPlotLib (win7)?

2010-02-05 Thread Wayne Watson
I should have installed numpy first, and got some errors installing MPL. I don't see an uninstall in Control Panel Add/Rmv. -- My life in two words. "Interrupted Projects." -- WTW (quote originator) -- The Planet: dedic

[Matplotlib-users] long legend gets truncated if put outside

2010-02-05 Thread Eymen Alyaz
Hello, please try this. from matplotlib.pyplot import * plot([1,2,3], label="very lng label") plot([3,2,1], label="very lng label2") legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) show() The code puts a legend with very long label text outside the figure. When drawing

Re: [Matplotlib-users] Newb: can I plot() just once but render/save to disk different "zooms"?

2010-02-05 Thread Michael Droettboom
Once you have an axes object, you can call set_xlim() and set_ylim() on it to change the limits of the x- and y- axes respectively. You should be able to call that and savefig() iteratively to produce plots of different subsets of the same data. Let me know if you need more details, Mike On 0

[Matplotlib-users] Newb: can I plot() just once but render/save to disk different "zooms"?

2010-02-05 Thread David Carmean
Hi, I just emigrated from Ploticus last week :) Am working on a project where I'm plotting the contents of a large .csv file with about 250,000 cells (unix system 5-minute load averages from a set of 50 servers, for about three weeks data now). I'm developing this in Spyder/Python(x,y)--com

Re: [Matplotlib-users] Difference Between Scatter and Plot? (Zig-Zag)

2010-02-05 Thread Alan G Isaac
On 2/5/2010 12:51 AM, Wayne Watson wrote: > what I'm looking for is a way to draw a zig-zag path > indicating a path taken by a particle Here is a 2d example: >>> import numpy as np >>> import matplotlib.pyplot as plt >>> locs = np.random.random_sample((2,30)) >>> locs = np.random.random_sa