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

ex22.rst 1.3 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
  1. .. _example_22:
  2. (22) World-wide seismicity the last 7 days
  3. ------------------------------------------
  4. The next example uses the command-line tool **curl** to obtain a data
  5. file from a specified URL [1]_. In the example script this line is
  6. commented out so the example will run even if you do not have **wget**
  7. (we use the remote file ``usgs_quakes_22.txt`` which normally would be created by **curl**);
  8. remove the comments to get the actual current seismicity plot using the
  9. live data. The main purpose of this script is not to show how to plot a
  10. map background and a few circles, but rather demonstrate how a map
  11. legend may be composed using the module
  12. :doc:`legend </legend>`. Some scripting is used to
  13. pull out information from the data file that is later used in the
  14. legend. The legend will normally have the email address of the script
  15. owner; here that command is commented out and the user is hardwired to
  16. "GMT guru". The USGS logo, taken from their web page and converted to a
  17. Sun raster file, is used to spice up the legend.
  18. The script produces the plot in Figure,
  19. giving the URL where these and similar data can be obtained.
  20. .. literalinclude:: /_verbatim/ex22.txt
  21. :language: bash
  22. .. figure:: /_images/ex22.*
  23. :width: 500 px
  24. :align: center
  25. World-wide seismicity the last 7 days.
  26. Footnote
  27. ~~~~~~~~
  28. .. [1]
  29. You can also use the utility **curl**
Tip!

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

Comments

Loading...