Skip to content

Commit 6e44be0

Browse files
committed
Fix: wrong display of missing data in World plots
1 parent 1e9e1f3 commit 6e44be0

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,5 @@ deviations implied by constraints on the error probability distribution and the
133133
Examples above illustrate the mean, the standard deviation and the minimum-to-maximum
134134
range of normalized simulated errors for an ensemble of ten variants of global monthly
135135
sea surface temperature (January 2000). The standard deviation and range of normalized
136-
errors is reduced at the North Pole and in the Weddell and Ross Sea due to constraints
137-
imposed by the freezing point of seawater.
136+
errors is reduced at the North Pole and in the Weddell Sea due to constraints imposed
137+
by the freezing point of seawater.
-1.03 MB
Loading
-1010 KB
Loading
-1010 KB
Loading

kaleidoscope/val/plots.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def plot(
5050
y: Literal["lat", "latitude"] | None = None,
5151
) -> Figure:
5252
if projection is None:
53-
projection = self.projection
53+
projection = self.sinusoidal
5454
fig, ax = plt.subplots(
5555
figsize=plot_size,
5656
subplot_kw={"projection": projection},
@@ -99,15 +99,32 @@ def land(self):
9999
)
100100

101101
@property
102-
def projection(self):
103-
"""Returns the default projection."""
102+
def interrupted_goode_homolosine(self):
103+
"""
104+
Returns the Interrupted Goode Homolosine projection
105+
for ocean.
106+
107+
Plots using this projection do not show missing data
108+
transparent (white).
109+
"""
104110
from cartopy.crs import InterruptedGoodeHomolosine
105111

106112
return InterruptedGoodeHomolosine(
107113
central_longitude=-160.0,
108114
emphasis="ocean",
109115
)
110116

117+
@property
118+
def sinusoidal(self):
119+
"""
120+
Returns the sinusoidal projection.
121+
"""
122+
from cartopy.crs import Sinusoidal
123+
124+
return Sinusoidal(
125+
central_longitude=0.0,
126+
)
127+
111128
@property
112129
def transform(self):
113130
"""Returns the default transform."""

0 commit comments

Comments
 (0)