[Matplotlib-users] tailwidth?

2011-12-16 Thread Petro
How can I change linewidth of this arrow?
arrow1=pylab.annotate(, xytext=(-3500,-1e8),
xy=(-3500,8e8),fontsize=8,arrowprops=dict(arrowstyle=-))
Thank you in advance.
Petro



--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Non-interactive plotting to window?

2011-12-16 Thread John Thorstensen


Here is a script that solves the problem, based on Goyo's input:

**

#!/usr/bin/env python
simple_matplot.py -- 
   Repeatedly plots sinusoids (shifted a bit each time).
 - control returns to the user after each plot;
 - the old plot is erased between cycles.


import numpy as np
import matplotlib
import matplotlib.pyplot as plt

x = np.arange(0.,2.*np.pi,0.02)
y = np.sin(x)

c = go

plt.ion()
fig = plt.figure()
ax = fig.add_subplot(1,1,1)

while c.find(go)  -1 :

   try:
   del ax.lines[0]
   except :
   pass
   line, =  ax.plot(x,y,'-')
   plt.draw()
   print stop or go?
   c = raw_input()
   x = x + 0.5

**


John Thorstensen wrote:
 
 I have a sizeable number of python data-inspection scripts that work as
 follows:
 
 - read some data, or do something with it
 - plot the data
 - query the user on the command line and get a response
 - do what the user commands.
 
 These use the venerable PGPLOT package for the graphics, but this has been
 static for years and is getting increasingly vulnerable to obsolescence of
 the supporting packages (e.g., numarray).
 
 I'm having a hard time converting these scripts to matplotlib because when
 you do a show(), the mainloop takes over.  It's possible to work around by
 doing a show() for every plot, and then killing the plot manually, but
 after a couple of hundred manual kills this gets tiresome.  It would also
 be possible to restructure the code so that the various options get
 controlled by key press events in the plot, I suppose, but the effort
 involved in converting all the scripts would be pretty large.
 
 So my question:  Is there a simple way of getting matplotlib to display a
 plot in a window and then surrender control to the main program, without
 destroying the plot?  Something like a method to kill mainloop would be
 ideal.  
 
 Thanks.
 
 [Apologies if this is general knowledge -- I couldn't find an answer.]
 

-- 
View this message in context: 
http://old.nabble.com/Non-interactive-plotting-to-window--tp32981792p32987821.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to do million data-point plots with Matplotlib?

2011-12-16 Thread David Smith
I have experimented with path.simplify and can't see any appreciable
improvements.

Incidently, I also experimented with other back ends.  I found that all the
back ends
involving Agg behave similarly.  However, using the 'GTK' backend it
renders the
whole 1 million points and does it very fast (about 5x faster than Agg
backends).

I also found that gnuplot can render the whole million points very fast
using the
'x11' terminal.  I am guessing that both matplotlib's GTK backend and
gnuplot's
'x11' terminal use the hardware accelerated display driver.

David
--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users