earthpy
earthpy copied to clipboard
Add custom legends with plot_bands
Right now you need to use core MPL to create a custom legend with earthpy. it would be much nicer if you could simply call a custom legend from within plot_bands.
# Create a colormap from a list of colors
cmap = ListedColormap(colors)
f, ax = plt.subplots()
im = ax.imshow(lidar_chm_class_ma,
cmap=cmap)
ep.draw_legend(im, titles=height_class_labels)
ax.set_axis_off()
plt.show()