Add several map projection options#898
Conversation
|
I like it! I was thinking whether one could give even more flexibility to the user rather than just 4 options: plotting:
projection:
name: Orthographic
# kwargs
central_longitude: 10.
central_latitude: 50.proj_kwargs = snakemake.params.plotting.get("projection", dict(name="EqualEarth"))
proj_func = getattr(ccrs, proj_kwargs.pop("name"))
proj = proj_func(**proj_kwargs)The plotting:
projection:
name: EqualEarthThis would unlock in principle all Then, one could just document a few recommended options that are currently explicit in the code. |
|
Sure, sounds good! I just haven't really gotten comfortable with the whole For now I've given one reasonable alternative example (commented) in config.default.yaml, along with a link to the complete list of projections. I feel like this should provide a useful starting point for the user, but feel free to move things or let me know if you'd for instance rather document alternatives in |
It's quite petty but being based in the north of Norway I can't really deal with the default EqualEarth projections and its wild distortions. I say give the user some (limited) choice in projection without them having to do surgery on the
plot_network.pyscript. Do feel free to discard (I will just keep it for personal use) if this kind of "feature creep" isn't really desired.Changes proposed in this Pull Request
Added a
config["plotting"]["projection"]option with a few different preset choices. Falls back to the old default of EqualEarth if not specified.Checklist
envs/environment.yaml.config.default.yaml.doc/configtables/*.csv.doc/release_notes.rstis added.