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

nonweightedrect.sh 2.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
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
  1. #!/usr/bin/env bash
  2. # Test most operators in gmtbinstats for rectangular binning, without weights
  3. gmt begin nonweightedrect ps
  4. gmt set FONT_TAG 12p MAP_FRAME_TYPE plain
  5. gmt subplot begin 7x2 -Fs3i/1.25i -M15p/5p -A+gwhite -Scb -Srl -Bwstr -R-110/250/-75/75 -JQ70E/3i -X1.25i -Y0.5i
  6. # Plot data
  7. gmt subplot set 0 -Adata
  8. gmt makecpt -T0/10000000 -Cjet
  9. gmt coast -Glightgray
  10. gmt plot @capitals.gmt -a2=population -Sc0.1c -C
  11. # Plot mean population
  12. gmt subplot set 1 -Aa
  13. gmt binstats -I15 @capitals.gmt -a2=population -Ca -Gt.grd -Tr -fg
  14. gmt grdimage t.grd -JQ70E/3i
  15. # Plot MAD population
  16. gmt subplot set 2 -Ad
  17. gmt binstats -I15 @capitals.gmt -a2=population -Cd -Gt.grd -Tr -fg
  18. gmt grdimage t.grd
  19. # Plot stdev population
  20. gmt subplot set 3 -As
  21. gmt binstats -I15 @capitals.gmt -a2=population -Cs -Gt.grd -Tr -fg
  22. gmt grdimage t.grd
  23. # Plot inter-quartile range population
  24. gmt subplot set 4 -Ai
  25. gmt binstats -I15 @capitals.gmt -a2=population -Ci -Gt.grd -Tr -fg
  26. gmt grdimage t.grd
  27. # Plot minimum population
  28. gmt subplot set 5 -Al
  29. gmt binstats -I15 @capitals.gmt -a2=population -Cl -Gt.grd -Tr -fg
  30. gmt grdimage t.grd
  31. # Plot median population
  32. gmt subplot set 6 -Am
  33. gmt binstats -I15 @capitals.gmt -a2=population -Cm -Gt.grd -Tr -fg
  34. gmt grdimage t.grd
  35. # Plot number of points
  36. gmt subplot set 7 -An
  37. gmt binstats -I15 @capitals.gmt -Cn -Gt.grd -Tr -fg
  38. gmt grdimage t.grd
  39. # Plot LMSscale population
  40. gmt subplot set 8 -Ao
  41. gmt binstats -I15 @capitals.gmt -a2=population -Co -Gt.grd -Tr -fg
  42. gmt grdimage t.grd
  43. # Plot mode population
  44. gmt subplot set 9 -Ap
  45. gmt binstats -I15 @capitals.gmt -a2=population -Cp -Gt.grd -Tr -fg
  46. gmt grdimage t.grd
  47. # Plot quantile 75 population
  48. gmt subplot set 10 -Aq75
  49. gmt binstats -I15 @capitals.gmt -a2=population -Cq75 -Gt.grd -Tr -fg
  50. gmt grdimage t.grd
  51. # Plot range population
  52. gmt subplot set 11 -Ag
  53. gmt binstats -I15 @capitals.gmt -a2=population -Cg -Gt.grd -Tr -fg
  54. gmt grdimage t.grd
  55. # Plot sum population
  56. gmt subplot set 12 -Az
  57. gmt binstats -I15 @capitals.gmt -a2=population -Cz -Gt.grd -Tr -fg
  58. gmt grdimage t.grd
  59. # Plot maximum population
  60. gmt subplot set 13 -Au
  61. gmt binstats -I15 @capitals.gmt -a2=population -Cu -Gt.grd -Tr -fg
  62. gmt grdimage t.grd
  63. gmt subplot end
  64. gmt end show
Tip!

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

Comments

Loading...