Billy,

We often have problems displaying images on Windows with mayavi and
matplotlib. Unfortunately, these are completely independent of FiPy
and so we are at the mercy of those packages.

You're obviously using the matplotlib viewer and not the mayavi
viewer. FiPy selects one or the other. You can specify this by setting
the "FIPY_VIEWER" environment variable to "matplotlib" or "mayavi".

One thing that you might want to try is placing a couple of
"viewer.plot()" statements followed by a "raw_input("press
something")" statement before the loop starts on line 296 of
simpleTrenchSystem.py. That allows you to reposition the windows so
that you can actually see them and not have other windows covering
them.

If either alternating between matplotlib and mayavi or the extera
viewer.plot() statements doesn't seem to cut it, then I'll try running
on  the windows machine we have here or a virtual one and see if there
isn't a more pervasive issue. Anyway, try the above and get back to
me.

Also, you don't necessarily have to view the results as the simulation
is running. You can always switch of the viewers and save to a file
and then view the results later. I can give you pointers on this if
necessary.

As a check, I would certainly switch off the viewers and put a "print
step" in the time step loop just to check everything else is working
independent of the viewers.

Cheers

On Tue, Feb 15, 2011 at 2:40 PM, Yeung (Billy) Au
<yeun...@fas.harvard.edu> wrote:
> Thank you Jonathan for your quick response.
>
> My matplotlib version is 1.0.0
>
> After editing line 124 of
> C:\Python25\lib\site-packages\fipy\viewers\matplotlibViewer\matplotlib2DGridViewer.py
> from "self.image.clim(vmax=datamax, vmin=datamin)" to
> "self.image.set_clim(vmax=datamax, vmin=datamin)", I got two figure windows
> popped up (with no image to display) and messages shown in the attached
> image. Is there a newer version of matplotlib that I can download?
>
> Thanks,
>
> Billy
>
> On Tue, Feb 15, 2011 at 1:37 PM, Jonathan Guyer <gu...@nist.gov> wrote:
>>
>>
>> On Feb 15, 2011, at 12:33 PM, Billy Au wrote:
>>
>> > I have been trying to use FiPy to model a bottom-up filling process in
>> > narrow trenches.
>> >
>> > I have installed python (pythonxy) on a Windows Vista system, together
>> > with NumPy and PySparse. I had no problem running the diffusion examples
>> > (mesh1d, mesh20x20 etc.) in FiPy but I had trouble running
>> > simpletrenchsystem.py. I attached a screenshot of the messages I got while
>> > trying to run the .py file. Am I having trouble with the viewer? I have
>> > installed Mayavi while installing pythonxy. Can someone please help?
>>
>> It's apparently a problem with the matplotlib viewer. What do you get from
>>
>>  import matplotlib
>>  print matplolib.__version__
>>
>> ?
>>
>>
>> You can try editing line 124 of
>> C:\Python25\lib\site-packages\fipy\viewers\matplotlibViewer\matplotlib2DGridViewer.py
>> from
>>
>>    self.image.clim(vmax=datamax, vmin=datamin)
>>
>> to
>>
>>    self.image.set_clim(vmax=datamax, vmin=datamin)
>>
>>
>>
>
>



-- 
Daniel Wheeler


Reply via email to