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

Fix typos in syntax of the projection documentation #2269

Merged
merged 11 commits into from
Dec 26, 2022
Merged

Conversation

yvonnefroehlich
Copy link
Member

Description of proposed changes

This PR aims to fix some typos in the syntax of the projections, including both the overview table and the separate documentation pages.

Start in #2253
Fixes #2059

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Dec 23, 2022
@yvonnefroehlich yvonnefroehlich added this to the 0.8.0 milestone Dec 23, 2022
@yvonnefroehlich yvonnefroehlich marked this pull request as draft December 23, 2022 21:56
@yvonnefroehlich yvonnefroehlich changed the title Fix typos in syntax of the projection documentation WIP: Fix typos in syntax of the projection documentation Dec 23, 2022
@yvonnefroehlich
Copy link
Member Author

Additionally to the typo fixes, I expanded the docs for the Cylinderical equistant projection based on the upstrem GMT documentation (I saw the typo "map map" in the subsection Parameters).

The same is needed for the Polyconic projection. Here the upstream GMT documentation seems to contain a copy-past-error (please see the subsection Parameters) from the Lambert conic conformal projection above. I have to understand how the Polyconic projection works before I can update the docs (I never used this projection) 🙂. Currently I don't know what lat0 does or should do. I wrote a code example (PyGMT dev, GMT 6.4) in which lat0 is varied, but all figures look the same (please see below). @GenericMappingTools/pygmt-maintainers maybe one of you has already used this projection and can help out, please.

Code example

# source: https://www.pygmt.org/dev/projections/conic/polyconic.html
# last access: 2022/12/24
# modification: variation of lat0
import pygmt

lat0 = [-40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80]

for lat0_i in lat0:
    
    fig = pygmt.Figure()
    fig.coast(
        shorelines="1/0.5p",
        region=[-180, -20, 0, 90],
        projection="Poly/-100/" + str(lat0_i) + "/12c",
        land="gray",
        borders="1/thick,black",
        frame="afg10",
    )
    fig.text(
        position="TL",
        text="lat0 = " + str(lat0_i) + " deg",
    )
    fig.show()

Output figure (for all lat0 values)
Poly10

@yvonnefroehlich yvonnefroehlich marked this pull request as ready for review December 25, 2022 17:36
@yvonnefroehlich
Copy link
Member Author

@GenericMappingTools/pygmt-maintainers can you please review this PR (I apologize for getting headache from this 😕).

@yvonnefroehlich yvonnefroehlich changed the title WIP: Fix typos in syntax of the projection documentation Fix typos in syntax of the projection documentation Dec 25, 2022
@yvonnefroehlich yvonnefroehlich added the needs review This PR has higher priority and needs review. label Dec 25, 2022
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Dec 26, 2022
@seisman
Copy link
Member

seisman commented Dec 26, 2022

Additionally to the typo fixes, I expanded the docs for the Cylinderical equistant projection based on the upstrem GMT documentation (I saw the typo "map map" in the subsection Parameters).

The same is needed for the Polyconic projection. Here the upstream GMT documentation seems to contain a copy-past-error (please see the subsection Parameters) from the Lambert conic conformal projection above. I have to understand how the Polyconic projection works before I can update the docs (I never used this projection) 🙂. Currently I don't know what lat0 does or should do. I wrote a code example (PyGMT dev, GMT 6.4) in which lat0 is varied, but all figures look the same (please see below). @GenericMappingTools/pygmt-maintainers maybe one of you has already used this projection and can help out, please.

Code example

# source: https://www.pygmt.org/dev/projections/conic/polyconic.html
# last access: 2022/12/24
# modification: variation of lat0
import pygmt

lat0 = [-40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80]

for lat0_i in lat0:
    
    fig = pygmt.Figure()
    fig.coast(
        shorelines="1/0.5p",
        region=[-180, -20, 0, 90],
        projection="Poly/-100/" + str(lat0_i) + "/12c",
        land="gray",
        borders="1/thick,black",
        frame="afg10",
    )
    fig.text(
        position="TL",
        text="lat0 = " + str(lat0_i) + " deg",
    )
    fig.show()

Output figure (for all lat0 values) Poly10

Ping @PaulWessel for comments on this.

@PaulWessel
Copy link
Member

Let's see if @remkos has thoughts since I am pretty sure he added this projection.

@seisman seisman merged commit 6ae1be9 into main Dec 26, 2022
@seisman seisman deleted the fix-typos-13 branch December 26, 2022 15:00
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent syntax for projections in documentation
4 participants