Plot

class Plot(config: Config) : Configurable, MetaRepr

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

Constructors

Plot
Link copied to clipboard
common
fun Plot(config: Config = Config())

Functions

addTrace
Link copied to clipboard
common
fun addTrace(trace: Trace)
toMeta
Link copied to clipboard
common
open override fun toMeta(): Meta
traces
Link copied to clipboard
common
fun traces(vararg traces: Trace)
Append all traces
fun traces(traces: Collection<Trace>)
Append all traces from traces to the plot

Properties

config
Link copied to clipboard
common
open override val config: Config
data
Link copied to clipboard
common
val data: List<Trace>
Ordered list ot traces in the plot
layout
Link copied to clipboard
common
val layout: Layout
Layout specification for th plot

Extensions

bar
Link copied to clipboard
common
inline fun Plot.bar(block: Bar.() -> Unit): Bar
box
Link copied to clipboard
common
inline fun Plot.box(block: Box.() -> Unit): Box
contour
Link copied to clipboard
common
inline fun Plot.contour(block: Contour.() -> Unit): Contour
export
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.
heatmap
Link copied to clipboard
common
inline fun Plot.heatmap(block: Heatmap.() -> Unit): Heatmap
histogram
Link copied to clipboard
common
inline fun Plot.histogram(block: Histogram.() -> Unit): Histogram
histogram2d
Link copied to clipboard
common
inline fun Plot.histogram2d(block: Histogram2D.() -> Unit): Histogram2D
histogram2dcontour
Link copied to clipboard
common
inline fun Plot.histogram2dcontour(block: Histogram2DContour.() -> Unit): Histogram2DContour
layout
Link copied to clipboard
common
inline fun Plot.layout(block: Layout.() -> Unit)
Configure the layout
makeFile
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
pie
Link copied to clipboard
common
inline fun Plot.pie(block: Pie.() -> Unit): Pie
scatter
Link copied to clipboard
common
inline fun Plot.scatter(block: Scatter.() -> Unit): Scatter
shape
Link copied to clipboard
common
fun Plot.shape(block: Shape.() -> Unit)
table
Link copied to clipboard
common
inline fun Plot.table(block: Table.() -> Unit): Table
text
Link copied to clipboard
common
fun Plot.text(block: Text.() -> Unit)
toHTML
Link copied to clipboard
fun Plot.toHTML(vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader), config: PlotlyConfig = PlotlyConfig()): String
Create a html (including headers) string from plot
toJsonString
Link copied to clipboard
common
fun Plot.toJsonString(): String
Convert a plot to Json representation specified by Plotly newPlot command.
toPage
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
trace
Link copied to clipboard
common
inline fun Plot.trace(block: Trace.() -> Unit): Trace
Add a generic trace
violin
Link copied to clipboard
common
inline fun Plot.violin(block: Violin.() -> Unit): Violin