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

Adjust auto frame interval for themes #4991

Merged
merged 6 commits into from
Mar 19, 2021
Merged

Adjust auto frame interval for themes #4991

merged 6 commits into from
Mar 19, 2021

Conversation

maxrjones
Copy link
Member

Description of proposed changes

This PR relaxes the increase in annotation/frame/grid intervals from the gmt themes branch to minimize the instances in which 1 or fewer annotations are plotted on an axis.

For example:
gmt basemap -JM6c -R-125/-121/47/48 -B -png map

Before:
image
After:
image

Fixes #4955

Reminders

  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

Copy link
Member

@PaulWessel PaulWessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve, but just checking/letting you know that the main reason that scale increased to 1.75 had to do with annotations in modern changing from 37 to 37N etc. However, I do think there was more, hm, gut/guess involved than science in picking that factor. It looked OK for some examples I looked at but clearing here we are because of it. Looks like you checked lots of examples so I am happy with that.

@maxrjones
Copy link
Member Author

maxrjones commented Mar 18, 2021

I approve, but just checking/letting you know that the main reason that scale increased to 1.75 had to do with annotations in modern changing from 37 to 37N etc. However, I do think there was more, hm, gut/guess involved than science in picking that factor. It looked OK for some examples I looked at but clearing here we are because of it. Looks like you checked lots of examples so I am happy with that.

Yes, I appreciated that there were comments in the code explaining that decision. In the PostScript files that needed updating with this change, I found that there were more that went from an insufficient number of annotations to a reasonable number than there were going from a good distance between annotation text to a bad distance. You are right, it's subjective.

edit: to clarify, I didn't think any of the annotations became problematically close, although I would select greater spacing for plots with custom -B axes settings.

If you didn't see, PyGMT just implemented a separate 'data version control' for their test images. Maybe if that works well we can use it and then update the frame selections as much as we need without the downsides related to repo size - GenericMappingTools/pygmt#1036.

@PaulWessel
Copy link
Member

We should discuss doing the same for GMT. If I understand correctly it would limit the inclusion of large files into the GMT repo.

@maxrjones
Copy link
Member Author

We should discuss doing the same for GMT. If I understand correctly it would limit the inclusion of large files into the GMT repo.

Agreed. It will be good to see how it goes for PyGMT before putting effort into migrating the baseline images. So, we could discuss at the community meeting or in a GitHub issue around that time.

@maxrjones maxrjones merged commit 63ed1c1 into master Mar 19, 2021
@maxrjones maxrjones deleted the themes-auto-frames branch March 19, 2021 00:03
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 this pull request may close these issues.

Potential issues or breaking changes with the GMT modern theme?
2 participants