Skip to content

Commit

Permalink
Add figure and example in cookbook for radians (#7585)
Browse files Browse the repository at this point in the history
* Add figure and example in cookbook for radians

This PR adds another basic wouth-axis plot but here we demonstrate annotations in powers and fractions of pi.

* Update GMT_-B_radians.sh

Show an example of radians annotations
  • Loading branch information
PaulWessel authored Aug 9, 2023
1 parent 5219810 commit f5186c7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/rst/source/cookbook/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,26 @@ One solution is to request slanted annotations for the x-axis (e.g., Figure :ref
via the **+a**\ *angle* modifier.


.. _axis_radians_basemap:

.. figure:: /_images/GMT_-B_radians.*
:width: 500 px
:align: center

Linear Cartesian projection axis with annotations and ticks in radians.

.. toggle::

Here is the source script for the figure above:

.. literalinclude:: /_verbatim/GMT_-B_radians.txt

There are occasions when the length of the annotations are such that placing them
horizontally (which is the default) may lead to overprinting or too few annotations.
One solution is to request slanted annotations for the x-axis (e.g., Figure :ref:`Axis label <axis_slanted_basemap>`)
via the **+a**\ *angle* modifier.


.. _axis_slanted_basemap:

.. figure:: /_images/GMT_-B_slanted.*
Expand Down
2 changes: 2 additions & 0 deletions doc/scripts/GMT_-B_radians.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
gmt basemap -R-4/2/0/1 -Jx2.5c -Bxapi3fpi6 -BS --GMT_THEME=cookbook -view GMT_-B_radians

0 comments on commit f5186c7

Please sign in to comment.