Skip to content

Commit

Permalink
Merge pull request #3857 from meeseeksmachine/auto-backport-of-pr-250…
Browse files Browse the repository at this point in the history
…4-on-yt-4.0.x

Backport PR #2504 on branch yt-4.0.x (Add masking for phase plots.)
  • Loading branch information
neutrinoceros authored Mar 22, 2022
2 parents f8903c8 + a32aea9 commit 71f1f75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ answer_tests:
- yt/frontends/owls/tests/test_outputs.py:test_snapshot_033
- yt/frontends/owls/tests/test_outputs.py:test_OWLS_particlefilter

local_pw_041: # PR 3670
local_pw_042: # PR 2504
- yt/visualization/tests/test_plotwindow.py:test_attributes
- yt/visualization/tests/test_particle_plot.py:test_particle_projection_answers
- yt/visualization/tests/test_particle_plot.py:test_particle_projection_filter
Expand Down
4 changes: 3 additions & 1 deletion yt/visualization/profile_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,10 +1130,12 @@ def _setup_plots(self):
else:
cmap = self._colormap_config[f]

masked_data = data.copy()
masked_data[~self.profile.used] = np.nan
self.plots[f] = PhasePlotMPL(
self.profile.x,
self.profile.y,
data,
masked_data,
x_scale,
y_scale,
z_scale,
Expand Down

0 comments on commit 71f1f75

Please sign in to comment.