Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-tune positioning of city labels #6

Open
ruestefa opened this issue Dec 3, 2020 · 1 comment
Open

Fine-tune positioning of city labels #6

ruestefa opened this issue Dec 3, 2020 · 1 comment

Comments

@ruestefa
Copy link
Contributor

ruestefa commented Dec 3, 2020

Right now (v0.13.11), city labels are all positioned the same relative to the city marker. In some cases, this leads to overlap with borders, rivers or other city labels.

TODO: Fine-tune city label positioning to prevent the most egregious cases of overlap.

Possibilities:

  • Given this is a common problem, maybe there is already some information on label positioning available in the shapefiles. (Probably not, but this should be checked at least.)
  • Hard-code fine-tuned offsets for some cities in the code.
@ruestefa
Copy link
Contributor Author

This could relatively easily be implemented in pyflexplot.plotting.map_axes::MapAxes::_ax_add_cities by hardcoding lat/lon offsets for certain cities, analogous to the hardcoded exclusion of certain cities (see #5 ). Although, it would be cleaner to add a dictionary of offsets per city to MapAxesConfig and define it in pyflexplot.plots, which would also make it easy to make the offsets dependent on the model, domain etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant