Uh oh!
There was an error while loading. Please reload this page.
Consistent usage of whitespaces across gallery and tutorial examples - #2018
Consistent usage of whitespaces across gallery and tutorial examples#2018seisman merged 15 commits into
Conversation
yvonnefroehlich
commented
Jul 22, 2022
In the section Title of the Tutorial 'Frames, ticks, titles, and labels': ################################################################################ Title# -----## The figure title can be set by passing **+t**\ *title* to the ``frame``# parameter of :meth:`pygmt.Figure.basemap`. Passing multiple arguments to# ``frame`` can be done by using a list, as show in the example below.fig=pygmt.Figure()
# region="IS" specifies Iceland using the ISO country codefig.coast(shorelines="1/0.5p", region="IS", projection="M25c")
fig.basemap(frame=["a", "+tIceland"])
fig.show()
################################################################################ To use a title with multiple words, the title must be placed inside another# set of quotation marks. To prevent the quotation marks from appearing in the# figure title, the ``frame`` parameter can be passed in single quotation marks# and the title can be passed in double quotation marks.fig=pygmt.Figure()
# region="TT" specifies Trinidad and Tobagofig.coast(shorelines="1/0.5p", region="TT", projection="M25c")
fig.basemap(frame=["a", '+t"Trinidad and Tobago"'])
fig.show()
@seisman: Is this fine, or do you prefer to go with the 'Island' map as an example? |
seisman
commented
Jul 22, 2022
Both sound good to me! |
…titles, and labels'
seisman
commented
Jul 24, 2022
This PR looks good. Are there any more changes you want to make in this PR? |
seisman
commented
Jul 24, 2022
I think we also need to update a few tests. These tests can be updated in this PR or in a separate PR. |
yvonnefroehlich
commented
Jul 24, 2022
Regarding the gallery and tutorials, I think I have found and changed all affected examples.
Good point! Yes.
There is no real preference from my side on this. I can also open a new PR for updating the tests. |
Perhaps we should keep a few unit tests around that use the nested quotes, as a regression test to ensure backwards compatibility is preserved? |
seisman
commented
Jul 24, 2022
We already have the following test in docstrings. Do you think it's enough? Lines 189 to 198 in 4902687 |
weiji14
commented
Jul 24, 2022
Oh yes true. That one should be enough. |
Description of proposed changes
Fixes#2013
Overview of affected examples
Tutorials
Gallery
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version