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

ex04.rst 2.1 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
  1. .. _example_04:
  2. (4) A 3-D perspective mesh plot
  3. -------------------------------
  4. This example will illustrate how to make a fairly complicated composite
  5. figure. We need a subset of the ETOPO5 bathymetry [1]_ and Geosat geoid
  6. data sets which we have extracted from the global data grids using
  7. :doc:`grdcut </grdcut>` and access those files here as remote files
  8. on the GMT data server. We would like to show a
  9. 2-layer perspective plot where layer one shows a contour map of the
  10. marine geoid with the location of the Hawaiian islands superposed, and a
  11. second layer showing the 3-D mesh plot of the topography. We also add an
  12. arrow pointing north and some text. The first part of this script shows
  13. how to do it:
  14. .. literalinclude:: /_verbatim/ex04.txt
  15. :language: bash
  16. The purpose of the CPT ``zero.cpt`` is to have the positive topography
  17. mesh painted light gray (the remainder is white). The left side of
  18. Figure shows the complete illustration.
  19. .. figure:: /_images/ex04.*
  20. :width: 500 px
  21. :align: center
  22. 3-D perspective mesh plot (left) and colored version (right).
  23. The second part of the script shows how to make the color version of
  24. this figure that was printed in our first article in *EOS Trans. AGU* (8
  25. October 1991). Using :doc:`grdview </grdview>` one can
  26. choose to either plot a mesh surface (left) or a color-coded surface
  27. (right). We have also added artificial illumination from a light-source
  28. due north, which is simulated by computing the gradient of the surface
  29. grid in that direction though the
  30. :doc:`grdgradient </grdgradient>` program. We choose to
  31. use the **-Qc** option in :doc:`grdview </grdview>` to
  32. achieve a high degree of smoothness. Here, we select 100 dpi since that
  33. will be the resolution of our final raster (The EOS raster was 300 dpi).
  34. Note that the size of the resulting output file is directly dependent on
  35. the square of the dpi chosen for the scanline conversion and how well
  36. the resulting image compresses. A higher value for dpi in **-Qc** would
  37. have resulted in a much larger output file. The CPTs were taken
  38. from Example :ref:`example_02`.
  39. Footnote
  40. ~~~~~~~~
  41. .. [1]
  42. These data are available from NCEI (www.ncei.noaa.gov).
Tip!

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

Comments

Loading...