On May 28, 2007, at 12:17 AM, R. Edwin Garcia wrote:


Hey guys,

I was just playing with the gnuplot viewer. I tried the following command:

from fipy import viewers
viewer = viewers.gnuplotViewer.gnuplotViewer.GnuplotViewer(vars = phi, limits={'datamin':0.0, 'datamax':1.0})

and I got the following:

adamantium:~/PurdueClasses/MSE597I/FiPyExamples edwin$ python diffusionI.py
Traceback (most recent call last):
  File "diffusionImplicit.py", line 24, in ?
    viewer.plot()
File "/Users/edwin/stow/FiPy//lib/python2.4/site-packages/fipy/ viewers/gnuplotViewer/gnuplotViewer.py", line 112, in plot
    self._plot()
AttributeError: GnuplotViewer instance has no attribute '_plot'

What am I doing wrong? gnuplot is properly installed.

You need to either use Gnuplot1DViewer or Gnuplot2DViewer. GnuplotViewer is just a base class.

The best way to use the viewers is to just use fipy.viewers.make and set the FIPY_VIEWER environment variable accordingly. I just ran examples/diffusion/mesh1D.py and examples/ diffusion/mesh20x20.py and they worked fine with the
gnuplot viewer.


Thanks!,
Edwin


--
Daniel Wheeler


Reply via email to