Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Python by dasdasdasdas ( 7 years ago )
lon_transect = lon[(lat== 30) & (lon > -80) & (lon < -10)]
bath_transect = bath[(lat== 30) & (lon > -80) & (lon < -10)]
lith_transect = litho[(lat== 30) & (lon > -80) & (lon < -10)]
fig = plt.figure(figsize=(15,5))
ax_map = fig.add_axes([0, 0, 0.7, 1.0])
plt.title ("Dybdetransekt av litologi, med fargekoder")
plt.plot(lon_transect, bath_transect, "k-", linewidth = 0.5)
transect = plt.scatter(lon_transect, bath_transect, c = lith_transect, cmap = cpt_convert, vmin=1, vmax = 13, zorder = 3 )
#setter inn titler
plt.xlabel("Longitude", labelpad = 20)
plt.ylabel ("Depth", labelpad = 20)
bounds = np.linspace(0.5, 13.5, 14)
norm = mpl.colors.BoundaryNorm(bounds, cpt_convert.N)
cbar = plt.colorbar(transect, cmap = cpt_convert, norm = norm,
spacing = 'proportional', ticks = bounds-.5, boundaries = bounds,
format = '%s',location = 'right', pad = 0.1)
cbar.set_ticklabels(sediment_types)
plt.show()
Revise this Paste