Skip to content
Merged

Dev #174

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion examples/example_concentration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]')
Expand Down
2 changes: 0 additions & 2 deletions trajan/plot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading