Skip to content

Commit

Permalink
Update the description of the plotting origin on canvas (#1330)
Browse files Browse the repository at this point in the history
* Update the description of the plotting origin on canvas

* Update source/basis/canvas.rst

* Update source/basis/canvas.rst
  • Loading branch information
seisman authored Jul 13, 2024
1 parent 99456b0 commit 754708d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions source/basis/canvas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,12 @@ PS 图片格式是一个例外。若选择 PS 作为图片格式,则默认画
--------

GMT 在绘图时,默认的绘图原点(即底图边框左下角)位于画布(11.6 米宽、11.6 米高)的
左下角 (12.7 cm, 12.7 cm) 处(下图中红色圆圈)。因而绘图时,如果需要移动绘图原点,
只能向右和向上移动,而不能向左或向下移动。向左或向下移动绘图原点超过 12.7 厘米,
左下角 (40 inch, 40 inch) (约 100 cm, 100 cm 处(下图中红色圆圈)。因而绘图时,如果需要移动绘图原点,
只能向右和向上移动,而不能向左或向下移动。向左或向下移动绘图原点超过 100 厘米,
均可能使得部分图件超过画布左边界或下边界,导致图件被部分截断。

.. The figure below is generated by canvas_plot_origin.sh
.. figure:: https://user-images.githubusercontent.com/3974108/129927436-e79abde3-c475-4c85-832b-2a30c05c35d3.png
.. gmtplot:: canvas_plot_origin.sh
:show-code: false
:width: 85%
:align: center

Expand Down
4 changes: 2 additions & 2 deletions source/basis/canvas_plot_origin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ gmt begin canvas_plot_origin png
echo 0 0 180 2.54c | gmt plot -Sv0.4c+b+e+gblack -W1p -N
echo 0 0 270 2.54c | gmt plot -Sv0.4c+b+e+gblack -W1p -N
echo 0 0 | gmt plot -Sc0.4c -Gred -N
echo 0 0 12.7 cm | gmt text -F+f15p,1,red -N -D-1.25c/0.4c
echo 0 0 12.7 cm | gmt text -F+f15p,1,red+a270 -N -D0.4c/-1.25c
echo 0 0 1.0 m | gmt text -F+f15p,1,red -N -D-1.25c/0.4c
echo 0 0 1.0 m | gmt text -F+f15p,1,red+a270 -N -D0.4c/-1.25c

# plot the canvas
gmt basemap -R0/30/0/30 -Jx1c -Bg1 -Xf0c -Yf0 --MAP_GRID_PEN=0.2p,gray20
Expand Down

0 comments on commit 754708d

Please sign in to comment.