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

Caropy text in logo is off center #1465

Open
acertelijah opened this issue Feb 12, 2020 · 2 comments · May be fixed by #1590
Open

Caropy text in logo is off center #1465

acertelijah opened this issue Feb 12, 2020 · 2 comments · May be fixed by #1590

Comments

@acertelijah
Copy link

Description

I was reading the Cartopy wiki and noticed the logo. The text is not center as the 'C' in Cartopy has less left whitespace than the 'y'

Code to reproduce

https://scitools.org.uk/cartopy/docs/latest/_static/cartopy.png
@philippemiron
Copy link
Contributor

philippemiron commented Jun 16, 2020

Hi, everyone.

I found that the origin should be set to (-171.0140625, -43.66250001) instead of the (-175, -35) currently sets in the cartopy logo.

The code to get those value is here.

In summary what I did is:

  1. create a function that return the center of a matplotlib.textpath.TextPath using the same scaling as the current cartopy logo.
  2. use scipy.optimize.minimize() to find the origin to horizontally centered the text 'cartopy'.
  3. use scipy.optimize.minimize() to find the origin to vertically centered the letter 'o' (the letters in 'cartopy' don't extended symmetrically so scaling only with the letter 'o' in the vertical gives a better result).

I included a comparison at the end of the script.

Screen Shot 2020-06-16 at 6 58 29 PM

@QuLogic
Copy link
Member

QuLogic commented Jun 19, 2020

The location is pretty arbitrary; would you like to open a PR with that new origin (perhaps with slightly less precision)?

@philippemiron philippemiron linked a pull request Jun 20, 2020 that will close this issue
@dopplershift dopplershift linked a pull request Jul 13, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants