class Ishi::Base

Direct Known Subclasses

Defined in:

ishi.cr

Instance Method Summary

Instance Method Detail

def canvas_size(x : Float64, y : Float64) #

Sets the size of the chart canvas.


[View source]
def canvas_size(x : Int32, y : Int32) #

Sets the size of the chart canvas.


[View source]
def imshow(data : Indexable(Indexable(D)), **options) forall D #

Displays an image.

data is scalar image data.

Data is visualized using a colormap.


[View source]
def margin(left : Float64 | Bool = false, right : Float64 | Bool = false, top : Float64 | Bool = false, bottom : Float64 | Bool = false) #

Sets the margin.

For information on setting/unsetting the margin, see: Margin.


[View source]
def margin(left : Int32 | Bool = false, right : Int32 | Bool = false, top : Int32 | Bool = false, bottom : Int32 | Bool = false) #

Sets the margin.

For information on setting/unsetting the margin, see: Margin.


[View source]
def palette(name : Symbol, colorbox : Bool = true) #

Sets the palette.

name is :gray or one of the available color palettes: :hot, :inferno, :jet, :magma, :plasma or :viridis

Optionally, shows/hides the chart colorbox based on the value of colorbox.


[View source]
def plot(xdata : Indexable(T), ydata : Indexable(U), zdata : Indexable(V), format : String | Nil = nil, *, title : String | Nil = nil, style : Symbol = :points, **options) forall T, U, V #

Plots x, y and z.

title is the title of the plot. style is the drawing style. Supported styles include :surface, :circles, :lines, :points and :dots.


[View source]
def plot(ydata : Indexable(Y), format : String | Nil = nil, *, title : String | Nil = nil, style : Symbol = :lines, **options) forall Y #

Plots y using x ranging from 0 to N-1.

title is the title of the plot. style is the drawing style. Supported styles include :boxes, :lines, :points, :linespoints and :dots.


[View source]
def plot(xdata : Indexable(M), ydata : Indexable(N), format : String | Nil = nil, *, title : String | Nil = nil, style : Symbol = :points, **options) forall M, N #

Plots x and y.

title is the title of the plot. style is the drawing style. Supported styles include :boxes, :lines, :points, :linespoints and :dots.


[View source]
def plot(expression : String, format : String | Nil = nil, *, title : String | Nil = nil, style : Symbol | Nil = nil, **options) #

Plots a mathematical expression.

plot("sin(x) * cos(x)")
plot("3.5 * x + 1.5")

For information on gnuplot mathematical expressions, see: Expressions.

title is the title of the plot. style is the drawing style. Supported styles include :lines and :points.


[View source]
def scatter(xdata : Indexable(M), ydata : Indexable(N), format : String | Nil = nil, *, title : String | Nil = nil, style : Symbol = :dots, **options) forall M, N #

Scatter plots x and y.

title is the title of the plot.


[View source]
def scatter(xdata : Indexable(T), ydata : Indexable(U), zdata : Indexable(V), format : String | Nil = nil, *, title : String | Nil = nil, style : Symbol = :dots, **options) forall T, U, V #

Scatter plots x, y and z.

title is the title of the plot.


[View source]
def show(**options) #

Shows the chart.


[View source]
def show_border(show : Bool) #

Shows/hides the chart border.

For information on setting/unsetting the border, see: Border.


[View source]
def show_colorbox(show : Bool) #

Shows/hides the chart colorbox.

For information on setting/unsetting the colorbox, see: Colorbox.


[View source]
def show_key(show : Bool) #

Shows/hides the chart key.

For information on setting/unsetting the key, see: Key.


[View source]
def show_xtics(show : Bool) #

Shows/hides the chart xtics.

For information on setting/unsetting the xtics, see: Xtics.


[View source]
def show_ytics(show : Bool) #

Shows/hides the chart ytics.

For information on setting/unsetting the ytics, see: Ytics.


[View source]
def view(xrot : Float64, zrot : Float64) #

Sets the viewing angle for 3D charts.

For information on setting the viewing angle, see: View.


[View source]
def view(xrot : Int32, zrot : Int32) #

Sets the viewing angle for 3D charts.

For information on setting the viewing angle, see: View.


[View source]
def xlabel(xlabel : String) #

Sets the label of the x axis.


[View source]
def xrange(xrange : Range(Float64, Float64) | Range(Int32, Int32)) #

Sets the range of the x axis.


[View source]
def ylabel(ylabel : String) #

Sets the label of the y axis.


[View source]
def yrange(yrange : Range(Float64, Float64) | Range(Int32, Int32)) #

Sets the range of the y axis.


[View source]
def zlabel(zlabel : String) #

Sets the label of the z axis.


[View source]
def zrange(zrange : Range(Float64, Float64) | Range(Int32, Int32)) #

Sets the range of the z axis.


[View source]