This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

VTKPlotter Options Not Working

+2 votes

I am trying to plot my solution u for various time steps. In order to meaningfully compare the solutions at different times, I need to keep my y-axis fixed. However, I can't seem to get the commands here to work: http://tinyurl.com/mvehtud

My code looks like this

fig = plot(u_, wireframe=False, title='Scaled membrane deflection', 
interactive = False, scalarbar = False, range_min=0.2,
range_max=1.0,axes=True,tile_windows=False)
fig.elevate(-85)
fig.set_min_max(0.2,1.0)

My plot does not come up with a title, nor does tile_windows work. I want my y-axis to go from 0.2 to 1.0 for every plot, but neither range_min/range_max nor set_min_max appear to do anything.

Any ideas on how to get this to work?

Thanks,
Eric

asked Mar 20, 2014 by singfadamoment FEniCS Novice (170 points)

1 Answer

0 votes

In your case, after you set the min and max you need the command line:
fig.plot(u)
This means to update the configuration for min and max.

answered Mar 27, 2014 by wmy32552316wmy FEniCS Novice (230 points)

This crashed my computer :-/ The documentation says to use fig.update(), but it complains that update() takes two arguments and the documentation says nothing with respect to this.

You can also try to set the min and max directly in the plot function.
For example, plot(u, range_min=0, range_max=1, interactive=True).
See if this works for you.

I have done that as well. These are included in the plot options listed in my original post. These had no affect (but did not crash my computer).

I got the reason. Use:
rescale=True
This should work.

This does not work either.

...