diff --git a/examples/projections/nongeo/cartesian.py b/examples/projections/nongeo/cartesian.py new file mode 100755 index 00000000000..c753cae2a60 --- /dev/null +++ b/examples/projections/nongeo/cartesian.py @@ -0,0 +1,21 @@ +""" +Cartesian +========= + +``Xwidth/[height]``: Give the ``width`` of the figure and the optional argument ``height``. +""" +import pygmt + +fig = pygmt.Figure() +fig.plot( + # The ``x`` and ``y`` parameters are used to plot lines on the figure. + x=[3, 9, 2], + y=[4, 9, 37], + pen="3p,red", + # ``region`` sets the x and y ranges or the Cartesian figure. + region=[0, 10, 0, 50], + # The argument ``WSne`` is passed to ``frame`` to put axis labels only on the left and bottom axes. + projection="X15c/10c", + frame=["af", "WSne"], +) +fig.show() diff --git a/examples/projections/nongeo/polar.py b/examples/projections/nongeo/polar.py new file mode 100644 index 00000000000..f40593abb45 --- /dev/null +++ b/examples/projections/nongeo/polar.py @@ -0,0 +1,22 @@ +""" +Polar +===== + +``Pwidth``: Give the ``width`` of the figure. + +""" +import pygmt + +fig = pygmt.Figure() +fig.plot( + # x inputs are the theta values for a polar plot. + x=[180, 120, 270, 60, 0], + # y inputs are the radius values for a polar plot. + y=[15, 35, 15, 35, 15], + pen="2p,blue", + # The region values are theta-min/theta-max/radius-min/radius-max. + region=[0, 360, 0, 40], + projection="P15c", + frame=["afg"], +) +fig.show()