Skip to content

Commit

Permalink
minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ievgrafov committed Aug 9, 2015
1 parent 62a7122 commit f25b4f3
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
1 change: 1 addition & 0 deletions lib/gnuplotrb/external_classes/array.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Methods to take data for GnuplotRB plots.
class Array
# taken for example from current gnuplot bindings
# @return [String] array converted to Gnuplot format
def to_gnuplot_points
return '' if self.empty?
case self[0]
Expand Down
8 changes: 8 additions & 0 deletions lib/gnuplotrb/external_classes/daru.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ module Daru
##
# Methods to take data for GnuplotRB plots.
class DataFrame
##
# Convert DataFrame to Gnuplot format.
#
# @return [String] data converted to Gnuplot format
def to_gnuplot_points
result = ''
each_row_with_index do |row, index|
Expand All @@ -21,6 +25,10 @@ def to_gnuplot_points
##
# Methods to take data for GnuplotRB plots.
class Vector
##
# Convert Vector to Gnuplot format.
#
# @return [String] data converted to Gnuplot format
def to_gnuplot_points
result = ''
each_with_index do |value, index|
Expand Down
5 changes: 2 additions & 3 deletions lib/gnuplotrb/external_classes/string.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
##
# Methods to take data for GnuplotRB plots.
class String
def to_gnuplot_points
clone
end
# @return [String] data converted to Gnuplot format
alias_method :to_gnuplot_points, :clone
end
8 changes: 4 additions & 4 deletions lib/gnuplotrb/fit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module GnuplotRB
# Contains methods relating to Gnuplot's fit function. Covered in
# {fit notebook}[http://nbviewer.ipython.org/github/dilcom/gnuplotrb/blob/master/notebooks/fitting_data.ipynb].
#
# You can also see original gnuplot's fit in gnuplot
# doc - http://www.gnuplot.info/docs_5.0/gnuplot.pdf p. 122.
# You can also see original gnuplot's fit in
# {gnuplot doc}[http://www.gnuplot.info/docs_5.0/gnuplot.pdf] p. 122.
module Fit
##
# Fit given data with function.
Expand All @@ -19,9 +19,9 @@ module Fit
# @param :term_options [Hash] terminal options that should be setted to terminal before fit.
# You can see them in Plot's documentation (or even better in gnuplot doc)
# Most useful here are ranges (xrange, yrange etc) and fit option which tunes fit parameters
# (see gnuplot doc - http://www.gnuplot.info/docs_5.0/gnuplot.pdf p. 122)
# (see {gnuplot doc}[http://www.gnuplot.info/docs_5.0/gnuplot.pdf] p. 122)
# @param options [Hash] options passed to Gnuplot's fit such as *using*. They are covered in
# gnuplot doc - http://www.gnuplot.info/docs_5.0/gnuplot.pdf (pp. 69-74)
# {gnuplot doc}[http://www.gnuplot.info/docs_5.0/gnuplot.pdf] (pp. 69-74)
#
# @return [Hash] hash with four elements:
# - :formula_ds - dataset with best fit curve as data
Expand Down
2 changes: 1 addition & 1 deletion lib/gnuplotrb/staff/dataset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module GnuplotRB
#
# == Options
# Dataset options are explained in
# {gnuplot docs}[http://www.gnuplot.info/docs_5.0/gnuplot.pdf](pp. 80-101).
# {gnuplot docs}[http://www.gnuplot.info/docs_5.0/gnuplot.pdf] (pp. 80-101).
# Several common options:
# * with - set plot style for dataset ('lines', 'points', 'impulses' etc)
# * using - choose which columns of input data gnuplot should use. Takes String
Expand Down
2 changes: 2 additions & 0 deletions lib/gnuplotrb/staff/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module GnuplotRB
##
# This module takes care of path to gnuplot executable and checking its version.
module Settings
##
# GnuplotRB can work with Gnuplot 5.0+
MIN_GNUPLOT_VERSION = 5.0

class << self
Expand Down
4 changes: 2 additions & 2 deletions lib/gnuplotrb/staff/terminal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def store_datablock(data)
##
# Convert given options to gnuplot format.
#
# For {opt1: val1, .. , optN: valN} it returns
# For "{ opt1: val1, .. , optN: valN }" it returns
# set opt1 val1
# ..
# set optN valN
Expand All @@ -103,7 +103,7 @@ def options_hash_to_string(options)
##
# Applie given options to current gnuplot instance.
#
# For {opt1: val1, .. , optN: valN} it will output to gnuplot
# For "{ opt1: val1, .. , optN: valN }" it will output to gnuplot
# set opt1 val1
# ..
# set optN valN
Expand Down
2 changes: 2 additions & 0 deletions lib/gnuplotrb/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
# === Overview
# Ruby bindings for gnuplot.
module GnuplotRB
##
# Gem version
VERSION = '0.3.0'
end

0 comments on commit f25b4f3

Please sign in to comment.