Top Level Namespace

Defined in:

Method Summary

Method Detail

def _cleanup_dataset(dataset) #

Cleans up the temporary file left by a dataset which generally should be run on the closing of a plot. If these are not deleted, they will be deleted whenever the operating system clears temporary files

dataset : DataSet

  • the object to clean up

[View source]
def _create_data_file(arr : Indexable(Number), filename : String, header : String | Nil = nil, linesep = "\n") #

Creates a data file containing a one-dimensional dataset and an optional header.

arr : Indexable(Number)

  • A one dimensional array of values filename : String
  • location to write data header : String | Nil
  • optional header for the data file sep : String
  • line separator for files

[View source]
def _create_data_file(arr : Indexable(Indexable(Number)), filename : String, headers : Indexable(String) = [] of String, sep = " ", linesep = "\n") #

Creates a data file containing a one-dimensional dataset and an optional header.

arr : Indexable(Indexable(Number))

  • A one dimensional array of values filename : String
  • location to write data headers : Indexable(String)
  • optional header for the data file sep : String
  • line separator for files

[View source]
def _option_to_string(key : String, value : String | Nil, quotes = false) #

Formats a string option into a valid configuration option for gnuplot

key : String

  • Name of the option value : String
  • value of the option quotes : Bool
  • necessary if an option requires quotes

[View source]
def _option_to_string(key : String, value : Number, quotes = false) #

Formats a string option into a valid configuration option for gnuplot

key : String

  • Name of the option value : Number
  • value of the option quotes : Bool
  • necessary if an option requires quotes

[View source]
def _setting_to_string(key : String, value : String | Nil, quotes = false) #

Formats a string setting into a valid configuration setting for gnuplot

key : String

  • Name of the option value : String
  • value of the option quotes : Bool
  • necessary if a setting requires quotes

[View source]
def _setting_to_string(key : String, value : Number, quotes = false) #

Formats a numerical setting into a valid configuration setting for gnuplot

key : String

  • Name of the option value : Number
  • value of the option quotes : Bool
  • necessary if a setting requires quotes

[View source]
def _temporary_file(tmppath = "/tmp/") #

Returns information to create a temporary file. Currently this only supports unix temporary folder, but whenever Crystal gets ported to windows having this implementation in a single place will be nice.

tmppath : String

  • temporary path to place temporary file

[View source]
def _toggle_option_to_string(key : String, value : Bool) #

[View source]
def _toggle_to_string(key : String, value : Bool) #

Formats a boolean option into a valid configuration option for gnuplot

key : String

  • Name of the option value : Bool
  • value of the option quotes : Bool
  • necessary if an option requires quotes

[View source]