extcsv 0.12.0 → 0.12.1
Sign up to get free protection for your applications and to get access to all the features.
- data/gemspec +1 -1
- data/lib/extcsv_diagram.rb +1 -3
- data/test/test_extcsv_diagram.rb +21 -10
- metadata +2 -2
data/gemspec
CHANGED
data/lib/extcsv_diagram.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'gnuplot'
|
3
3
|
require 'win32ole' if RUBY_PLATFORM =~ /(win32|cygwin)/i
|
4
|
-
require 'extcsv_units'
|
5
|
-
|
6
4
|
################################################################################
|
7
5
|
# Author: Ralf Müller
|
8
6
|
#
|
@@ -159,7 +157,7 @@ module ExtCsvDiagram
|
|
159
157
|
def ExtCsvDiagram.setOutput(plot,options)
|
160
158
|
size = (options[:size].nil?) ? '' : " size #{options[:size]}"
|
161
159
|
plot.terminal options[:terminal] + size
|
162
|
-
plot.output
|
160
|
+
plot.output options[:filename] + "." + options[:terminal].split(" ")[0]
|
163
161
|
end
|
164
162
|
|
165
163
|
def ExtCsvDiagram.addDataToPlot(plot,obj,xColumn,yColumn,groupBy,options)
|
data/test/test_extcsv_diagram.rb
CHANGED
@@ -16,6 +16,16 @@ class TestExtCsvDisplay < Test::Unit::TestCase
|
|
16
16
|
DATALOGGER_DATA = TEST_DIR + ""
|
17
17
|
IMPORT_TYPE = "file"
|
18
18
|
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_linDesity/xomFldminT.dat"
|
19
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_200mThickness/xomFldmin.dat"
|
20
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_500mThickness/xomFldmin.dat"
|
21
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02/xomFldmaxVert_Mixing_V.dat"
|
22
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_200mThickness/xomFldmaxVert_Mixing_V.dat"
|
23
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_500mThickness/xomFldmaxVert_Mixing_V.dat"
|
24
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_dev/xomFldmaxVert_Mixing_V.dat"
|
25
|
+
ICON = "/home/ram/src/git/icon/experiments/xom.r8563.tsrel_R2B02_dev/xomFldmaxT.dat"
|
26
|
+
VAR = "Vert_Mixing_Vel"
|
27
|
+
VAR = "Vert_Mixing_V"
|
28
|
+
VAR = "T"
|
19
29
|
|
20
30
|
def test_simple
|
21
31
|
f=ExtCsv.new("file","txt",TEST_DATA)
|
@@ -24,21 +34,22 @@ class TestExtCsvDisplay < Test::Unit::TestCase
|
|
24
34
|
def test_icon
|
25
35
|
icon = ExtCsv.new(IMPORT_TYPE,"psv",ICON)
|
26
36
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
37
|
icon.datetime = []
|
32
38
|
icon.date.each_with_index{|date,i| icon.datetime << [date,icon.time[i]].join(' ') }
|
33
39
|
|
34
|
-
[:date,:time,:depth
|
35
|
-
ExtCsvDiagram.plot_xy(icon,"datetime",
|
36
|
-
:label_position => '
|
40
|
+
[:date,:time,:depth,VAR.downcase.to_sym].each {|col| puts [col.to_s,icon.send(col).max].join('[max]: ') }
|
41
|
+
ExtCsvDiagram.plot_xy(icon,"datetime",VAR.downcase,'ICON OCE_BASE: Mean. Temperatur (uneven levels, r8656, full run: 2001-2012)',
|
42
|
+
:label_position => 'below',:skipColumnCheck => true,
|
37
43
|
:type => 'lines',:groupBy => ["depth"],
|
38
|
-
:yrange => '[
|
39
|
-
# :
|
44
|
+
# :yrange => '[0.0001:10]',
|
45
|
+
# :xrange => "",
|
46
|
+
:onlyGroupTitle => true,
|
47
|
+
# :addSettings => ["logscale y"],
|
48
|
+
:terminal => "png",
|
49
|
+
:ylabel => "#{VAR} [degC]",
|
40
50
|
:input_time_format => "'%Y%m%d %H:%M:%S'",
|
41
|
-
:filename => "icon"
|
51
|
+
:filename => "icon-OCE_BASE_uneven-r8656-fullrun-Mean#{VAR}",
|
52
|
+
:output_time_format => "'%m.%y'",:size => "800,600")
|
42
53
|
|
43
54
|
end
|
44
55
|
def test_plotxy
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extcsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: stark.dreamdetective@gmail.com
|