Plot

class Plot(val meta: ObservableMutableMeta = ObservableMutableMeta()) : Configurable, MetaRepr, Described

The main plot class. The changes to plot could be observed by attaching listener to root meta property.

Constructors

Link copied to clipboard
constructor(meta: ObservableMutableMeta = ObservableMutableMeta())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Ordered list ot traces in the plot

Link copied to clipboard
open override val descriptor: MetaDescriptor
Link copied to clipboard

Layout specification for th plot

Link copied to clipboard
open override val meta: ObservableMutableMeta

Functions

Link copied to clipboard
fun addTrace(trace: Trace)
Link copied to clipboard
inline fun Plot.bar(block: Bar.() -> Unit): Bar
Link copied to clipboard
inline fun Plot.box(block: Box.() -> Unit): Box
Link copied to clipboard
inline fun Plot.candlestick(block: CandleStick.() -> Unit): CandleStick
Link copied to clipboard
inline fun Plot.contour(block: Contour.() -> Unit): Contour
Link copied to clipboard
fun Plot.export(path: Path, format: OrcaFormat = OrcaFormat.svg)

Use external plotly-orca (https://github.com/plotly/orca) tool to export static image. The tool must be installed externally (for example via conda) and usage patterns could differ for different systems.

Link copied to clipboard
inline fun Plot.heatmap(block: Heatmap.() -> Unit): Heatmap
Link copied to clipboard
inline fun Plot.histogram(block: Histogram.() -> Unit): Histogram
Link copied to clipboard
inline fun Plot.histogram2d(block: Histogram2D.() -> Unit): Histogram2D
Link copied to clipboard
Link copied to clipboard
inline fun Plot.layout(block: Layout.() -> Unit)

Configure the layout

Link copied to clipboard
fun Plot.makeFile(path: Path? = null, show: Boolean = true, resourceLocation: ResourceLocation = ResourceLocation.LOCAL, config: PlotlyConfig = PlotlyConfig())

Create a standalone html with the plot

fun Plot.makeFile(path: <Error class: unknown class>, config: PlotlyConfig = PlotlyConfig())

Create a standalone html with the plot

fun Plot.makeFile(path: String, config: PlotlyConfig = PlotlyConfig())
Link copied to clipboard
inline fun Plot.pie(block: Pie.() -> Unit): Pie
Link copied to clipboard
inline fun Plot.scatter(block: Scatter.() -> Unit): Scatter
Link copied to clipboard
fun Plot.shape(block: Shape.() -> Unit)
Link copied to clipboard
inline fun Plot.table(block: Table.() -> Unit): Table
Link copied to clipboard
fun Plot.text(block: Text.() -> Unit)
Link copied to clipboard
fun Plot.toHTML(vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader), config: PlotlyConfig = PlotlyConfig()): String

Create a html (including headers) string from plot

Link copied to clipboard

Convert a plot to Json representation specified by Plotly newPlot command.

Link copied to clipboard
open override fun toMeta(): Meta
Link copied to clipboard
fun Plot.toPage(vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader), config: PlotlyConfig = PlotlyConfig.empty(), title: String = "Plotly.kt", renderer: PlotlyRenderer = StaticPlotlyRenderer): PlotlyPage

Convert a plot to the sigle-plot page

Link copied to clipboard
inline fun Plot.trace(block: Trace.() -> Unit): Trace

Add a generic trace

Link copied to clipboard
fun traces(vararg traces: Trace)

Append all traces

fun traces(traces: Collection<Trace>)

Append all traces from traces to the plot

Link copied to clipboard
inline fun Plot.violin(block: Violin.() -> Unit): Violin