Skip to content

[Easy task if you know some sphinx] Add example for setting map titleย #335

Description

@weiji14

Description of the problem

Even though it's in the title, our map ๐Ÿ—บ๏ธ tutorial for setting map frames, ticks, titles and labels doesn't actually teach us how to set a title!

Current title-less map

We'll need your help ๐Ÿ‘‹ to add that to the example. You'll be working on the pygmt/examples/tutorial/frames.py file which you can edit here or in your Text Editor or Integrated Development Environment (IDE).

To do that, you'll need to know how to use the the frame (B) setting in the basemap function. Specifically, you might need to refer to the GMT docs on setting the B-option. This one line of code below (adapted from #325 (comment)) is part of what you need to do the trick:

fig.basemap(frame=["ag", "+tTitle"]

You can find out more about contributing in our CONTRIBUTING.md docs. Leave a comment below if you'd like to start working on this and feel free to ask for help! It's actually as much of a learning experience for us as it will be for you ๐Ÿ˜„

Stretch goals

In addition to setting a title, Find out how to set an x-axis label called "Longitude" and y-axis label called "Latitude"!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedHelping hands are appreciatedscipy-sprintThings to work on during the SciPy sprint!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions