Skip to content

Commit

Permalink
Merge pull request #2504 from matthewturk/mask_phase_plots
Browse files Browse the repository at this point in the history
Add masking for phase plots.
  • Loading branch information
neutrinoceros authored Mar 22, 2022
2 parents b9f26c4 + 52fc4b4 commit c150d95
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 @@ -95,7 +95,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 c150d95

Please sign in to comment.