clawpack / visclaw

Clawpack visualization tools
http://www.clawpack.org
BSD 3-Clause "New" or "Revised" License
29 stars 47 forks source link

visclaw/src/matlab/plotframe2.m not plotting correctly #254

Closed temaltba closed 4 years ago

temaltba commented 4 years ago

I am trying to plot 3 levels of refinement using a pcolor plot. The figure pops up and is completely blank. I have isolated the issue to lines 384 and 385.

(380) % Increase it sligtly to make sure that we can see all the patches (381) % plotted at the different z levels. (382) % Also, make sure the zero level is visible (so user can add (383) % curves, etc to plot). (384) zlim = [min(zlim)-0.001 0+0.001]; (385) set(gca,'zlim',[-maxlevels-1,0]);

If I comment out these lines, the plots look great.

mandli commented 4 years ago

This code makes a slight adjustment to the plotting levels so that z=0.0 is included as is often assumed to be an important point in tsunami and other plotting. Are you plotting values that are not centered at z=0?

temaltba commented 4 years ago

I see. I am not. My solution is strictly positive for all time.

mandli commented 4 years ago

Have you tried to explicitly set the colorbar limits?

temaltba commented 4 years ago

It seems to be working fine (when compared to python plotting) if I comment out lines 384 and 385, and replace them with the standard: set(gca,'ZLimMode','auto'); zlim = get(gca,'zlim')

mandli commented 4 years ago

Did you get this all to work now?

temaltba commented 4 years ago

Yes. It's working just fine.