Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

figure.rst 3.6 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
  1. .. index:: ! figure
  2. .. include:: module_core_purpose.rst_
  3. ******
  4. figure
  5. ******
  6. |figure_purpose|
  7. Synopsis
  8. --------
  9. .. include:: common_SYN_OPTs.rst_
  10. **gmt figure** *prefix* [*formats*] [*options*]
  11. [ |SYN_OPT-V| ]
  12. |No-spaces|
  13. Description
  14. -----------
  15. A GMT modern session can make any number of illustrations (including none).
  16. In situations when multiple illustrations will be made during a single session ,
  17. the **figure** module is used to specify the name and format(s) to use for the next plot.
  18. It must be issued before you start plotting to the intended figure, and each
  19. new **figure** call changes plotting focus to the next figure. You may go back and forth between
  20. different figures but the optional arguments (*formats* and *options*) can only
  21. be given the first time you specify a new figure.
  22. In addition to *prefix* and *formats*, you can supply a comma-separated series of
  23. :doc:`psconvert` *options* that will override the default settings provided via
  24. :term:`PS_CONVERT` [**A**]. The only other available options control the verbosity.
  25. Each figure maintains its own history and settings, so
  26. memory of region and projection settings only apply on a per figure basis.
  27. Required Arguments
  28. ------------------
  29. *prefix*
  30. Name stem used to construct the figure name. The extension(s) are appended
  31. automatically from your *formats* selection(s).
  32. While not recommended, if your *prefix* has spaces in it then you must enclose your
  33. prefix in single quotes.
  34. Optional Arguments
  35. ------------------
  36. .. _figure-formats:
  37. *formats*
  38. Give one or more comma-separated graphics extensions from the list of allowable graphics
  39. :ref:`formats <tbl-formats>` (default is configurable via setting GMT_GRAPHICS_FORMAT [pdf]).
  40. .. _figure-options:
  41. *options*
  42. Sets one or more comma-separated options (and possibly arguments) that
  43. can be passed to :doc:`psconvert` when preparing this figure [**A**].
  44. The valid subset of options are
  45. **A**\ [*args*],\ **C**\ *args*,\ **D**\ *dir*,\ **E**\ *dpi*,\ **H**\ *factor*,\ **M**\ *args*,\ **Q**\ *args*,\ **S**.
  46. See the :doc:`psconvert` documentation for details on these options.
  47. .. _-V:
  48. .. |Add_-V| unicode:: 0x20 .. just an invisible code
  49. .. include:: explain_-V.rst_
  50. .. include:: explain_help_nopar.rst_
  51. .. include:: explain_postscript.rst_
  52. Examples
  53. --------
  54. To start a new figure in your current modern mode session by the name Regional and
  55. request we make both a PDF and an EPS file, try::
  56. gmt begin
  57. gmt figure Regional pdf,eps
  58. gmt ...
  59. gmt end show
  60. To start a new figure GlobalMap that should be returned as a JPEG file with a 1 cm padding
  61. around the image, try::
  62. gmt begin
  63. gmt figure GlobalMap jpg A+m1c
  64. gmt ...
  65. gmt end show
  66. If the same figure were to be called Global Map.jpg you would need quotes::
  67. gmt begin
  68. gmt figure 'Global Map' jpg A+m1c
  69. gmt ...
  70. gmt end show
  71. To make two figures in one session and go back and forth between different figures::
  72. gmt begin
  73. # Activate figure Fig1
  74. gmt figure Fig1 pdf
  75. gmt ...
  76. # Activate figure Fig1
  77. gmt figure Fig2 pdf
  78. gmt ...
  79. # Go back to figure Fig1
  80. gmt figure Fig1
  81. gmt ...
  82. # Go back to figure Fig2
  83. gmt figure Fig2
  84. gmt ...
  85. gmt end show
  86. Technical Note
  87. --------------
  88. If you are calling **figure** from an external environment and you do not want the plot to
  89. be converted automatically when the session ends, perhaps because you wish to do this yourself,
  90. you can specify the file name or figure format as - (i.e., just a hyphen).
  91. See Also
  92. --------
  93. :doc:`begin`,
  94. :doc:`clear`,
  95. :doc:`docs`,
  96. :doc:`end`,
  97. :doc:`inset`,
  98. :doc:`subplot`,
  99. :doc:`gmt`
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...