abstract class Cryplot::BasePlot

Overview

Class used to create a plot containing graphical elements

Direct Known Subclasses

Defined in:

plot/baseplot.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def autoclean(val : Bool) #

[View source]
def autoclean : Bool #

Toggle automatic cleaning of temporary files (enabled by default)


[View source]
def autoclean=(autoclean : Bool) #

Toggle automatic cleaning of temporary files (enabled by default)


[View source]
def border : Border #

border style of the plot


[View source]
def cleanup #

Delete all files used to store plot data or scripts.


[View source]
def clear #

clear all draw and gnuplot commands Note: This method leaves all other plot properties untouched.


[View source]
def data_filename : String #

[View source]
def draw(what : String, using : String, expr : String) #

Draw plot object with given what, using and with expressions (e.g., plot.draw("sin(x)*cos(x)", "", "linespoints"), (e.g., plot.draw("file.dat", "1:2", "points"))).


[View source]
def draw(using : String, expr : String) #

Draw plot object with given using and with expressions (e.g., plot.draw("1:2", "points"))).


[View source]
def font_name(name : String) #

Set the font name for the plot (e.g., Helvetica, Georgia, Times).


[View source]
def font_size(size : Int) #

Set the font size for the plot (e.g., 10, 12, 16).


[View source]
def gnuplot(cmd : String) #

Use this method to provide gnuplot commands to be executed before the plotting calls.


[View source]
def grid : Grid #

The vector of grid specs for the major and minor grid lines in the plot (for xtics, ytics, mxtics, etc.).


[View source]
def legend : Legend #

legend specs of the plot


[View source]
def palette(name : Cryplot::Palette) #

Set the palette of the colors for the plot.


[View source]
def palette : Cryplot::Palette #

gnu palette to be used


[View source]
def palette=(palette : Cryplot::Palette) #

gnu palette to be used


[View source]
abstract def repr : String #

[View source]
def samples(value : Int) #

[View source]
def save(filename : String) #

Save the plot in a file, with its extension defining the file format. The extension of the file name determines the file format The supported formats are: pdf, eps, svg, png, and jpeg Thus, to save a plot in pdf format, choose a file as in plot.pdf. Note: This removes temporary files after saving if #autoclean is enabled. default is enabled


[View source]
def save_plot_data #

write the current plot data to data file


[View source]
def show #

Show the plot in a popup-window Note: This removes temporary files after saving if #autoclean is enabled. default is enabled


[View source]
def size(width : Int, height : Int) #

Set the size of the plot (in unit of points, with 1 inch = 72 points).


[View source]
def style_fill : FillStyle #

The specs for the fill style of the plot elements in the plot that can be painted.


[View source]
def this #

[View source]
def title(text : String) #

Set the title text of the plot


[View source]
def title : Title #

title of the plot


[View source]
def to_s(io : IO) : Nil #

convert this plot object into a gnuplot formatted string.


[View source]