gmt 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gmt.rb +28 -17
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88539f5f8f1bc7eaa33cad667f4f34bc05af82b5
|
4
|
+
data.tar.gz: 9f731cf9dbfb6e09895f2ebc030ad9d599fa25fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93f48be603b22f30cfd554e3ae78d8e037cd39a0505774a9756c2b048ba53274f587fa165647b7992c2eee1053603237f1818327cbf760428f637e38af322311
|
7
|
+
data.tar.gz: ee9b7af7e6e67a5334da37b78c7d69a1166f85dab656981a188040cf0be2e636cd5f3217914df9f91859158465e4fbc91bf9de8fb4a097499367468d9d87b299
|
data/lib/gmt.rb
CHANGED
@@ -10,22 +10,20 @@
|
|
10
10
|
#
|
11
11
|
# require 'gmt'
|
12
12
|
#
|
13
|
-
# common = {
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
# S: 'c0.25c',
|
28
|
-
# G: 'red'))
|
13
|
+
# common = { file: 'output.ps', R: '0/3/0/2', J: 'x1i' }
|
14
|
+
#
|
15
|
+
# GMT.session do |gmt|
|
16
|
+
# gmt.psxy('dots.xy',
|
17
|
+
# common.merge(
|
18
|
+
# position: :first,
|
19
|
+
# S: 'c0.50c',
|
20
|
+
# G: 'blue'))
|
21
|
+
# gmt.psxy('dots.xy',
|
22
|
+
# common.merge(
|
23
|
+
# position: :last,
|
24
|
+
# S: 'c0.25c',
|
25
|
+
# G: 'red'))
|
26
|
+
# end
|
29
27
|
#
|
30
28
|
# Those familiar with GMT will recognise the +-R+ (range) and +-J+ (projection)
|
31
29
|
# options which are now keys for the program options hash.
|
@@ -39,6 +37,12 @@
|
|
39
37
|
#
|
40
38
|
# There are no arguments for the constructor.
|
41
39
|
#
|
40
|
+
# A session object is also yielded by the {GMT.session} class method:
|
41
|
+
#
|
42
|
+
# GMT.session do |gmt|
|
43
|
+
# # do something with gmt
|
44
|
+
# end
|
45
|
+
#
|
42
46
|
# == GMT functions
|
43
47
|
#
|
44
48
|
# Each GMT function is available as instance method, and each has the same
|
@@ -55,7 +59,7 @@
|
|
55
59
|
# :C => 'gebco', :i => 2, :Z => nil, :E => 24, :> => 'my_depths.cpt')
|
56
60
|
#
|
57
61
|
# Note that
|
58
|
-
# - the
|
62
|
+
# - the argument(s) (the input file <code>'depths.txt'</code>) preceed(s)
|
59
63
|
# the options hash
|
60
64
|
# - the options hash has keys which are symbols
|
61
65
|
# - options which lack arguments correspond to hash keys with nil values
|
@@ -120,6 +124,13 @@ class GMT
|
|
120
124
|
end
|
121
125
|
end
|
122
126
|
|
127
|
+
public
|
128
|
+
|
129
|
+
# @yield [gmt] yields the {GMT} session to the block
|
130
|
+
def session(&block)
|
131
|
+
yield GMT.new
|
132
|
+
end
|
133
|
+
|
123
134
|
end
|
124
135
|
|
125
136
|
private
|