Skip to content

Commit

Permalink
Merge branch 'clawpack:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
AsianHam authored Aug 6, 2021
2 parents 7b26487 + b03b0d4 commit 028801c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/python/visclaw/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ def __init__(self, name, plotfigure):
self.add_attribute('afteraxes',None)
self.add_attribute('xlimits',None)
self.add_attribute('ylimits',None)
self.add_attribute('skip_patches_outside_xylimits',True)
self.add_attribute('skip_patches_outside_xylimits',None)
self.add_attribute('scaled',False) # true so x- and y-axis scaled same
self.add_attribute('image',False) # true so x- and y-axis scaled same
# and plot bounds tight
Expand Down
20 changes: 17 additions & 3 deletions src/python/visclaw/frametools.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,21 @@ def plot_frame(framesolns,plotdata,frameno=0,verbose=False):
beforeaxes = getattr(plotaxes,'beforeaxes',None)
current_data = run_str_or_func(beforeaxes,current_data)

skip_patches_outside_xylimits = plotaxes.skip_patches_outside_xylimits

if skip_patches_outside_xylimits is None:
# User didn't set. Set to True unless there's a mapped grid

mapc2p_exists = (plotdata.mapc2p is not None)
if not mapc2p_exists:
# check every item in case there's a mapc2p:
for itemname in plotaxes._itemnames:
plotitem = plotaxes.plotitem_dict[itemname]
mapc2p_exists = mapc2p_exists or \
(plotitem.mapc2p is not None)

skip_patches_outside_xylimits = not mapc2p_exists


# NOTE: This was rearranged December 2009 to
# loop over patches first and then over plotitems so that
Expand All @@ -214,10 +229,9 @@ def plot_frame(framesolns,plotdata,frameno=0,verbose=False):
# loop over patches:
# ----------------

num_skipped = 0
skip_patches_outside_xylimits = \
getattr(plotaxes,'skip_patches_outside_xylimits',True)

num_skipped = 0

for stateno,state in enumerate(framesoln.states):

patch = state.patch
Expand Down

0 comments on commit 028801c

Please sign in to comment.