SimpleOutput 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/simpleplot.rb +7 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6df2cbc4dc3e1c26303a21e00e317922c6681bf
4
- data.tar.gz: b4bcb1efd6c641ad1af2815e20b28aa153dae849
3
+ metadata.gz: ce1c4995f98117212b211c6048a9de3c6edf3799
4
+ data.tar.gz: 157a00bbd81473cd5cf839adac55a57066ea5a2a
5
5
  SHA512:
6
- metadata.gz: 4a3199d2a2d2a764cfc663a1b182c9369b05fc115d9547571ddb64c6f8a163384bcf83b5d8817938e90876397cec64c7f8cea94db53ea218b426f36e136a9a5b
7
- data.tar.gz: e973fcd170e6a6fc40809772a86054bf178122979633ca70b550e507f403c96a215cb1344847e212fadb80f9627935b953b9edd1cca15e83c6a6c374995bae6f
6
+ metadata.gz: 20fefb6091af75a1ff1fa2d31eb4b5d9ef6b128925c9f2e5c0ded03e50d915dbf2303f8edd26e549de833ef9a86f30138619790a2df4d189ad527e361623d4cb
7
+ data.tar.gz: d4833aec0f48ae47e73be2ed4e19bc828e88d7b70036cb75d1103ba7c5ef066e265fd7a96f12f5cfb06ed96a58b70c4d082e819a14a35ad078881a284674f472
data/lib/simpleplot.rb CHANGED
@@ -126,13 +126,14 @@ class SimplePlot < SimpleOutput::SimpleOutputPlugin
126
126
  plot.xlabel @metadata[set_name]['xlabel']
127
127
  plot.ylabel @metadata[set_name]['ylabel']
128
128
  plot.data = []
129
-
129
+ max = @metadata[set_name]['ymax']
130
+ min = @metadata[set_name]['ymin']
131
+ if min == max
132
+ max = min + 1
133
+ end
130
134
  if @metadata[set_name]['histogram']
131
135
  size = @metadata[set_name]['length']
132
- bins = @metadata[set_name]['bincount']
133
- max = @metadata[set_name]['ymax']
134
- min = @metadata[set_name]['ymin']
135
-
136
+ bins = @metadata[set_name]['bincount']
136
137
  width = (max.to_f-min.to_f).to_f/bins.to_f
137
138
  #bins = size.to_f/width.to_f
138
139
  plot.yrange '[0:]'
@@ -144,7 +145,7 @@ class SimplePlot < SimpleOutput::SimpleOutputPlugin
144
145
  plot.set('style', 'fill solid 0.5')
145
146
  else
146
147
  plot.xrange "[#{@metadata[set_name]['xmin']}:#{@metadata[set_name]['xmax']}]"
147
- plot.yrange "[#{@metadata[set_name]['ymin']}:#{@metadata[set_name]['ymax']}]"
148
+ plot.yrange "[#{min}:#{max}]"
148
149
  end
149
150
  series.each_with_index do |line, index|
150
151
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SimpleOutput
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austen Higgins-Cassidy