Skip to content

Commit a32aea9

Browse files
neutrinocerosmeeseeksmachine
authored andcommitted
Backport PR yt-project#2504: Add masking for phase plots.
1 parent f8903c8 commit a32aea9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tests/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ answer_tests:
9494
- yt/frontends/owls/tests/test_outputs.py:test_snapshot_033
9595
- yt/frontends/owls/tests/test_outputs.py:test_OWLS_particlefilter
9696

97-
local_pw_041: # PR 3670
97+
local_pw_042: # PR 2504
9898
- yt/visualization/tests/test_plotwindow.py:test_attributes
9999
- yt/visualization/tests/test_particle_plot.py:test_particle_projection_answers
100100
- yt/visualization/tests/test_particle_plot.py:test_particle_projection_filter

yt/visualization/profile_plotter.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1130,10 +1130,12 @@ def _setup_plots(self):
11301130
else:
11311131
cmap = self._colormap_config[f]
11321132

1133+
masked_data = data.copy()
1134+
masked_data[~self.profile.used] = np.nan
11331135
self.plots[f] = PhasePlotMPL(
11341136
self.profile.x,
11351137
self.profile.y,
1136-
data,
1138+
masked_data,
11371139
x_scale,
11381140
y_scale,
11391141
z_scale,

0 commit comments

Comments
 (0)