SimpleOutput 1.0.6 → 1.0.7
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/simpleplot.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6df2cbc4dc3e1c26303a21e00e317922c6681bf
|
4
|
+
data.tar.gz: b4bcb1efd6c641ad1af2815e20b28aa153dae849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a3199d2a2d2a764cfc663a1b182c9369b05fc115d9547571ddb64c6f8a163384bcf83b5d8817938e90876397cec64c7f8cea94db53ea218b426f36e136a9a5b
|
7
|
+
data.tar.gz: e973fcd170e6a6fc40809772a86054bf178122979633ca70b550e507f403c96a215cb1344847e212fadb80f9627935b953b9edd1cca15e83c6a6c374995bae6f
|
data/lib/simpleplot.rb
CHANGED
@@ -29,6 +29,12 @@ class SimplePlot < SimpleOutput::SimpleOutputPlugin
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def options_callback(options)
|
32
|
+
if options.has_key?('xsize')
|
33
|
+
@metadata[@current_name]['xsize'] = options['xsize']
|
34
|
+
end
|
35
|
+
if options.has_key?('ysize')
|
36
|
+
@metadata[@current_name]['ysize'] = options['ysize']
|
37
|
+
end
|
32
38
|
if options.has_key?('xlabel')
|
33
39
|
@metadata[@current_name]['xlabel'] = options['xlabel']
|
34
40
|
end
|
@@ -69,7 +75,7 @@ class SimplePlot < SimpleOutput::SimpleOutputPlugin
|
|
69
75
|
|
70
76
|
def new_data_callback(name)
|
71
77
|
name = translate_name(name)
|
72
|
-
@metadata[name] = {'length' => 0, 'xlabel' => 'x', 'ylabel' => 'y', 'xmin' => 0 , 'xmax' => 10, 'ymin' => 0, 'ymax' => 10, 'series_titles' => [], 'histogram' => false, 'bincount' => 10, 'normalized' => false}
|
78
|
+
@metadata[name] = {'length' => 0, 'xlabel' => 'x', 'ylabel' => 'y', 'xmin' => 0 , 'xmax' => 10, 'ymin' => 0, 'ymax' => 10, 'series_titles' => [], 'histogram' => false, 'bincount' => 10, 'normalized' => false, 'xsize' => 640, 'ysize' => 480}
|
73
79
|
end
|
74
80
|
|
75
81
|
def set_x_callback(data, name, options)
|
@@ -110,10 +116,10 @@ class SimplePlot < SimpleOutput::SimpleOutputPlugin
|
|
110
116
|
data.each do |set_name, series|
|
111
117
|
Gnuplot.open do |gp|
|
112
118
|
Gnuplot::Plot.new(gp) do |plot|
|
113
|
-
plot.terminal "png"
|
114
|
-
#plot.size 0.95
|
119
|
+
plot.terminal "png size #{@metadata[set_name]['xsize']},#{@metadata[set_name]['ysize']}"
|
115
120
|
|
116
121
|
plot.output "#{set_name+@name}.png"
|
122
|
+
#plot.set('size', '{1,1}')
|
117
123
|
|
118
124
|
plot.title set_name
|
119
125
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SimpleOutput
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Austen Higgins-Cassidy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gnuplot
|