Package space.kscience.plotly

Types

DownloadImgOpts
Link copied to clipboard
js
external interface DownloadImgOpts
OrcaFormat
Link copied to clipboard
enum OrcaFormat : Enum<OrcaFormat>
Output format for Orca export
Plot
Link copied to clipboard
common
class Plot(config: Config) : Configurable, MetaRepr
The main plot class.
PlotGrid
Link copied to clipboard
class PlotGrid
Plotly
Link copied to clipboard
common
object Plotly
A namespace for utility functions
PlotlyConfig
Link copied to clipboard
common
class PlotlyConfig : Scheme
PlotlyFragment
Link copied to clipboard
class PlotlyFragment(render: FlowContent.(renderer: PlotlyRenderer) -> Unit)
A custom HTML fragment including plotly container reference
PlotlyHtmlFragment
Link copied to clipboard
class PlotlyHtmlFragment(visit: TagConsumer<*>.() -> Unit)
PlotlyJs
Link copied to clipboard
js
external object PlotlyJs
PlotlyPage
Link copied to clipboard
data class PlotlyPage(headers: Collection<PlotlyHtmlFragment>, fragment: PlotlyFragment, title: String, renderer: PlotlyRenderer)
A complete page including headers and title
PlotlyRenderer
Link copied to clipboard
interface PlotlyRenderer
PlotTabs
Link copied to clipboard
class PlotTabs
ResourceLocation
Link copied to clipboard
enum ResourceLocation : Enum<ResourceLocation>
The location of resources for plot.
StaticPlotlyRenderer
Link copied to clipboard
object StaticPlotlyRenderer : PlotlyRenderer
ToImgOpts
Link copied to clipboard
js
external interface ToImgOpts
UnstablePlotlyAPI
Link copied to clipboard
common
annotation class UnstablePlotlyAPI
UnsupportedPlotlyAPI
Link copied to clipboard
common
annotation class UnsupportedPlotlyAPI

Functions

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
createPlotFrom
Link copied to clipboard
js
fun createPlotFrom(id: String, from: URL, config: dynamic = {})
Create a plot taking data from given url
display
Link copied to clipboard
fun Plotly.display(pageBuilder: FlowContent.(renderer: PlotlyRenderer) -> Unit)
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.
fragment
Link copied to clipboard
fun Plotly.fragment(content: FlowContent.(renderer: PlotlyRenderer) -> Unit): PlotlyFragment
grid
Link copied to clipboard
fun Plotly.grid(block: PlotGrid.() -> Unit): PlotlyPage
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
localCssHeader
Link copied to clipboard
fun localCssHeader(basePath: Path, cssPath: Path, resource: String): PlotlyHtmlFragment
localScriptHeader
Link copied to clipboard
fun localScriptHeader(basePath: Path, scriptPath: Path, resource: String): PlotlyHtmlFragment
A header that automatically copies relevant scripts to given path
makeFile
Link copied to clipboard
fun PlotlyPage.makeFile(path: Path? = null, show: Boolean = true)
Export a page html to a file.
fun Plot.makeFile(path: Path? = null, show: Boolean = true, resourceLocation: ResourceLocation = ResourceLocation.LOCAL, config: PlotlyConfig = PlotlyConfig())
Create a standalone html with the plot
fun PlotlyFragment.makeFile(path: Path? = null, show: Boolean = true, title: String = "Plotly.kt", resourceLocation: ResourceLocation = ResourceLocation.LOCAL, additionalHeaders: List<PlotlyHtmlFragment> = emptyList())
The same as Plot.makeFile.
page
Link copied to clipboard
fun Plotly.page(vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader), title: String = "Plotly.kt", renderer: PlotlyRenderer = StaticPlotlyRenderer, content: FlowContent.(renderer: PlotlyRenderer) -> Unit): PlotlyPage
Create a complete page including plots
pie
Link copied to clipboard
common
inline fun Plot.pie(block: Pie.() -> Unit): Pie
plot
Link copied to clipboard
inline fun <ERROR CLASS><HTMLElement>.plot(plotlyConfig: PlotlyConfig = PlotlyConfig(), plotBuilder: Plot.() -> Unit)
inline fun Element.plot(plotlyConfig: PlotlyConfig = PlotlyConfig(), plotBuilder: Plot.() -> Unit)
fun FlowContent.plot(plotId: String? = null, config: PlotlyConfig = PlotlyConfig(), renderer: PlotlyRenderer = StaticPlotlyRenderer, builder: Plot.() -> Unit): Plot
fun FlowContent.plot(plot: Plot, plotId: String = plot.toString(), config: PlotlyConfig = PlotlyConfig(), renderer: PlotlyRenderer = StaticPlotlyRenderer): Plot
js
fun Element.plot(plot: Plot, plotlyConfig: PlotlyConfig = PlotlyConfig())
Attach a plot to this element or update existing plot
plus
Link copied to clipboard
operator fun PlotlyHtmlFragment.plus(other: PlotlyHtmlFragment): PlotlyHtmlFragment
scatter
Link copied to clipboard
common
inline fun Plot.scatter(block: Scatter.() -> Unit): Scatter
selectFile
Link copied to clipboard
fun selectFile(filter: FileNameExtensionFilter? = null): Path?
Select a file to save plot to using Swing form.
shape
Link copied to clipboard
common
fun Plot.shape(block: Shape.() -> Unit)
startPull
Link copied to clipboard
js
fun startPull(id: String, from: URL, millis: Int)
Start pull updates with regular requests from client side
startPush
Link copied to clipboard
js
fun startPush(id: String, ws: String)
Start push updates via websocket
table
Link copied to clipboard
common
inline fun Plot.table(block: Table.() -> Unit): Table
tabs
Link copied to clipboard
fun Plotly.tabs(tabsID: String = "tabs", block: PlotTabs.() -> Unit): PlotlyPage
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 List<Scheme>.toJsonString(): String
Convert list of type-safe configurators to json array string
fun Scheme.toJsonString(): String
Convert any type-safe configurator to json string
fun Plot.toJsonString(): String
Convert a plot to Json representation specified by Plotly newPlot command.
toPage
Link copied to clipboard
fun PlotlyFragment.toPage(vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader), title: String = "Plotly.kt", renderer: PlotlyRenderer = StaticPlotlyRenderer): PlotlyPage
Convert an html plot fragment to page
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
updatePlotFrom
Link copied to clipboard
js
fun updatePlotFrom(id: String, from: URL)
Update a plot taking data from given url
violin
Link copied to clipboard
common
inline fun Plot.violin(block: Violin.() -> Unit): Violin

Properties

cdnBootstrap
Link copied to clipboard
val cdnBootstrap: PlotlyHtmlFragment
cdnPlotlyHeader
Link copied to clipboard
val cdnPlotlyHeader: PlotlyHtmlFragment
mathJaxHeader
Link copied to clipboard
val mathJaxHeader: PlotlyHtmlFragment