flotr 1.3.8 → 1.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +10 -3
- data/lib/flotr.rb +7 -3
- metadata +1 -1
data/README.markdown
CHANGED
@@ -6,13 +6,20 @@ It is intended to be as portable as possible, and is thus aimed to generate HTML
|
|
6
6
|
|
7
7
|
Installation
|
8
8
|
============
|
9
|
-
|
9
|
+
Flotr gem has moved to [Gemcutter](http://gemcutter.org). In order to install you have two **alternative** choices:
|
10
10
|
|
11
|
-
|
11
|
+
1. Simply add the Gemcutter repo to your rubygem source list:
|
12
12
|
|
13
|
+
gem sources -a http://gemcutter.org
|
14
|
+
|
15
|
+
2. Install gemcutter:
|
16
|
+
|
17
|
+
sudo gem install gemcutter
|
18
|
+
sudo gem tumble
|
19
|
+
|
13
20
|
Next, simply install the gem:
|
14
21
|
|
15
|
-
sudo gem install
|
22
|
+
sudo gem install flotr
|
16
23
|
|
17
24
|
Usage
|
18
25
|
=====
|
data/lib/flotr.rb
CHANGED
@@ -128,11 +128,17 @@ module Flotr
|
|
128
128
|
Generates the html file containing the plot and fires up a preferred
|
129
129
|
browser window with the plot loaded.
|
130
130
|
=end
|
131
|
-
def
|
131
|
+
def save
|
132
132
|
eruby = Erubis::Eruby.new(File.read(@template))
|
133
133
|
File.open(OUTPUT_FILE, 'w') do |f|
|
134
134
|
f.print eruby.result(binding())
|
135
135
|
end
|
136
|
+
end
|
137
|
+
|
138
|
+
alias plot save
|
139
|
+
|
140
|
+
def show
|
141
|
+
self.save
|
136
142
|
case RUBY_PLATFORM
|
137
143
|
when /darwin/
|
138
144
|
system "open \"#{OUTPUT_FILE}\""
|
@@ -143,8 +149,6 @@ module Flotr
|
|
143
149
|
end
|
144
150
|
end
|
145
151
|
|
146
|
-
alias show plot
|
147
|
-
|
148
152
|
=begin rdoc
|
149
153
|
Adds a Data serie to the Plot. It also returns self, so multiple calls
|
150
154
|
can be concatenated as in plot << series1 << series2 << series3.
|