Hi Ram, I don't seem to have any problems with trunk/ or version-2_1/ on linux running the script below. I am not surprised by the issues on Windows. These are almost certainly issues with matplotlib rendering, but I am confused by the "AttributeError:". It doesn't seem to make much sense. I need to fix a number of issues on Windows. Hopefully, I'll get to it in the not too distant future. Cheers.
On Thu, Dec 16, 2010 at 3:12 PM, Ram Balachandran <ram.balachand...@gmail.com> wrote: > Hello, > > I am trying to use Matplotlib for plotting purposes and I am encountering > problems with it. I tried to run a simple case listed in the fipy > documentation (section 25.3 - page 305). Please find below the sample code > > from matplotlib import pylab > from fipy import * > > mesh = Grid2D(nx=50, ny=100, dx=0.1, dy=0.01) > x,y = mesh.getCellCenters() > xyVar = CellVariable(mesh=mesh, name='x y', value=x*y) > k = Variable(name="k", value=0.) > > viewer = Matplotlib2DGridViewer(vars=sin(k*xyVar), > limits={'ymin':0.1, 'ymax':0.9}, > datamin=-0.9, datamax=2.0, > title="Matplotlib2DGridViewer test") > > for kval in range(10): > k.setValue(kval) > viewer.plot() > viewer._promptForOpinion() > > The code runs and I see the plot but I get the following message > > Traceback (most recent call last): > File "c:\somewhere\matplotlib_plot.py", line 36, in <module> > viewer.plot() > AttributeError: 'module' object has no attribute 'plot' > > The other issue is that I am unable to close the figure window that opens. > The program stops to respond and I am having to forcefully close the entire > application. > > I am running fipy 2.1.1 along with Enthought python distribution 6.3.1 which > comes with python 2.6 on a windows - 64bit machine. > > Any help will be greatly appreciated. > > Thanks > Ram. > -- Daniel Wheeler