oggm
oggm copied to clipboard
plot_centerlines map extent issue
When plotting centerlines for multiple glaciers onto the same axes (i.e. by running oggm.graphics.plot_centerlines(gdirs)
where gdirs
is a list of glacier directories), only some of glaciers are displayed in full on the axes. It appears that there is an issue with the way the map extent is set which means that some glaciers are only partially visible. The same problem occurs with the plot_domain
and plot_catchment_width
function.
Thanks for the report!
We are aware of that, and I think it would be nice to make it more flexible indeed. So the current map extent is chosen by the map extent from the first glacier in the list: https://github.com/OGGM/oggm/blob/fecd45c68164f39d07cf6bbd3cad0a6cf4800a83/oggm/graphics.py#L144
This choice was mainly out of convenience, and because we can then use the DEM from this glacier for topographical shading and the topo map background, etc.
We could add an option to compute the plot map extent from the provided list of glaciers relatively easily, but the the downside is that we won't be able to use either topographical shading or topo coloring. Would you be willing to give it a try? It might involve changes at several places in the graphics package, and should be an option (by keyword argument), not the new default