question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 https://github.com/GenericMappingTools/pygmt/pull/325#issuecomment-540203439) 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”!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
willschlitzercommented, Dec 7, 2020

I’ll take on this issue.

0reactions
seismancommented, Dec 11, 2020

Closed by #720.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - Sphinx documentation
This file (containing Python code) is called the “build configuration file” and contains (almost) all configuration needed to customize Sphinx input and output ......
Read more >
Documenting Your Project Using Sphinx - PythonHosted.org
To get started, cd into the documentation directory and type: $ sphinx-quickstart Please enter values for the following settings (just press Enter to...
Read more >
Populating our documentation - Sphinx-RTD-Tutorial
We start by creating a intro. rst file in our Sphinx source root (the same directory as the index. rst and simpleble.
Read more >
melissawm/minimalsphinx: A repo with a minimal ... - GitHub
A repo with a minimal Sphinx example for Python documentation. ... However, if you run this command now, you may see some WARNINGS...
Read more >
SphinxTutorial Documentation - Read the Docs
The first thing we want to do is to configure Sphinx to use the RTD theme we previously installed (see Installation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found