diff --git a/examples/example_concentration.py b/examples/example_concentration.py index aa17442..ff9c0da 100644 --- a/examples/example_concentration.py +++ b/examples/example_concentration.py @@ -66,9 +66,14 @@ plt.show() #%% -# Plot the vertical profiles of oil concentration versus depth +# Plot a vertical profile (east to west) of the oil concentration oil_mass_profile = ds_c.mass_oil_volume_concentration.median(dim='lat') print(oil_mass_profile) +oil_mass_profile.plot(y='z', ylim=(None, 0)) +plt.show() + +#%% +# Plot the vertical profiles as lines oil_mass_profile.plot.line( y='z', add_legend=False, xlim=(0, None), ylim=(None, 0)) plt.xlabel('Oil concentration [kg / m3]') diff --git a/trajan/plot/__init__.py b/trajan/plot/__init__.py index 0c6a925..e75a6b1 100644 --- a/trajan/plot/__init__.py +++ b/trajan/plot/__init__.py @@ -200,13 +200,11 @@ def lines(self, *args, **kwargs): segments = np.concatenate([points[:-1], points[1:]], axis=1) if cartesian: lc = LineCollection(segments, - cmap='jet', norm=norm, *args, **kwargs) else: lc = LineCollection(segments, - cmap='jet', norm=norm, transform=dcrs, *args,