class Ishi::Gnuplot
- Ishi::Gnuplot
- Reference
- Object
Overview
Gnuplot rendering engine.
Requires "gnuplot" be installed and available.
Defined in:
ishi/gnuplot.crishi/html.cr
ishi/iterm2.cr
ishi/text.cr
Constructors
-
.new(prologue : Enumerable(String) = [] of String, epilogue : Enumerable(String) = ["exit"])
Creates a new instance of the gnuplot engine.
Instance Method Summary
-
#clear
Clears the chart.
-
#dim
Returns the dimensionality of the chart.
-
#plot(ydata : Indexable(Y), title : String | Nil = nil, style : Symbol = :lines) forall Y
Plots
yusingxranging from0toN-1. -
#plot(expression : String, title : String | Nil = nil, style : Symbol | Nil = nil)
Plots a mathematical expression.
-
#plot(xdata : Indexable(X), ydata : Indexable(Y), title : String | Nil = nil, style : Symbol = :lines) forall X, Y
Plots
xandy. -
#plot(xdata : Indexable(X), ydata : Indexable(Y), zdata : Indexable(Z), title : String | Nil = nil, style : Symbol = :points) forall X, Y, Z
Plots
x,yandz. -
#run(commands : Enumerable(String))
Runs a "gnuplot" process and feeds it
commands. -
#show
Shows the chart.
- #show(**options)
-
#size
Returns the number of plots.
-
#xlabel(xlabel : String)
Sets the label of the
xaxis. -
#xrange(xrange : Range(Float64, Float64) | Range(Int32, Int32))
Sets the range of the
xaxis. -
#ylabel(ylabel : String)
Sets the label of the
yaxis. -
#yrange(yrange : Range(Float64, Float64) | Range(Int32, Int32))
Sets the range of the
yaxis. -
#zlabel(zlabel : String)
Sets the label of the
zaxis. -
#zrange(zrange : Range(Float64, Float64) | Range(Int32, Int32))
Sets the range of the
zaxis.
Constructor Detail
Creates a new instance of the gnuplot engine.
Instance Method Detail
Returns the dimensionality of the chart.
All plots in a chart must have the same dimensionality (it's not currently possible to plot 2D and 3D data simultaneously).
Plots y using x ranging from 0 to N-1.
Plots a mathematical expression.
Plots x and y.
Plots x, y and z.
Runs a "gnuplot" process and feeds it commands.
Returns an IO instance with the output.