Skip to content

Commit cef2b4b

Browse files
committed
geotop_lithok_in_cross_section added alpha
1 parent 14bd019 commit cef2b4b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nlmod/plot/plot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def data_array(da, ds=None, ax=None, rotated=False, edgecolor=None, **kwargs):
205205

206206

207207
def geotop_lithok_in_cross_section(
208-
line, gt=None, ax=None, legend=True, legend_loc=None, lithok_props=None, **kwargs
208+
line, gt=None, ax=None, legend=True, legend_loc=None, lithok_props=None, alpha=None, **kwargs
209209
):
210210
"""PLot the lithoclass-data of GeoTOP in a cross-section.
211211
@@ -227,6 +227,9 @@ def geotop_lithok_in_cross_section(
227227
lithok_props : pd.DataFrame, optional
228228
A DataFrame containing the properties of the lithoclasses.
229229
Will call nlmod.read.geotop.get_lithok_props() when None. The default is None.
230+
alpha : float, optional
231+
Opacity for plot_array function, The default is None.
232+
230233
231234
**kwargs : dict
232235
kwargs are passed onto DatasetCrossSection.
@@ -264,7 +267,7 @@ def geotop_lithok_in_cross_section(
264267
colors.append(lithok_props.at[lithok, "color"])
265268
cmap = ListedColormap(colors)
266269
norm = Normalize(-0.5, np.nanmax(array) + 0.5)
267-
cs.plot_array(array, norm=norm, cmap=cmap)
270+
cs.plot_array(array, norm=norm, cmap=cmap, alpha=alpha)
268271
if legend:
269272
# make a legend with dummy handles
270273
handles = []

0 commit comments

Comments
 (0)