[Matplotlib-users] problem to plot constant limited(within specific xrange value) y line within a square well

2012-02-11 Thread Debashish Saha
import numpy as np import matplotlib.pyplot as plt E=[81.97400737666324, 322.0939978589591, 694.5766491226185] V0=1000 a=0.1 def V(x): if x > -a and x < a: return 0 return V0 V=np.vectorize(V) #psi=np.vectorize(psi) x= np.linspace(-1.5*a,1.5*a,100) plt.plot(x,V(x)) plt.xlim(-5*a,5*a)

Re: [Matplotlib-users] Alpha keyword not working with contourf

2012-02-11 Thread Eric Firing
On 02/11/2012 10:30 AM, Alexa Villaume wrote: > Thanks for replying Eric. (You're welcome. But please keep replies on the list when they are potentially useful to others, as yours is.) > > Here is my minimal script - > > import matplotlib > > frompylab import* > > import numpy as np > > importos

Re: [Matplotlib-users] Alpha keyword not working with contourf

2012-02-11 Thread Eric Firing
On 02/11/2012 07:40 AM, Alexa Villaume wrote: > Hi All, > > I'm just getting started with matplotlib. I'm trying to make a contour > plot using contourf and have the different paths colored and semi > transparent but the alpha keyword doesn't seem to do anything. I googled > around and found that o

[Matplotlib-users] Alpha keyword not working with contourf

2012-02-11 Thread Alexa Villaume
Hi All, I'm just getting started with matplotlib. I'm trying to make a contour plot using contourf and have the different paths colored and semi transparent but the alpha keyword doesn't seem to do anything. I googled around and found that other people have had this same problem but I didn't find

[Matplotlib-users] Creating frames for use with ArtistAnimation?

2012-02-11 Thread reckoner
Hi, I am creating a big and complicated plot by doing things like: ax.add_patch( ... ) and when I'm done I want to save the resulting frame. However, I've looked through the examples and it seems like you have to use plot() or pcolor() to create frames that you can feed into ArtistAnimation.