\n",
+ " "
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%use @file[plotly-experimental.json]\n",
+ "import kotlin.math.*"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2021-01-14T18:47+0300",
+ "start_time": "2021-01-14T18:47+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
A custom separator
\n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "val x1 = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y1 = x1.map { sin(2.0 * PI * it) }\n",
+ "val y2 = x1.map { cos(2.0 * PI * it) }\n",
+ "\n",
+ "val trace1 = Trace(x1, y1) { name = \"sin\" }\n",
+ "val trace2 = Trace(x1, y2) { name = \"cos\" }\n",
+ "\n",
+ "val fragment = Plotly.fragment { renderer ->\n",
+ " plot(\"above\", renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot above\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " hr()\n",
+ " h1 { +\"A custom separator\" }\n",
+ " hr()\n",
+ " div {\n",
+ " plot(renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "fragment"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2021-01-14T18:47+0300",
+ "start_time": "2021-01-14T18:47+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "Plotly.plot {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2021-01-14T18:48+0300",
+ "start_time": "2021-01-14T18:48+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ ""
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "HTML(\"\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2021-01-14T18:47+0300",
+ "start_time": "2021-01-14T18:47+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 5,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "Plotly.plot {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "@webio": {
+ "lastCommId": null,
+ "lastKernelId": null
+ },
+ "hide_input": false,
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "nbconvert_exporter": "",
+ "pygments_lexer": "kotlin",
+ "version": "1.5.0-dev-1206"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": false,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": false,
+ "toc_window_display": false
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/notebooks/.ipynb_checkpoints/plotlykt-demo_1-checkpoint.ipynb b/plotly/examples/notebooks/.ipynb_checkpoints/plotlykt-demo_1-checkpoint.ipynb
new file mode 100644
index 00000000..ac0f6dd5
--- /dev/null
+++ b/plotly/examples/notebooks/.ipynb_checkpoints/plotlykt-demo_1-checkpoint.ipynb
@@ -0,0 +1,402 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
The server is already running on 8882. It must be shut down first to be restarted.
\n"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%use plotly\n",
+ "import kotlin.math.*"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
A custom separator
\n",
+ "
\n",
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "val x1 = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y1 = x1.map { sin(2.0 * PI * it) }\n",
+ "val y2 = x1.map { cos(2.0 * PI * it) }\n",
+ "\n",
+ "val trace1 = Trace(x1, y1) { name = \"sin\" }\n",
+ "val trace2 = Trace(x1, y2) { name = \"cos\" }\n",
+ "\n",
+ "val fragment = Plotly.fragment { container ->\n",
+ " plot(container = container, config = PlotlyConfig{responsive = true}) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot above\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " hr()\n",
+ " h1 { +\"A custom separator\" }\n",
+ " hr()\n",
+ " div {\n",
+ " plot(container = container) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "fragment"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "Plotly.plot {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "val x = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y = x.map { sin(2.0 * PI * it) }\n",
+ "\n",
+ "val trace = Trace(x, y) { name = \"sin\" }\n",
+ "\n",
+ "\n",
+ "val dynamicPlot = Plotly.plot {\n",
+ " traces(trace)\n",
+ " layout {\n",
+ " title = \"Dynamic plot\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "dynamicPlot"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "import kotlinx.coroutines.*\n",
+ "\n",
+ "val job = GlobalScope.launch {\n",
+ " var time: Long = 0\n",
+ " while (isActive) {\n",
+ " delay(10)\n",
+ " time += 10\n",
+ " val dynamicY = x.map { sin(2.0 * PI * (it + time.toDouble() / 1000.0)) }\n",
+ " trace.y.set(dynamicY)\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "job.cancel()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:42+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "dynamicPlot.layout.xaxis.title = \"крокозябра\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-07-31T11:43+0300",
+ "start_time": "2020-07-31T11:42+0300"
+ }
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "11:43:00.894 [DefaultDispatcher-worker-2] DEBUG ktor.application - Closed server socket for kscience.plotly.Plot@1822ae52\n",
+ "11:43:00.895 [DefaultDispatcher-worker-6] DEBUG ktor.application - Closed server socket for kscience.plotly.Plot@5ec8af0d\n",
+ "11:43:00.896 [pool-2-thread-1] INFO ktor.application - 101 Switching Protocols: GET - /ws/kscience.plotly.Plot@1822ae52, cancelled\n",
+ "11:43:00.897 [DefaultDispatcher-worker-14] DEBUG ktor.application - Closed server socket for kscience.plotly.Plot@4eefd342\n",
+ "11:43:00.897 [pool-2-thread-2] INFO ktor.application - 101 Switching Protocols: GET - /ws/kscience.plotly.Plot@5ec8af0d, cancelled\n",
+ "11:43:00.898 [pool-2-thread-3] INFO ktor.application - 101 Switching Protocols: GET - /ws/kscience.plotly.Plot@4eefd342, cancelled\n",
+ "11:43:00.905 [DefaultDispatcher-worker-9] ERROR io.ktor.server.cio.HttpServer - Unhandled exception caught for CoroutineName(http-pipeline-writer)\n",
+ "kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[ExperimentalCoroutineDispatcher@1a6cc06[scheduler = DefaultDispatcher@1aa286ac[Pool Size {core = 14, max = 1536}, Worker States {CPU = 7, blocking = 0, parked = 7, dormant = 0, terminated = 0}, running workers queues = [0c, 0c, 0c, 0c, 1c, 0c, 0c], global CPU queue size = 0, global blocking queue size = 0, Control State {created workers= 14, blocking tasks = 0, CPUs acquired = 7}]], Continuation at io.ktor.server.cio.backend.ServerPipelineKt$startServerConnectionPipeline$1$outputsActor$1.invokeSuspend(ServerPipeline.kt:49)@3401b226]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers\n",
+ "\tat kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:93)\n",
+ "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:64)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)\n",
+ "Caused by: java.lang.ClassCastException: class kotlin.coroutines.jvm.internal.CompletedContinuation cannot be cast to class kotlinx.coroutines.DispatchedContinuation (kotlin.coroutines.jvm.internal.CompletedContinuation is in unnamed module of loader 'app'; kotlinx.coroutines.DispatchedContinuation is in unnamed module of loader java.net.URLClassLoader @7323f4f)\n",
+ "\tat kotlinx.coroutines.CoroutineDispatcher.releaseInterceptedContinuation(CoroutineDispatcher.kt:103)\n",
+ "\tat kotlin.coroutines.jvm.internal.ContinuationImpl.releaseIntercepted(ContinuationImpl.kt:118)\n",
+ "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:39)\n",
+ "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:55)\n",
+ "\t... 4 common frames omitted\n",
+ "11:43:00.905 [DefaultDispatcher-worker-4] ERROR io.ktor.server.cio.HttpServer - Unhandled exception caught for CoroutineName(http-pipeline-writer)\n",
+ "kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[ExperimentalCoroutineDispatcher@1a6cc06[scheduler = DefaultDispatcher@1aa286ac[Pool Size {core = 14, max = 1536}, Worker States {CPU = 9, blocking = 0, parked = 5, dormant = 0, terminated = 0}, running workers queues = [0c, 1c, 0c, 0c, 0c, 0c, 1c, 0c, 0c], global CPU queue size = 0, global blocking queue size = 0, Control State {created workers= 14, blocking tasks = 0, CPUs acquired = 7}]], Continuation at io.ktor.server.cio.backend.ServerPipelineKt$startServerConnectionPipeline$1$outputsActor$1.invokeSuspend(ServerPipeline.kt:49)@34cb0946]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers\n",
+ "\tat kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx_coroutines_core(DispatchedTask.kt:93)\n",
+ "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:64)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "
Update server is stopped
\n"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)\n",
+ "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)\n",
+ "Caused by: java.lang.ClassCastException: class kotlin.coroutines.jvm.internal.CompletedContinuation cannot be cast to class kotlinx.coroutines.DispatchedContinuation (kotlin.coroutines.jvm.internal.CompletedContinuation is in unnamed module of loader 'app'; kotlinx.coroutines.DispatchedContinuation is in unnamed module of loader java.net.URLClassLoader @7323f4f)\n",
+ "\tat kotlinx.coroutines.CoroutineDispatcher.releaseInterceptedContinuation(CoroutineDispatcher.kt:103)\n",
+ "\tat kotlin.coroutines.jvm.internal.ContinuationImpl.releaseIntercepted(ContinuationImpl.kt:118)\n",
+ "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:39)\n",
+ "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:55)\n"
+ ]
+ }
+ ],
+ "source": [
+ "JupyterPlotly.stopUpdates()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "@webio": {
+ "lastCommId": null,
+ "lastKernelId": null
+ },
+ "hide_input": false,
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "pygments_lexer": "kotlin",
+ "version": "1.4.20-dev-2342"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": false,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": false,
+ "toc_window_display": false
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/notebooks/.ipynb_checkpoints/plotlykt-server-demo-checkpoint.ipynb b/plotly/examples/notebooks/.ipynb_checkpoints/plotlykt-server-demo-checkpoint.ipynb
new file mode 100644
index 00000000..6a7d9823
--- /dev/null
+++ b/plotly/examples/notebooks/.ipynb_checkpoints/plotlykt-server-demo-checkpoint.ipynb
@@ -0,0 +1,226 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "%use plotly-server\n",
+ "import kotlin.math.*"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "val x1 = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y1 = x1.map { sin(2.0 * PI * it) }\n",
+ "val y2 = x1.map { cos(2.0 * PI * it) }\n",
+ "\n",
+ "val trace1 = Trace(x1, y1) { name = \"sin\" }\n",
+ "val trace2 = Trace(x1, y2) { name = \"cos\" }\n",
+ "\n",
+ "val fragment = Plotly.fragment { renderer ->\n",
+ " val plotConfig = PlotlyConfig{\n",
+ " responsive = true\n",
+ " } \n",
+ " \n",
+ " plot(\"above\", config = plotConfig, renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot above\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " hr()\n",
+ " h1 { +\"A custom separator\" }\n",
+ " hr()\n",
+ " div {\n",
+ " plot(renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "fragment"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "Plotly.plot {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "val x = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y = x.map { sin(2.0 * PI * it) }\n",
+ "\n",
+ "val trace = Trace(x, y) { name = \"sin\" }\n",
+ "\n",
+ "\n",
+ "val dynamicPlot = Plotly.plot {\n",
+ " traces(trace)\n",
+ " layout {\n",
+ " title = \"Dynamic plot\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "dynamicPlot"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "import kotlinx.coroutines.*\n",
+ "\n",
+ "val job = GlobalScope.launch {\n",
+ " var time: Long = 0\n",
+ " while (isActive) {\n",
+ " delay(10)\n",
+ " time += 10\n",
+ " val dynamicY = x.map { sin(2.0 * PI * (it + time.toDouble() / 1000.0)) }\n",
+ " trace.y.set(dynamicY)\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "job.cancel()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "dynamicPlot.layout.xaxis.title = \"крокозябра\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-08T21:37+0300",
+ "start_time": "2020-08-08T21:37+0300"
+ }
+ },
+ "outputs": [],
+ "source": [
+ "plotly.port = 8884"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "@webio": {
+ "lastCommId": null,
+ "lastKernelId": null
+ },
+ "hide_input": false,
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "nbconvert_exporter": "",
+ "pygments_lexer": "kotlin",
+ "version": "1.5.30-dev-598"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": false,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": false,
+ "toc_window_display": false
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/notebooks/Issue-sim.ipynb b/plotly/examples/notebooks/Issue-sim.ipynb
new file mode 100644
index 00000000..5738cc7a
--- /dev/null
+++ b/plotly/examples/notebooks/Issue-sim.ipynb
@@ -0,0 +1,298 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "%use plotly"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# API"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "enum class Severity(val penalty: Double){\n",
+ " MINOR(1.0),\n",
+ " MAJOR(2.0),\n",
+ " CRITICAL(3.0)\n",
+ "}\n",
+ "\n",
+ "enum class State{\n",
+ " OPEN,\n",
+ " ASSIGNED,\n",
+ " RESOLVED\n",
+ "}\n",
+ "\n",
+ "data class Issue(val id: String, val dayCreated: Int, val severity: Severity, val complexity: Int, \n",
+ " var state: State = State.OPEN, var dayAssigned: Int? = null, var dayResolved: Int? = null){\n",
+ " fun activate(day: Int){ \n",
+ " state = State.ASSIGNED\n",
+ " dayAssigned = day\n",
+ " }\n",
+ " \n",
+ " fun resolve(day: Int){\n",
+ " state = State.RESOLVED\n",
+ " dayResolved = day\n",
+ " }\n",
+ " \n",
+ " internal fun tryResolve(day: Int){\n",
+ " if(state == State.ASSIGNED && day >= (dayAssigned ?: 0) + complexity ){\n",
+ " resolve(day)\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "class Worker(val name: String){\n",
+ " var currentIssue: Issue? = null\n",
+ " private set\n",
+ " \n",
+ " fun isBusy(): Boolean = currentIssue != null\n",
+ " \n",
+ " fun update(day: Int){\n",
+ " currentIssue?.tryResolve(day)\n",
+ " if(currentIssue?.state == State.RESOLVED){\n",
+ " currentIssue = null\n",
+ " }\n",
+ " }\n",
+ " \n",
+ " fun assign(day: Int, issue: Issue){\n",
+ " if(currentIssue != null) error(\"Can't assign work to a worker which is busy\")\n",
+ " issue.activate(day)\n",
+ " currentIssue = issue\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "interface IssueGenerator{\n",
+ " fun generate(day: Int): List
\n",
+ "}\n",
+ "\n",
+ "interface Strategy{\n",
+ " fun selectIssue(day: Int, issues: List): Issue?\n",
+ "}\n",
+ "\n",
+ "class WorkResult(val issues: List, val workers: Int, val days: Int)\n",
+ "\n",
+ "@OptIn(kotlin.ExperimentalStdlibApi::class)\n",
+ "fun simulate(generator: IssueGenerator, strategy: Strategy, numWorkers: Int = 10, days: Int = 100): WorkResult{\n",
+ " val workers = (0 until numWorkers).map{Worker(\"worker $it\")}\n",
+ " val issues = buildList{\n",
+ " for(day in 0 until days){\n",
+ " //update all workers\n",
+ " workers.forEach { it.update(day) }\n",
+ " //generate new issues\n",
+ " val newIssues = generator.generate(day)\n",
+ " addAll(newIssues)\n",
+ " //Select all free workers\n",
+ " workers.filter { !it.isBusy() }.forEach { worker->\n",
+ " val unasigned = filter { it.state == State.OPEN }\n",
+ " val anIssue = strategy.selectIssue(day, unasigned) //select an issue to assign from all unassigned issues\n",
+ " if(anIssue != null){\n",
+ " worker.assign(day, anIssue)\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ " return WorkResult(issues, numWorkers, days)\n",
+ "}\n",
+ "\n",
+ "fun WorkResult.computeLoss(): Double = issues.sumByDouble { ((it.dayResolved ?: days) - it.dayCreated)*it.severity.penalty } / days / workers / issues.size"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Implementations"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import kotlin.random.Random\n",
+ "import kotlin.math.pow\n",
+ "\n",
+ "/**\n",
+ "* Generate one random issue per day\n",
+ "*/\n",
+ "class RandomIssueGenerator(seed: Long, val issuesPerDay: Int = 4 ) : IssueGenerator{\n",
+ " private val random = Random(seed)\n",
+ " override fun generate(day: Int): List{\n",
+ " return List(issuesPerDay){\n",
+ " val severity = Severity.values()[random.nextInt(3)]\n",
+ " val complexity = random.nextInt(15)\n",
+ " Issue(\"${day}_${it}\", day, severity, complexity)\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "object TakeOldest: Strategy{\n",
+ " override fun selectIssue(day: Int, issues: List): Issue?{\n",
+ " return issues.minByOrNull { it.dayCreated }\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "class TakeRandom(seed: Long): Strategy{\n",
+ " private val random = Random(seed)\n",
+ " override fun selectIssue(day: Int, issues: List): Issue?{\n",
+ " if(issues.isEmpty()) return null\n",
+ " return issues.random(random)\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "object TakeCritical: Strategy{\n",
+ " override fun selectIssue(day: Int, issues: List): Issue?{\n",
+ " return issues.maxByOrNull { it.severity.penalty*(day - it.dayCreated) }\n",
+ " }\n",
+ "}\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Simulate lossseverity"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "val seed = 89L\n",
+ "val days = 100\n",
+ "val workers = 10"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Take oldest"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "val result = simulate(RandomIssueGenerator(seed, workers),TakeOldest, days = days)\n",
+ "//result.issues.forEach { println(it)}\n",
+ "result.computeLoss()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Take random"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "simulate(RandomIssueGenerator(seed, workers),TakeRandom(seed), days = days).computeLoss()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Take critical"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "simulate(RandomIssueGenerator(seed, workers), TakeCritical, days = days).computeLoss()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "val seeds = List(1000){Random.nextLong()}\n",
+ "\n",
+ "Plotly.plot{\n",
+ " trace{\n",
+ " x.numbers = seeds.map{ seed -> simulate(RandomIssueGenerator(seed, workers), TakeOldest, days = days).computeLoss()}\n",
+ " name = \"oldest\"\n",
+ " type = TraceType.histogram\n",
+ " }\n",
+ " trace{\n",
+ " x.numbers = seeds.map{ seed -> simulate(RandomIssueGenerator(seed, workers), TakeRandom(seed), days = days).computeLoss()}\n",
+ " name = \"random\"\n",
+ " type = TraceType.histogram\n",
+ " }\n",
+ " trace{\n",
+ " x.numbers = seeds.map{ seed -> simulate(RandomIssueGenerator(seed, workers), TakeCritical, days = days).computeLoss()}\n",
+ " name = \"critical\"\n",
+ " type = TraceType.histogram\n",
+ " }\n",
+ " layout{\n",
+ " title = \"Loss distribtution\"\n",
+ " xaxis {\n",
+ " title = \"Loss\"\n",
+ " }\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "nbconvert_exporter": "",
+ "pygments_lexer": "kotlin",
+ "version": "1.5.30-dev-598"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/notebooks/latex-demo.ipynb b/plotly/examples/notebooks/latex-demo.ipynb
new file mode 100644
index 00000000..99d88de5
--- /dev/null
+++ b/plotly/examples/notebooks/latex-demo.ipynb
@@ -0,0 +1,334 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "21:08:36.601 [DefaultDispatcher-worker-1] INFO ktor.application - No ktor.deployment.watch patterns specified, automatic reload is not active\n",
+ "21:08:36.645 [DefaultDispatcher-worker-1] INFO ktor.application - Responding at http://0.0.0.0:8882\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%use plotly"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "ExecuteTime": {
+ "end_time": "2020-08-07T11:08+0300",
+ "start_time": "2020-08-07T11:08+0300"
+ }
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ "
\n",
+ "
\n"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "Plotly.plot {\n",
+ " scatter {\n",
+ " x(2, 3, 4, 5)\n",
+ " y(10, 15, 13, 17)\n",
+ " }\n",
+ "\n",
+ " text {\n",
+ " position(2, 10)\n",
+ " font {\n",
+ " size = 18\n",
+ " }\n",
+ " text = \"\\$\\\\alpha\\$\"\n",
+ " }\n",
+ "\n",
+ " text {\n",
+ " position(5, 17)\n",
+ " font {\n",
+ " size = 18\n",
+ " }\n",
+ " text = \"\\$\\\\Omega\\$\"\n",
+ " }\n",
+ "\n",
+ " layout {\n",
+ " title {\n",
+ " text = \"\\$\\\\text{Plot with annotations } \\\\alpha~and~\\\\Omega\\$\"\n",
+ " }\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "hide_input": false,
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "pygments_lexer": "kotlin",
+ "version": "1.4.20-dev-2342"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": false,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": false,
+ "toc_window_display": false
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/notebooks/plotlykt-demo.ipynb b/plotly/examples/notebooks/plotlykt-demo.ipynb
new file mode 100644
index 00000000..13581ef5
--- /dev/null
+++ b/plotly/examples/notebooks/plotlykt-demo.ipynb
@@ -0,0 +1,156 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import space.kscience.plotly.PlotlyIntegration\n",
+ "USE(PlotlyIntegration())\n",
+ "//@file:CompilerArgs(\"-jvm-target=11\")\n",
+ "//@file:Repository(\"https://repo.kotlin.link\")\n",
+ "//@file:DependsOn(\"space.kscience:plotlykt-jupyter-jvm:0.7.1\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "tags": []
+ },
+ "outputs": [],
+ "source": [
+ "import kotlin.math.*\n",
+ "\n",
+ "val x1 = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y1 = x1.map { sin(2.0 * PI * it) }\n",
+ "val y2 = x1.map { cos(2.0 * PI * it) }\n",
+ "\n",
+ "val trace1 = Trace(x1, y1) { name = \"sin\" }\n",
+ "val trace2 = Trace(x1, y2) { name = \"cos\" }\n",
+ "\n",
+ "Plotly.page { renderer ->\n",
+ " val plotConfig = PlotlyConfig{\n",
+ " responsive = true\n",
+ " imageFormat = \"svg\"\n",
+ " } \n",
+ " h1 { +\"A custom header\" }\n",
+ " hr()\n",
+ " plot(\"below\", config = plotConfig, renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ "\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "outputs": [],
+ "source": [
+ "HTML(\n",
+ " \"\"\"\n",
+ " \n",
+ " debug\n",
+ "
\n",
+ " \"\"\".trimIndent()\n",
+ ")"
+ ],
+ "metadata": {
+ "collapsed": false
+ },
+ "execution_count": null
+ },
+ {
+ "cell_type": "code",
+ "outputs": [],
+ "source": [
+ "HTML(\"\"\"\n",
+ "\n",
+ " \"\"\".trimIndent())"
+ ],
+ "metadata": {
+ "collapsed": false
+ },
+ "execution_count": null
+ },
+ {
+ "cell_type": "code",
+ "outputs": [],
+ "source": [],
+ "metadata": {
+ "collapsed": false
+ },
+ "execution_count": null
+ },
+ {
+ "cell_type": "code",
+ "outputs": [],
+ "source": [
+ "HTML(\"\"\"\n",
+ "\n",
+ "\"\"\")"
+ ],
+ "metadata": {
+ "collapsed": false
+ },
+ "execution_count": null
+ },
+ {
+ "cell_type": "code",
+ "outputs": [],
+ "source": [],
+ "metadata": {
+ "collapsed": false
+ }
+ }
+ ],
+ "metadata": {
+ "@webio": {
+ "lastCommId": null,
+ "lastKernelId": null
+ },
+ "hide_input": false,
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "nbconvert_exporter": "",
+ "pygments_lexer": "kotlin",
+ "version": "1.5.30-dev-598"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": false,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": false,
+ "toc_window_display": false
+ },
+ "ktnbPluginMetadata": {
+ "projectDependencies": true
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/notebooks/plotlykt-server-demo.ipynb b/plotly/examples/notebooks/plotlykt-server-demo.ipynb
new file mode 100644
index 00000000..59b7d210
--- /dev/null
+++ b/plotly/examples/notebooks/plotlykt-server-demo.ipynb
@@ -0,0 +1,213 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "outputs": [],
+ "source": [
+ "import space.kscience.plotly.server.PlotlyServerIntegration\n",
+ "import space.kscience.plotly.server.jupyter\n",
+ "\n",
+ "USE(PlotlyServerIntegration())"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import kotlin.math.*"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "val x1 = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y1 = x1.map { sin(2.0 * PI * it) }\n",
+ "val y2 = x1.map { cos(2.0 * PI * it) }\n",
+ "\n",
+ "val trace1 = Trace(x1, y1) { name = \"sin\" }\n",
+ "val trace2 = Trace(x1, y2) { name = \"cos\" }\n",
+ "\n",
+ "val fragment = Plotly.fragment { renderer ->\n",
+ " val plotConfig = PlotlyConfig {\n",
+ " responsive = true\n",
+ " }\n",
+ "\n",
+ " plot(\"above\", config = plotConfig, renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot above\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " hr()\n",
+ " h1 { +\"A custom separator\" }\n",
+ " hr()\n",
+ " div {\n",
+ " plot(\"below\", renderer = renderer) {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ " }\n",
+ " }\n",
+ "}\n",
+ "fragment"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "Plotly.plot {\n",
+ " traces(trace1, trace2)\n",
+ " layout {\n",
+ " title = \"The plot below\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "val x = (0..100).map { it.toDouble() / 100.0 }\n",
+ "val y = x.map { sin(2.0 * PI * it) }\n",
+ "\n",
+ "val trace = Trace(x, y) { name = \"sin\" }\n",
+ "\n",
+ "\n",
+ "val dynamicPlot = Plotly.plot {\n",
+ " traces(trace)\n",
+ " layout {\n",
+ " title = \"Dynamic plot\"\n",
+ " xaxis.title = \"x axis name\"\n",
+ " yaxis.title = \"y axis name\"\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "dynamicPlot"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import kotlinx.coroutines.*\n",
+ "\n",
+ "val job = GlobalScope.launch {\n",
+ " var time: Long = 0\n",
+ " while (isActive) {\n",
+ " delay(10)\n",
+ " time += 10\n",
+ " val dynamicY = x.map { sin(2.0 * PI * (it + time.toDouble() / 1000.0)) }\n",
+ " trace.y.set(dynamicY)\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "job.cancel()"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "dynamicPlot.layout.xaxis.title = \"крокозябра\""
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "Plotly.jupyter.port = 8884"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "Plotly.jupyter.port"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "outputs": [],
+ "source": [],
+ "metadata": {
+ "collapsed": false
+ }
+ }
+ ],
+ "metadata": {
+ "@webio": {
+ "lastCommId": null,
+ "lastKernelId": null
+ },
+ "hide_input": false,
+ "kernelspec": {
+ "display_name": "Kotlin",
+ "language": "kotlin",
+ "name": "kotlin"
+ },
+ "language_info": {
+ "codemirror_mode": "text/x-kotlin",
+ "file_extension": ".kt",
+ "mimetype": "text/x-kotlin",
+ "name": "kotlin",
+ "nbconvert_exporter": "",
+ "pygments_lexer": "kotlin",
+ "version": "1.5.30-dev-598"
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": false,
+ "sideBar": false,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": false,
+ "toc_window_display": false
+ },
+ "ktnbPluginMetadata": {
+ "projectDependencies": true
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/plotly/examples/src/main/kotlin/annotation/plotWithAnnotation.kt b/plotly/examples/src/main/kotlin/annotation/plotWithAnnotation.kt
new file mode 100644
index 00000000..c0a03361
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/annotation/plotWithAnnotation.kt
@@ -0,0 +1,30 @@
+package annotation
+
+import space.kscience.plotly.*
+import space.kscience.plotly.models.ScatterMode
+
+fun main() {
+ val plot = Plotly.plot {
+ scatter {
+ x(2, 3, 4, 5)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.lines
+ }
+
+ text {
+ position(2, 10)
+ text = "start"
+ }
+
+ text {
+ position(5, 17)
+ text = "finish"
+ }
+
+ layout {
+ title = "Plot with annotation"
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/bar/BarChartWithHoverText.kt b/plotly/examples/src/main/kotlin/bar/BarChartWithHoverText.kt
new file mode 100644
index 00000000..40587cad
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/BarChartWithHoverText.kt
@@ -0,0 +1,45 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.bar
+import space.kscience.plotly.makeFile
+
+
+/**
+ * - Bar chart with hover text
+ * - Use rgb color palette
+ * - Rotate axis ticks
+ */
+fun main() {
+ val plot = Plotly.plot {
+ bar {
+ x("Liam", "Sophie", "Jacob", "Mia", "William", "Olivia")
+ y(8.0, 8.0, 12.0, 12.0, 13.0, 20.0)
+ text("4.17 below the mean", "4.17 below the mean", "0.17 below the mean",
+ "0.17 below the mean", "0.83 above the mean", "7.83 above the mean")
+ marker {
+ color("rgb(142, 124, 195)")
+ }
+ showlegend = false
+ }
+
+ layout {
+ title {
+ text = "Number of Graphs Made this Week"
+ font {
+ family = "Raleway, sans-serif"
+ }
+ }
+ xaxis {
+ tickangle = -45
+ }
+ yaxis {
+ zeroline = false
+ gridwidth = 2
+ }
+ bargap = 0.05
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/ColoredAndStyledBarChart.kt b/plotly/examples/src/main/kotlin/bar/ColoredAndStyledBarChart.kt
new file mode 100644
index 00000000..4b95c890
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/ColoredAndStyledBarChart.kt
@@ -0,0 +1,72 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Bar
+import space.kscience.plotly.models.BarMode
+
+
+/**
+ * - Colored and styled bar chart
+ * - Change font size and color of axis title & labels
+ * - Use grouped barmode
+ */
+fun main() {
+ val years = listOf(1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012)
+ val trace1 = Bar {
+ x.set(years)
+ y(219, 146, 112, 127, 124, 180, 236, 207, 236, 263, 350, 430, 474, 526, 488, 537, 500, 439)
+ name = "Rest of world"
+ marker {
+ color("rgb(55, 83, 109)")
+ }
+ }
+
+ val trace2 = Bar {
+ x.set(years)
+ y(16, 13, 10, 11, 28, 37, 43, 55, 56, 88, 105, 156, 270, 299, 340, 403, 549, 499)
+ name = "China"
+ marker {
+ color("rgb(26, 118, 255)")
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "US Export of Plastic Scrap"
+ xaxis {
+ tickfont {
+ size = 14
+ color("rgb(107, 107, 107)")
+ }
+ }
+ yaxis {
+ title {
+ text = "USD (millions)"
+ font {
+ size = 16
+ color("rgb(107, 107, 107)")
+ }
+ }
+ tickfont {
+ size = 14
+ color("rgb(107, 107, 107)")
+ }
+ }
+ legend {
+ x = 0
+ y = 1.0
+ bgcolor("rgba(255, 255, 255, 0)")
+ bordercolor("rgba(255, 255, 255, 0)")
+ }
+
+ barmode = BarMode.group
+ bargap = 0.15
+ bargroupgap = 0.1
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/GroupedBarChart.kt b/plotly/examples/src/main/kotlin/bar/GroupedBarChart.kt
new file mode 100644
index 00000000..e803b208
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/GroupedBarChart.kt
@@ -0,0 +1,43 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Bar
+import space.kscience.plotly.models.BarMode
+import space.kscience.plotly.palettes.Xkcd
+
+
+/**
+ * - Grouped bar chart
+ * - Use XKCD color palette
+ */
+fun main() {
+ val trace1 = Bar {
+ x("giraffes", "orangutans", "monkeys")
+ y(20, 14, 23)
+ name = "SF Zoo"
+ marker {
+ color(Xkcd.GREEN)
+ }
+ }
+
+ val trace2 = Bar {
+ x("giraffes", "orangutans", "monkeys")
+ y(12, 18, 29)
+ name = "LA Zoo"
+ marker {
+ color(Xkcd.BLUE)
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "Grouped Bar Chart"
+ barmode = BarMode.group
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/GroupedBarDirectLabels.kt b/plotly/examples/src/main/kotlin/bar/GroupedBarDirectLabels.kt
new file mode 100644
index 00000000..8b703309
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/GroupedBarDirectLabels.kt
@@ -0,0 +1,62 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Bar
+import space.kscience.plotly.models.TextPosition
+
+
+/**
+ * - Grouped bar chart
+ * - Use rgb(a) color palette
+ * - Hide hoverinfo & legend
+ * - Show text on the bars
+ */
+fun main() {
+ val xValues = listOf("Product A", "Product B", "Product C")
+ val yValues = listOf(20, 14, 23)
+ val yValues2 = listOf(24, 16, 20)
+
+ val trace1 = Bar {
+ x.strings = xValues
+ y.numbers = yValues
+ text.strings = yValues.map { it.toString() }
+ textposition = TextPosition.auto
+ hoverinfo = "none"
+ opacity = 0.5
+ showlegend = false
+ marker {
+ color("rgb(158, 202, 225)")
+ line {
+ color("rgb(8, 48, 107)")
+ width = 2
+ }
+ }
+ }
+
+ val trace2 = Bar {
+ x.strings = xValues
+ y.numbers = yValues2
+ text.strings = yValues2.map { it.toString() }
+ textposition = TextPosition.auto
+ hoverinfo = "none"
+ showlegend = false
+ marker {
+ color("rgba(58, 200, 225, 0.5)")
+ line {
+ color("rgb(8, 48, 107)")
+ width = 2
+ }
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "January 2013 Sales Report"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/HorizontalBarPlot.kt b/plotly/examples/src/main/kotlin/bar/HorizontalBarPlot.kt
new file mode 100644
index 00000000..5309c613
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/HorizontalBarPlot.kt
@@ -0,0 +1,61 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Bar
+import space.kscience.plotly.models.Orientation
+import kotlin.random.Random
+
+
+/**
+ * - Horizontal bar chart
+ * - Use css named color palette
+ * - Change fontsize of the ticks
+ * - Add space between axis and ticklabels (set tickcolor to white)
+ */
+fun main() {
+ val colors = listOf("DarkOliveGreen", "OliveDrab", "YellowGreen", "GreenYellow", "Yellow", "PeachPuff",
+ "Pink", "HotPink", "DeepPink", "MediumVioletRed", "Purple", "RebeccaPurple", "MediumBlue", "Blue",
+ "DodgerBlue", "SteelBlue", "LightSlateGrey", "SlateGrey", "DarkSlateGrey", "Black")
+ val length = mutableListOf()
+ for (i in colors.indices) {
+ length.add(Random.nextDouble())
+ }
+
+ val bar = Bar {
+ y.strings = colors
+ x.numbers = length
+ orientation = Orientation.h
+ marker {
+ colors(colors)
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(bar)
+
+ layout {
+ title = "What an Awesome Plot!"
+ height = 700
+ width = 1200
+ margin {
+ l = 160
+ }
+
+ xaxis {
+ tickfont {
+ size = 14
+ }
+ }
+ yaxis {
+ tickfont {
+ size = 16
+ }
+ ticklen = 4
+ tickcolor("white")
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/IndividualBarBase.kt b/plotly/examples/src/main/kotlin/bar/IndividualBarBase.kt
new file mode 100644
index 00000000..2de07598
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/IndividualBarBase.kt
@@ -0,0 +1,41 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Bar
+
+
+/**
+ * - Bar chart with customized base
+ * -
+ */
+fun main() {
+ val trace1 = Bar {
+ x("2016", "2017", "2018")
+ y(500, 600, 700)
+ base = listOf(-500, -600, -700)
+ marker {
+ color("red")
+ }
+ name = "expenses"
+ }
+
+ val trace2 = Bar {
+ x("2016", "2017", "2018")
+ y(300, 400, 700)
+ marker {
+ color("blue")
+ }
+ name = "revenue"
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "Customizing individual bar base"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/IndividualBarColorsAndWidth.kt b/plotly/examples/src/main/kotlin/bar/IndividualBarColorsAndWidth.kt
new file mode 100644
index 00000000..d38786d5
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/IndividualBarColorsAndWidth.kt
@@ -0,0 +1,32 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.bar
+import space.kscience.plotly.makeFile
+
+
+/**
+ * - Colored bar chart
+ * - Use array of colors
+ * - Make bar chart without making Bar piece
+ * - Customizing individual bar colors and width
+ */
+fun main() {
+ val plot = Plotly.plot {
+ bar {
+ x("Feature A", "Feature B", "Feature C", "Feature D", "Feature E")
+ y(20, 14, 23, 25, 22)
+ widthList = listOf(0.8, 0.8, 0.9, 0.6, 0.8)
+ marker {
+ colors(listOf("rgba(204, 204, 204, 1)", "rgba(222, 45, 38, 0.8)", "rgba(204, 204, 204, 1)",
+ "rgba(204, 204, 204, 1)", "rgba(204, 204, 204, 1)"))
+ }
+ }
+
+ layout {
+ title = "Least Used Feature"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/bar/StackedBarChart.kt b/plotly/examples/src/main/kotlin/bar/StackedBarChart.kt
new file mode 100644
index 00000000..dcca6f59
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/bar/StackedBarChart.kt
@@ -0,0 +1,62 @@
+package bar
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.bar
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.BarMode
+import space.kscience.plotly.models.XAnchor
+import space.kscience.plotly.models.YAnchor
+
+
+/**
+ * - Stacked bar chart
+ * - Use css named colors
+ * - Show legend inside the plot
+ * - Change margins
+ */
+fun main() {
+ val values = listOf(1, 2, 3.5, 4.1, 4.7, 4, 3.2, 1.95, 1)
+
+ val plot = Plotly.plot {
+ bar {
+ y.numbers = values
+ marker { color("red") }
+ }
+
+ bar {
+ y.numbers = values
+ marker { color("orange") }
+ }
+
+ bar {
+ y.numbers = values
+ marker { color("yellow") }
+ }
+
+ bar {
+ y.numbers = values
+ marker { color("greenyellow") }
+ }
+
+ bar {
+ y.numbers = values
+ marker { color("limegreen") }
+ }
+
+ layout {
+ barmode = BarMode.stack
+ title = "Stacked Bar Chart"
+ margin { l = 20; r = 20; b = 20; t = 40 }
+
+ legend {
+ xanchor = XAnchor.right
+ yanchor = YAnchor.top
+ x = 1
+ y = 1
+ borderwidth = 1
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/box/BasicBoxPlot.kt b/plotly/examples/src/main/kotlin/box/BasicBoxPlot.kt
new file mode 100644
index 00000000..b9d5aa21
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/box/BasicBoxPlot.kt
@@ -0,0 +1,46 @@
+package box
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Box
+import space.kscience.plotly.models.BoxPoints
+import kotlin.random.Random
+
+
+/**
+ * - Basic Box plot with all points
+ */
+fun main() {
+ val size = 50
+ val y0 = mutableListOf()
+ val y1 = mutableListOf()
+
+ for (i in 0 until size) {
+ y0.add(Random.nextDouble())
+ y1.add(Random.nextDouble())
+ }
+
+ val trace1 = Box {
+ y.set(y0)
+ boxpoints = BoxPoints.all
+ jitter = 0.3
+ pointpos = -1.8
+ }
+
+ val trace2 = Box {
+ y.set(y1)
+ boxpoints = BoxPoints.all
+ jitter = 0.3
+ pointpos = -1.8
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "Basic Box Plot"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/box/FullyStyledBoxPlot.kt b/plotly/examples/src/main/kotlin/box/FullyStyledBoxPlot.kt
new file mode 100644
index 00000000..2da1dc6a
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/box/FullyStyledBoxPlot.kt
@@ -0,0 +1,88 @@
+package box
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Box
+import space.kscience.plotly.models.BoxPoints
+import space.kscience.plotly.models.Trace
+import kotlin.random.Random
+
+
+fun getRandom(size: Int, mul: Double): List {
+ val value = mutableListOf()
+ for (i in 0..size) {
+ value.add(Random.nextDouble() * mul)
+ }
+ return value.toList()
+}
+
+/**
+ * - Styled box plot
+ * - Style zeroline & grid
+ * - Change background color of the plot
+ * - Use array of traces
+ */
+fun main() {
+ val xData = listOf("Carmelo
Anthony", "Dwyane
Wade", "Deron
Williams",
+ "Brook
Lopez", "Damian
Lillard", "David
West",
+ "Blake
Griffin", "David
Lee", "Demar
Derozan")
+ val yData = listOf(
+ getRandom(30, 10.0),
+ getRandom(30, 20.0),
+ getRandom(30, 25.0),
+ getRandom(30, 40.0),
+ getRandom(30, 45.0),
+ getRandom(30, 30.0),
+ getRandom(30, 20.0),
+ getRandom(30, 15.0),
+ getRandom(30, 43.0),
+ getRandom(30, 10.0)
+ )
+
+ val data = mutableListOf()
+ for (i in xData.indices) {
+ val result = Box {
+ y.set(yData[i])
+ name = xData[i]
+ boxpoints = BoxPoints.all
+ jitter = 0.5
+ whiskerwidth = 0.2
+ fillcolor("cls")
+ marker {
+ size = 2
+ }
+ line {
+ width = 1
+ }
+ showlegend = false
+ }
+ data.add(result)
+ }
+
+ val plot = Plotly.plot {
+ traces(data)
+
+ layout {
+ title = "Points Scored by the Top 9 Scoring NBA Players in 2012"
+ yaxis {
+ autorange = true
+ showgrid = true
+ zeroline = true
+ gridcolor("rgb(255, 255, 255)")
+ gridwidth = 1
+ zerolinecolor("rgb(255, 255, 255)")
+ zerolinewidth = 2
+ }
+ margin {
+ l = 40
+ r = 30
+ b = 80
+ t = 100
+ }
+ paper_bgcolor("rgb(243, 243, 243)")
+ plot_bgcolor("rgb(243, 243, 243)")
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/box/HorizontalBoxPlot.kt b/plotly/examples/src/main/kotlin/box/HorizontalBoxPlot.kt
new file mode 100644
index 00000000..1ea2b085
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/box/HorizontalBoxPlot.kt
@@ -0,0 +1,67 @@
+package box
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Box
+import space.kscience.plotly.models.BoxMean
+import space.kscience.plotly.models.BoxMode
+import space.kscience.plotly.models.Orientation
+
+
+/**
+ * - Horizontal box plot
+ * - Grouped boxes
+ * - Change box colors
+ */
+fun main() {
+ val y0 = listOf("day 1", "day 1", "day 1", "day 1", "day 1", "day 1",
+ "day 2", "day 2", "day 2", "day 2", "day 2", "day 2")
+
+ val trace1 = Box {
+ x(0.2, 0.2, 0.6, 1.0, 0.5, 0.4, 0.2, 0.7, 0.9, 0.1, 0.5, 0.3)
+ y.strings = y0
+ name = "kale"
+ marker {
+ color("#3D9970")
+ }
+ boxmean = BoxMean.`false`
+ orientation = Orientation.h
+ }
+
+ val trace2 = Box {
+ x(0.6, 0.7, 0.3, 0.6, 0.0, 0.5, 0.7, 0.9, 0.5, 0.8, 0.7, 0.2)
+ y.strings = y0
+ name = "radishes"
+ marker {
+ color("#FF4136")
+ }
+ boxmean = BoxMean.`false`
+ orientation = Orientation.h
+ }
+
+ val trace3 = Box {
+ x(0.1, 0.3, 0.1, 0.9, 0.6, 0.6, 0.9, 1.0, 0.3, 0.6, 0.8, 0.5)
+ y.strings = y0
+ name = "carrots"
+ marker {
+ color("#FF851B")
+ }
+ boxmean = BoxMean.`false`
+ orientation = Orientation.h
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2, trace3)
+
+ layout {
+ title = "Grouped Horizontal Box Plot"
+ xaxis {
+ title = "normalized moisture"
+ zeroline = false
+ }
+ boxmode = BoxMode.group
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/box/StylingMeanAndSd.kt b/plotly/examples/src/main/kotlin/box/StylingMeanAndSd.kt
new file mode 100644
index 00000000..ea618315
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/box/StylingMeanAndSd.kt
@@ -0,0 +1,40 @@
+package box
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Box
+import space.kscience.plotly.models.BoxMean
+import space.kscience.plotly.palettes.Xkcd
+
+fun main() {
+ val y1 = listOf(2.37, 2.16, 4.82, 1.73, 1.04, 0.23, 1.32, 2.91, 0.11, 4.51, 0.51,
+ 3.75, 1.35, 2.98, 4.50, 0.18, 4.66, 1.30, 2.06, 1.19)
+
+ val trace1 = Box {
+ y.numbers = y1
+ name = "Only Mean"
+ marker {
+ color(Xkcd.CERULEAN)
+ }
+ boxmean = BoxMean.`true`
+ }
+
+ val trace2 = Box {
+ y.numbers = y1
+ name = "Mean and Standard Deviation"
+ marker {
+ color(Xkcd.BLUE_VIOLET)
+ }
+ boxmean = BoxMean.sd
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "Box Plot Styling Mean and Standard Deviation"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/box/StylingOutliers.kt b/plotly/examples/src/main/kotlin/box/StylingOutliers.kt
new file mode 100644
index 00000000..71d66414
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/box/StylingOutliers.kt
@@ -0,0 +1,66 @@
+package box
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Box
+import space.kscience.plotly.models.BoxPoints
+
+fun main() {
+ val y1 = listOf(0.75, 5.25, 5.5, 6, 6.2, 6.6, 6.80, 7.0, 7.2, 7.5, 7.5, 7.75, 8.15, 8.15,
+ 8.65, 8.93, 9.2, 9.5, 10, 10.25, 11.5, 12, 16, 20.90, 22.3, 23.25)
+
+ val trace1 = Box {
+ y.set(y1)
+ name = "All Points"
+ jitter = 0.3
+ pointpos = -1.8
+ marker {
+ color("rgb(7, 40, 89)")
+ }
+ boxpoints = BoxPoints.all
+ }
+
+ val trace2 = Box {
+ y.set(y1)
+ name = "Only Wiskers"
+ marker {
+ color("rgb(9, 56, 125)")
+ }
+ boxpoints = BoxPoints.`false`
+ }
+
+ val trace3 = Box {
+ y.set(y1)
+ name = "Suspected Outlier"
+ marker {
+ color("rgb(8, 81, 156)")
+ outliercolor("rgba(219, 64, 82, 0.6)")
+ line {
+ outliercolor("rgba(219, 64, 82, 1.0)")
+ outlierwidth = 2
+ }
+ }
+ boxpoints = BoxPoints.suspectedoutliers
+ }
+
+ val trace4 = Box {
+ y.set(y1)
+ name = "Wiskers and Outliers"
+ marker {
+ color("rgb(107, 174, 214)")
+ }
+ boxpoints = BoxPoints.outliers
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2, trace3, trace4)
+
+ layout {
+ width = 700
+ height = 450
+ title = "Box Plot Styling Outliers"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/candlestick/basicCandleStick.kt b/plotly/examples/src/main/kotlin/candlestick/basicCandleStick.kt
new file mode 100644
index 00000000..4ed9413a
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/candlestick/basicCandleStick.kt
@@ -0,0 +1,215 @@
+package candlestick
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.AxisType
+import space.kscience.plotly.models.CandleStick
+import space.kscience.plotly.models.DragMode
+
+internal val candleStickTrace = CandleStick {
+ x.strings = listOf(
+ "2017-01-04",
+ "2017-01-05",
+ "2017-01-06",
+ "2017-01-09",
+ "2017-01-10",
+ "2017-01-11",
+ "2017-01-12",
+ "2017-01-13",
+ "2017-01-17",
+ "2017-01-18",
+ "2017-01-19",
+ "2017-01-20",
+ "2017-01-23",
+ "2017-01-24",
+ "2017-01-25",
+ "2017-01-26",
+ "2017-01-27",
+ "2017-01-30",
+ "2017-01-31",
+ "2017-02-01",
+ "2017-02-02",
+ "2017-02-03",
+ "2017-02-06",
+ "2017-02-07",
+ "2017-02-08",
+ "2017-02-09",
+ "2017-02-10",
+ "2017-02-13",
+ "2017-02-14",
+ "2017-02-15"
+ )
+
+ close.numbers = listOf(
+ 116.019997,
+ 116.610001,
+ 117.910004,
+ 118.989998,
+ 119.110001,
+ 119.75,
+ 119.25,
+ 119.040001,
+ 120,
+ 119.989998,
+ 119.779999,
+ 120,
+ 120.080002,
+ 119.970001,
+ 121.879997,
+ 121.940002,
+ 121.949997,
+ 121.629997,
+ 121.349998,
+ 128.75,
+ 128.529999,
+ 129.080002,
+ 130.289993,
+ 131.529999,
+ 132.039993,
+ 132.419998,
+ 132.119995,
+ 133.289993,
+ 135.020004,
+ 135.509995
+ )
+
+ high.numbers = listOf(
+ 116.510002,
+ 116.860001,
+ 118.160004,
+ 119.43,
+ 119.379997,
+ 119.93,
+ 119.300003,
+ 119.620003,
+ 120.239998,
+ 120.5,
+ 120.089996,
+ 120.449997,
+ 120.809998,
+ 120.099998,
+ 122.099998,
+ 122.440002,
+ 122.349998,
+ 121.629997,
+ 121.389999,
+ 130.490005,
+ 129.389999,
+ 129.190002,
+ 130.5,
+ 132.089996,
+ 132.220001,
+ 132.449997,
+ 132.940002,
+ 133.820007,
+ 135.089996,
+ 136.270004
+ )
+
+ increasing {
+ lineColor("#17BECF")
+ }
+
+ decreasing {
+ lineColor("#7F7F7F")
+ }
+
+ line { color("rgba(31,119,180,1)") }
+
+ low.numbers = listOf(
+ 115.75,
+ 115.809998,
+ 116.470001,
+ 117.940002,
+ 118.300003,
+ 118.599998,
+ 118.209999,
+ 118.809998,
+ 118.220001,
+ 119.709999,
+ 119.370003,
+ 119.730003,
+ 119.769997,
+ 119.5,
+ 120.279999,
+ 121.599998,
+ 121.599998,
+ 120.660004,
+ 120.620003,
+ 127.010002,
+ 127.779999,
+ 128.160004,
+ 128.899994,
+ 130.449997,
+ 131.220001,
+ 131.119995,
+ 132.050003,
+ 132.75,
+ 133.25,
+ 134.619995
+ )
+
+ open.numbers = listOf(
+ 115.849998,
+ 115.919998,
+ 116.779999,
+ 117.949997,
+ 118.769997,
+ 118.739998,
+ 118.900002,
+ 119.110001,
+ 118.339996,
+ 120,
+ 119.400002,
+ 120.449997,
+ 120,
+ 119.550003,
+ 120.419998,
+ 121.669998,
+ 122.139999,
+ 120.93,
+ 121.150002,
+ 127.029999,
+ 127.980003,
+ 128.309998,
+ 129.130005,
+ 130.539993,
+ 131.350006,
+ 131.649994,
+ 132.460007,
+ 133.080002,
+ 133.470001,
+ 135.520004
+ )
+}
+
+
+fun main() {
+ Plotly.plot {
+ traces(candleStickTrace)
+ layout {
+ dragmode = DragMode.zoom
+ margin {
+ r = 10
+ t = 25
+ b = 40
+ l = 60
+ }
+ showlegend = false
+ xaxis {
+ autorange = true
+ range("2017-01-03 12:00".."2017-02-15 12:00")
+ //rangeslider: { range: ["2017-01-03 12:00", "2017-02-15 12:00"] },
+ title = "Date"
+ type = AxisType.date
+ }
+ yaxis {
+ autorange = true
+ range(114.609999778..137.410004222)
+ type = AxisType.linear
+ }
+ }
+ }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/candlestick/dynamicCandleStick.kt b/plotly/examples/src/main/kotlin/candlestick/dynamicCandleStick.kt
new file mode 100644
index 00000000..78a51880
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/candlestick/dynamicCandleStick.kt
@@ -0,0 +1,59 @@
+package candlestick
+
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.isActive
+import kotlinx.coroutines.launch
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.models.AxisType
+import space.kscience.plotly.models.DragMode
+import space.kscience.plotly.plot
+import space.kscience.plotly.server.close
+import space.kscience.plotly.server.pushUpdates
+import space.kscience.plotly.server.serve
+import space.kscience.plotly.server.show
+import kotlin.random.Random
+
+fun main() {
+ val server = Plotly.serve {
+ pushUpdates(50)
+ page { plotly ->
+ plot(renderer = plotly) {
+ traces(candleStickTrace)
+ layout {
+ dragmode = DragMode.zoom
+ margin {
+ r = 10
+ t = 25
+ b = 40
+ l = 60
+ }
+ showlegend = false
+ xaxis {
+ type = AxisType.date
+ range("2017-01-03 12:00".."2017-02-15 12:00")
+ //rangeslider: { range: ["2017-01-03 12:00", "2017-02-15 12:00"] },
+ title = "Date"
+ }
+ yaxis {
+ range(114.609999778..137.410004222)
+ }
+ }
+
+ launch {
+ while (isActive) {
+ delay(400)
+ candleStickTrace.open.numbers = candleStickTrace.open.doubles.map { it + Random.nextDouble() - 0.5 }
+ }
+ }
+ }
+ }
+ }
+ server.show()
+ println("Enter 'exit' to close server")
+ while (readLine()?.trim() != "exit") {
+ //wait
+ }
+
+ server.close()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/complexDynamicServer.kt b/plotly/examples/src/main/kotlin/complexDynamicServer.kt
new file mode 100644
index 00000000..132a9626
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/complexDynamicServer.kt
@@ -0,0 +1,138 @@
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.flow
+import kotlinx.coroutines.flow.zip
+import kotlinx.coroutines.launch
+import kotlinx.html.div
+import kotlinx.html.link
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.plot
+import space.kscience.plotly.server.pushUpdates
+import space.kscience.plotly.server.serve
+import space.kscience.plotly.server.show
+import space.kscience.plotly.trace
+import java.time.Instant
+import java.util.concurrent.ConcurrentLinkedQueue
+import kotlin.math.cos
+import kotlin.math.sin
+
+
+/**
+ * In-place replacement for absent method from stdlib
+ */
+fun Flow.windowed(size: Int): Flow> {
+ val queue = ConcurrentLinkedQueue()
+ return flow {
+ this@windowed.collect {
+ queue.add(it)
+ if (queue.size >= size) {
+ queue.poll()
+ }
+ emit(queue)
+ }
+ }
+}
+
+suspend fun Trace.updateFrom(axisName: String, flow: Flow>) {
+ flow.collect {
+ axis(axisName).numbers = it
+ }
+}
+
+suspend fun Trace.updateXYFrom(flow: Flow>>) {
+ flow.collect { pairs ->
+ x.numbers = pairs.map { it.first }
+ y.numbers = pairs.map { it.second }
+ }
+}
+
+fun main() {
+ val server = Plotly.serve {
+ val sinFlow = flow {
+ while (true) {
+ delay(40)
+ val time = Instant.now()
+ emit(sin(time.toEpochMilli().toDouble() / 2500))
+ }
+ }
+ val cosFlow = flow {
+ while (true) {
+ delay(50)
+ val time = Instant.now()
+ emit(cos(time.toEpochMilli().toDouble() / 2500))
+ }
+ }
+ val sinCosFlow = sinFlow.zip(cosFlow) { sin, cos ->
+ sin to cos
+ }
+ page { renderer ->
+ link {
+ rel = "stylesheet"
+ href = "https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
+ attributes["integrity"] = "sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
+ attributes["crossorigin"] = "anonymous"
+ }
+ div("row") {
+ div("col-6") {
+ plot(renderer = renderer) {
+ layout {
+ title = "sin property"
+ xaxis.title = "point index"
+ yaxis.title = "sin"
+ }
+ trace {
+ val flow: Flow> = sinFlow.windowed(100)
+ launch {
+ updateFrom(Trace.Y_AXIS, flow)
+ }
+ }
+ }
+ }
+ div("col-6") {
+ plot(renderer = renderer) {
+ layout {
+ title = "cos property"
+ xaxis.title = "point index"
+ yaxis.title = "cos"
+ }
+ trace {
+ val flow: Flow> = cosFlow.windowed(100)
+ launch {
+ updateFrom(Trace.Y_AXIS, flow)
+ }
+ }
+ }
+ }
+ }
+ div("row") {
+ div("col-12") {
+ plot(renderer = renderer) {
+ layout {
+ title = "cos vs sin"
+ xaxis.title = "sin"
+ yaxis.title = "cos"
+ }
+ trace {
+ name = "non-synchronized"
+ val flow: Flow>> = sinCosFlow.windowed(30)
+ launch {
+ updateXYFrom(flow)
+ }
+ }
+ }
+ }
+ }
+
+ }
+ pushUpdates(100) // start sending updates via websocket to the front-end
+ }
+
+ server.show()
+
+ println("Press Enter to close server")
+ readLine()
+
+ server.stop(1000, 5000)
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/contour/BasicContour.kt b/plotly/examples/src/main/kotlin/contour/BasicContour.kt
new file mode 100644
index 00000000..ded6ef10
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/BasicContour.kt
@@ -0,0 +1,60 @@
+package contour
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Contour
+import space.kscience.plotly.models.MeasureMode
+
+
+/**
+ * - basic contour plot
+ * - change font size of labels ticks
+ * - setting x and y coordinates
+ * - change color bar size
+ */
+fun main() {
+ val values: List> = listOf(
+ listOf(10, 10.625, 12.5, 15.625, 20.0),
+ listOf(5.625, 6.25, 8.125, 11.25, 15.625),
+ listOf(2.5, 3.125, 5.0, 8.125, 12.5),
+ listOf(0.625, 1.25, 3.125, 6.25, 10.625),
+ listOf(0.0, 0.625, 2.5, 5.625, 10)
+ )
+ val x1 = listOf(-9, -6, -5, -3, -1)
+ val y1 = listOf(0, 1, 4, 5, 7)
+
+ val contour = Contour{
+ x.numbers = x1
+ y.numbers = y1
+ z(values)
+
+ colorbar {
+ thickness = 75.0
+ thicknessmode = MeasureMode.pixels
+ len = 0.9
+ lenmode = MeasureMode.fraction
+ outlinewidth = 0
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(contour)
+
+ layout {
+ title = "Basic Contour Plot"
+ xaxis {
+ tickfont {
+ size = 16
+ }
+ }
+ yaxis {
+ tickfont {
+ size = 16
+ }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/contour/ColoredContourPlot.kt b/plotly/examples/src/main/kotlin/contour/ColoredContourPlot.kt
new file mode 100644
index 00000000..0e4e0fd7
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/ColoredContourPlot.kt
@@ -0,0 +1,59 @@
+package contour
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Contour
+import kotlin.math.cos
+import kotlin.math.pow
+import kotlin.math.sin
+
+/**
+ * - simple contour plot without level lines
+ * - transpose axis
+ * - change size of the plot
+ * - change color scale
+ */
+fun main() {
+ val size = 25
+ val x1 = (0..size).map { it.toDouble() / 5 }
+ val y1 = (0..size).map { it.toDouble() / 5 }
+ val z = mutableListOf>()
+
+ for (i in y1.indices) {
+ z.add(MutableList(size + 1) { 0.0 })
+ }
+
+ for (i in x1.indices) {
+ for (j in y1.indices) {
+ z[i][j] = sin(x1[i]).pow(10) + cos(10 + y1[j] * x1[i]) * cos(x1[i])
+ }
+ }
+
+ val contour = Contour {
+ x.numbers = x1
+ y.numbers = y1
+ z(z)
+
+ transpose = true
+ colorscale = Value.of("Portland")
+ reversescale = true
+
+ contours {
+ showlines = false
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(contour)
+
+ layout {
+ width = 1000
+ height = 500
+ title = "Colored Contour Plot"
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/contour/ConnectNullGaps.kt b/plotly/examples/src/main/kotlin/contour/ConnectNullGaps.kt
new file mode 100644
index 00000000..feb8e39e
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/ConnectNullGaps.kt
@@ -0,0 +1,59 @@
+package contour
+
+import space.kscience.plotly.*
+import space.kscience.plotly.models.Contour
+
+
+/**
+ * - contour plots with and without gaps between not-null values
+ * - change plot size
+ * - stack two plots
+ */
+fun main() {
+ val x1 = (0..7)
+ val y2 = (0..6)
+
+ val z1 = listOf(
+ listOf(null, null, null, 12, 13, 14, 15, 16),
+ listOf(null, 1, null, 11, null, null, null, 17),
+ listOf(null, 2, 6, 7, null, null, null, 18),
+ listOf(null, 3, null, 8, null, null, null, 19),
+ listOf(5, 4, 10, 9, null, null, null, 20),
+ listOf(null, null, null, 27, null, null, null, 21),
+ listOf(null, null, null, 26, 25, 24, 23, 22))
+
+ val contour1 = Contour{
+ x.set(x1)
+ y.set(y2)
+ z.set(z1)
+ showscale = false
+ }
+
+ val contour2 = Contour {
+ x.set(x1)
+ y.set(y2)
+ z.set(z1)
+ showscale = false
+ connectgaps = true
+ }
+
+ Plotly.fragment {
+ plot {
+ traces(contour1)
+ layout {
+ width = 800
+ height = 450
+ title = "Gaps Between Nulls"
+ }
+ }
+
+ plot {
+ traces(contour2)
+ layout {
+ width = 800
+ height = 450
+ title = "Connected Gaps"
+ }
+ }
+ }.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/contour/ContourLinesLabels.kt b/plotly/examples/src/main/kotlin/contour/ContourLinesLabels.kt
new file mode 100644
index 00000000..f86f6fbd
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/ContourLinesLabels.kt
@@ -0,0 +1,65 @@
+package contour
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.contour
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ContoursColoring
+import kotlin.math.exp
+import kotlin.math.pow
+
+/**
+ * - colored contour plot lines
+ * - labels on contour lines
+ * - change size of the plot and contour lines width
+ */
+fun main() {
+ val range = -300..300
+ val rangeSize = range.last - range.first + 1
+ val x1 = range.map { it.toDouble() / 100 }
+ val y1 = range.map { it.toDouble() / 100 }
+ val values = mutableListOf>()
+
+ for (i in y1.indices) {
+ values.add(MutableList(rangeSize) { 0.0 })
+ }
+
+ for (i in x1.indices) {
+ for (j in y1.indices) {
+ val z1 = exp(-x1[i].pow(2) - y1[j].pow(2))
+ val z2 = exp(-(x1[i] - 1).pow(2) - (y1[j] - 1).pow(2))
+ values[i][j] = (z1 - z2) * 2
+ }
+ }
+
+ val plot = Plotly.plot {
+ contour {
+ x.set(x1)
+ y.set(y1)
+ z.set(values)
+
+ line {
+ width = 4
+ }
+
+ colorscale = Value.of("Jet")
+ contours {
+ coloring = ContoursColoring.lines
+ showlabels = true
+
+ labelfont {
+ size = 16
+ }
+ }
+ }
+
+ layout {
+ width = 700
+ height = 600
+ title = "Contour Lines with Labels"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/contour/CustomazingSpaceBetweenTicks.kt b/plotly/examples/src/main/kotlin/contour/CustomazingSpaceBetweenTicks.kt
new file mode 100644
index 00000000..4daaee13
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/CustomazingSpaceBetweenTicks.kt
@@ -0,0 +1,35 @@
+package contour
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Contour
+
+fun main() {
+ val z1 = listOf(
+ listOf(10, 10.625, 12.5, 15.625, 20),
+ listOf(5.625, 6.25, 8.125, 11.25, 15.625),
+ listOf(2.5, 3.125, 5.0, 8.125, 12.5),
+ listOf(0.625, 1.25, 3.125, 6.25, 10.625),
+ listOf(0, 0.625, 2.5, 5.625, 10))
+
+ val contour = Contour {
+ z.set(z1)
+ colorscale = Value.of("Jet")
+ dx = 10
+ x0 = Value.of(5)
+ dy = 10
+ y0 = Value.of(10)
+ }
+
+ val plot = Plotly.plot {
+ traces(contour)
+
+ layout {
+ title = "Customizing Spacing Between X and Y Axis Ticks"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/contour/NegativeDashContourLines.kt b/plotly/examples/src/main/kotlin/contour/NegativeDashContourLines.kt
new file mode 100644
index 00000000..5394ce12
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/NegativeDashContourLines.kt
@@ -0,0 +1,93 @@
+package contour
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.contour
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ContoursColoring
+import space.kscience.plotly.models.Dash
+import kotlin.math.exp
+import kotlin.math.pow
+
+/**
+ * - colored contour plot lines
+ * - labels on contour lines
+ * - hide colorbar
+ * - change size of the plot and contour lines width
+ * - change style of contour lines
+ */
+fun main() {
+ val range = -160..260 step 4
+ val rangeSize = (range.last - range.first) / 4 + 1
+ val x1 = range.map { it.toDouble() / 100 }
+ val y1 = range.map { it.toDouble() / 100 }
+ val z1 = mutableListOf>()
+ val z2 = mutableListOf>()
+
+ for (i in x1.indices) {
+ z1.add(MutableList(rangeSize) { 0.0 })
+ z2.add(MutableList(rangeSize) { 0.0 })
+ }
+
+ for (i in x1.indices) {
+ for (j in y1.indices) {
+ val elem1 = exp(-x1[i].pow(2) - y1[j].pow(2))
+ val elem2 = exp(-(x1[i] - 1).pow(2) - (y1[j] - 1).pow(2))
+ val elem = (elem1 - elem2) * 2
+ if (elem >= -0.01) {
+ z1[i][j] = elem
+ z2[i][j] = null
+ } else {
+ z2[i][j] = elem
+ z1[i][j] = null
+ }
+ }
+ }
+
+ val plot = Plotly.plot {
+ contour {
+ x.set(x1)
+ y.set(y1)
+ z.set(z1)
+
+ line {
+ width = 4
+ }
+ connectgaps = true
+ colorscale = Value.of("Jet")
+ showscale = false
+ contours {
+ coloring = ContoursColoring.lines
+ showlabels = true
+ }
+ }
+
+ contour {
+ x.set(x1)
+ y.set(y1)
+ z.set(z2)
+
+ line {
+ width = 4
+ dash = Dash.dash
+ }
+ connectgaps = true
+ colorscale = Value.of("Jet")
+ reversescale = true
+ showscale = false
+ contours {
+ coloring = ContoursColoring.lines
+ showlabels = true
+ }
+ }
+
+ layout {
+ width = 900
+ height = 750
+ title = "Negative Contours Dashed"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/contour/SimpleContourPlot.kt b/plotly/examples/src/main/kotlin/contour/SimpleContourPlot.kt
new file mode 100644
index 00000000..56a16a81
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/contour/SimpleContourPlot.kt
@@ -0,0 +1,52 @@
+package contour
+
+import space.kscience.dataforge.meta.asValue
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.contour
+import space.kscience.plotly.makeFile
+import kotlin.math.cos
+import kotlin.math.ln
+import kotlin.math.sin
+
+
+/**
+ * - simple contour plot
+ * - change colorscale
+ * - set x and y coordinates of the plot
+ */
+fun main() {
+ val size = 100
+ val x1 = mutableListOf()
+ val y1 = mutableListOf()
+ val z1 = mutableListOf>()
+
+ for (i in 0 until size) {
+ val elem = -2 * Math.PI + 4 * Math.PI * i / size
+ x1.add(elem)
+ y1.add(elem)
+ z1.add(MutableList(size) { 0.0 })
+ }
+
+ for (i in x1.indices) {
+ for (j in y1.indices) {
+ val r2 = x1[i] * x1[i] + y1[j] * y1[j]
+ z1[i][j] = sin(x1[i]) * cos(y1[j]) * sin(r2) / ln(r2 + 1)
+ }
+ }
+
+ val plot = Plotly.plot {
+ contour {
+ x.set(x1)
+ y.set(x1)
+ z.set(z1)
+ colorscale = "YlGnBu".asValue()
+ }
+
+ layout {
+ title = "Simple Contour Plot"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/customPage.kt b/plotly/examples/src/main/kotlin/customPage.kt
new file mode 100644
index 00000000..26ff5a50
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/customPage.kt
@@ -0,0 +1,43 @@
+import kotlinx.html.div
+import kotlinx.html.h1
+import kotlinx.html.hr
+import space.kscience.plotly.*
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.models.invoke
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.sin
+
+fun main() {
+
+ val x1 = (0..100).map { it.toDouble() / 100.0 }
+ val y1 = x1.map { sin(2.0 * PI * it) }
+ val y2 = x1.map { cos(2.0 * PI * it) }
+
+ val trace1 = Trace(x1, y1) { name = "sin" }
+ val trace2 = Trace(x1, y2) { name = "cos" }
+
+ Plotly.page { container ->
+ plot(renderer = container) {
+ traces(trace1, trace2)
+ layout {
+ title = "The plot above"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+ }
+ hr()
+ h1 { +"A custom separator" }
+ hr()
+ div {
+ plot {
+ traces(trace1, trace2)
+ layout {
+ title = "The plot below"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+ }
+ }
+ }.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/downloadChartAsSVG.kt b/plotly/examples/src/main/kotlin/downloadChartAsSVG.kt
new file mode 100644
index 00000000..bcd76d73
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/downloadChartAsSVG.kt
@@ -0,0 +1,36 @@
+import space.kscience.plotly.*
+import space.kscience.plotly.models.ScatterMode
+
+
+/**
+ * - Bubble chart with different marker sizes
+ * - Download plot as SVG using configuration button
+ */
+fun main() {
+ val fragment = Plotly.fragment {
+ val plotConfig = PlotlyConfig{
+ saveAsSvg()
+ }
+
+ plot(config = plotConfig) {
+ scatter {
+ x(1, 2, 3, 4)
+ y(10, 11, 12, 13)
+ text("A
size: 40", "B
size: 60", "C
size: 80", "D
size: 100")
+ mode = ScatterMode.markers
+ marker {
+ colors(listOf("rgb(93, 164, 214)", "rgb(255, 144, 14)", "rgb(44, 160, 101)", "rgb(255, 65, 54)"))
+ sizesList = listOf(40, 60, 80, 100)
+ }
+ }
+
+ layout {
+ title = "Download Chart as SVG instead of PNG"
+ showlegend = false
+ height = 600
+ width = 600
+ }
+ }
+ }
+ fragment.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/dynamicServer.kt b/plotly/examples/src/main/kotlin/dynamicServer.kt
new file mode 100644
index 00000000..0d374447
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/dynamicServer.kt
@@ -0,0 +1,84 @@
+import kotlinx.coroutines.*
+import kotlinx.html.a
+import kotlinx.html.h1
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.models.invoke
+import space.kscience.plotly.plot
+import space.kscience.plotly.server.close
+import space.kscience.plotly.server.pushUpdates
+import space.kscience.plotly.server.serve
+import space.kscience.plotly.server.show
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.sin
+
+
+@OptIn(DelicateCoroutinesApi::class)
+fun main() {
+
+ val freq = 1.0 / 1000
+ val oscillationFreq = 1.0 / 10000
+
+ val x = (0..100).map { it.toDouble() / 100.0 }
+ val sinY = x.map { sin(2.0 * PI * it) }
+ val cosY = x.map { cos(2.0 * PI * it) }
+
+ val sinTrace = Trace(x, sinY) { name = "sin" }
+ val cosTrace = Trace(x, cosY) { name = "cos" }
+
+ val server = Plotly.serve(port = 7878) {
+ embedData = true
+
+ //root level plots go to default page
+ page { plotly ->
+ h1 { +"This is the plot page" }
+ a("/other") { +"The other page" }
+ plot(renderer = plotly) {
+ traces(sinTrace, cosTrace)
+ layout {
+ title = "Other dynamic plot"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+ }
+ }
+
+ page("other") { plotly ->
+ h1 { +"This is the other plot page" }
+ a("/") { +"Back to the main page" }
+ plot(renderer = plotly) {
+ traces(sinTrace)
+ layout {
+ title = "Dynamic plot"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+ }
+ }
+ pushUpdates(50) // start sending updates via websocket to the front-end
+ }
+
+ server.show()
+
+ //Start pushing updates
+ GlobalScope.launch {
+ var time: Long = 0
+
+ while (isActive) {
+ delay(10)
+ time += 10
+ sinTrace.y.numbers = x.map { sin(2.0 * PI * (it + time.toDouble() * freq)) }
+ val cosAmp = cos(2.0 * PI * oscillationFreq * time)
+ cosTrace.y.numbers = x.map { cos(2.0 * PI * (it + time.toDouble() * freq)) * cosAmp }
+ }
+ }
+
+ println("Press Enter to close server")
+ while (readLine()?.trim() != "exit"){
+ //wait
+ }
+
+ server.close()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/embededFileExport.kt b/plotly/examples/src/main/kotlin/embededFileExport.kt
new file mode 100644
index 00000000..5e72482a
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/embededFileExport.kt
@@ -0,0 +1,32 @@
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.ResourceLocation
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.trace
+import kotlin.math.PI
+import kotlin.math.sin
+
+
+fun main() {
+ val x1 = (0..100).map { it.toDouble() / 100.0 }
+ val y1 = x1.map { sin(2.0 * PI * it) }
+
+ val plot = Plotly.plot {
+ trace {
+ x.set(x1)
+ y.set(y1)
+ name = "for a single trace in graph its name would be hidden"
+ }
+ layout {
+ title = "Graph name"
+ xaxis {
+ title = "x axis"
+ }
+ yaxis {
+ title = "y axis"
+ }
+ }
+ }
+
+ plot.makeFile(resourceLocation = ResourceLocation.EMBED)
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/errorPlots/AssymetricErrorBars.kt b/plotly/examples/src/main/kotlin/errorPlots/AssymetricErrorBars.kt
new file mode 100644
index 00000000..1ee63bd8
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/errorPlots/AssymetricErrorBars.kt
@@ -0,0 +1,74 @@
+package errorPlots
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ErrorType
+import space.kscience.plotly.models.TraceOrder
+import space.kscience.plotly.models.XAnchor
+import space.kscience.plotly.models.YAnchor
+import space.kscience.plotly.scatter
+
+/**
+ * - asymmetric error bars
+ * - use numeric array as error length
+ * - use only negative or positive errors
+ * - change legend position
+ * - change width of the legend border
+ * - change order of legend items
+ */
+fun main() {
+ val x1 = listOf(1, 2, 3, 4)
+ val y1 = listOf(2, 3, 5, 8)
+ val err = listOf(0.5, 0.75, 1.0, 1.25)
+
+ val plot = Plotly.plot {
+ scatter {
+ x.set(x1)
+ y.set(y1)
+ name = "both errors"
+ error_y {
+ type = ErrorType.data
+ array = err
+ visible = true
+ }
+ }
+
+ scatter {
+ x.set(x1)
+ y.set(y1.map { it + 4 }.toList())
+ name = "positive err"
+ error_y {
+ type = ErrorType.data
+ array = err
+ symmetric = false
+ visible = true
+ }
+ }
+
+ scatter {
+ x.set(x1)
+ y.set(y1.map { it + 8 }.toList())
+ name = "negative err"
+ error_y {
+ type = ErrorType.data
+ arrayminus = err
+ symmetric = false
+ visible = true
+ }
+ }
+
+ layout {
+ title = "Asymmetric Error Bars"
+ legend {
+ x = 0.05
+ borderwidth = 1
+ xanchor = XAnchor.left
+ yanchor = YAnchor.top
+ traceorder = TraceOrder.reversed
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/errorPlots/BarChartWithErrorBars.kt b/plotly/examples/src/main/kotlin/errorPlots/BarChartWithErrorBars.kt
new file mode 100644
index 00000000..0b140e6d
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/errorPlots/BarChartWithErrorBars.kt
@@ -0,0 +1,60 @@
+package errorPlots
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.bar
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.BarMode
+import space.kscience.plotly.models.ErrorType
+import space.kscience.plotly.models.XAnchor
+
+
+/**
+ * - bar chart with symmetrical error bars
+ * - use numeric array as error bars length
+ * - change color and width of legend border
+ */
+fun main() {
+ val x1 = listOf("Trial 1", "Trial 2", "Trial 3")
+ val y1 = listOf(3, 6, 4)
+ val y2 = listOf(4, 7, 3)
+
+
+ val plot = Plotly.plot {
+ bar {
+ x.set(x1)
+ y.set(y1)
+ name = "Experimental"
+ error_y {
+ type = ErrorType.data
+ array = listOf(1, 0.5, 1.5)
+ visible = true
+ }
+ }
+
+ bar {
+ x.set(x1)
+ y.set(y2)
+ name = "Control"
+ error_y {
+ type = ErrorType.data
+ array = listOf(1, 0.5, 1.5)
+ visible = true
+ }
+ }
+
+ layout {
+ barmode = BarMode.group
+ title = "Bar Chart with Error Bars"
+ legend {
+ x = 1
+ y = 1
+ bordercolor("black")
+ borderwidth = 1
+ xanchor = XAnchor.auto
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/errorPlots/BasicSymmetricErrorBars.kt b/plotly/examples/src/main/kotlin/errorPlots/BasicSymmetricErrorBars.kt
new file mode 100644
index 00000000..d41f3540
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/errorPlots/BasicSymmetricErrorBars.kt
@@ -0,0 +1,37 @@
+package errorPlots
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ErrorType
+import space.kscience.plotly.trace
+
+/**
+ * - basic symmetric error bars
+ * - use numeric array as error length
+ * - change color of error bars
+ */
+fun main() {
+ val xValues = listOf(0, 1, 2)
+ val yValues = listOf(6, 10, 2)
+ val err = listOf(1, 2, 3)
+
+ val plot = Plotly.plot {
+ trace {
+ x.numbers = xValues
+ y.numbers = yValues
+ error_y {
+ type = ErrorType.data
+ array = err
+ visible = true
+ color("orange")
+ }
+ }
+
+ layout {
+ title = "Basic Symmetric Error Bars"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/errorPlots/ColoredBoxPlot.kt b/plotly/examples/src/main/kotlin/errorPlots/ColoredBoxPlot.kt
new file mode 100644
index 00000000..791273c2
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/errorPlots/ColoredBoxPlot.kt
@@ -0,0 +1,44 @@
+package errorPlots
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.box
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.palettes.T10
+import java.util.*
+
+
+/**
+ * - basic box plot
+ * - change color of the boxes
+ * - use T10 as color palette
+ */
+fun main() {
+ val rnd = Random()
+ val y1 = List(50) { rnd.nextDouble() }
+ val y2 = List(50) { rnd.nextDouble() + 1 }
+
+ val plot = Plotly.plot {
+ box {
+ y.set(y1)
+ name = "Sample A"
+ marker {
+ color(T10.PINK)
+ }
+ }
+
+ box {
+ y.set(y2)
+ name = "Sample B"
+ marker {
+ color(T10.OLIVE)
+ }
+ }
+
+ layout {
+ title = "Colored Box Plot"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/errorPlots/FillLines.kt b/plotly/examples/src/main/kotlin/errorPlots/FillLines.kt
new file mode 100644
index 00000000..d9978cda
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/errorPlots/FillLines.kt
@@ -0,0 +1,112 @@
+package errorPlots
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.FillType
+import space.kscience.plotly.models.Scatter
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.models.Ticks
+
+
+/**
+ * - Scatter plot with filled error lines
+ * - Use rgb(a) color palette
+ * - Change colors of grid, paper background and line fills
+ */
+fun main() {
+ val trace1 = Scatter {
+ x(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
+ y(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
+ fill = FillType.tozerox
+ fillcolor("rgba(0, 100, 80, 0.2)")
+ line {
+ color("transparent")
+ }
+ name = "Fair"
+ showlegend = false
+ }
+
+ val trace2 = Scatter {
+ x(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
+ y(5.5, 3, 5.5, 8, 6, 3, 8, 5, 6, 5.5, 4.75, 5, 4, 7, 2, 4, 7, 4.4, 2, 4.5)
+ fill = FillType.tozerox
+ fillcolor("rgba(0, 176, 246, 0.2)")
+ line {
+ color("transparent")
+ }
+ name = "Premium"
+ showlegend = false
+ }
+
+ val trace3 = Scatter {
+ x(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
+ y(11, 9, 7, 5, 3, 1, 3, 5, 3, 1, -1, 1, 3, 1, -0.5, 1, 3, 5, 7, 9)
+ fill = FillType.tozerox
+ fillcolor("rgba(231, 107, 243, 0.2)")
+ line {
+ color("transparent")
+ }
+ name = "Fair"
+ showlegend = false
+ }
+
+ val trace4 = Scatter {
+ x(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+ y(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+ line {
+ color("rgb(0, 100, 80)")
+ }
+ mode = ScatterMode.lines
+ name = "Fair"
+ }
+
+ val trace5 = Scatter {
+ x(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+ y(5, 2.5, 5, 7.5, 5, 2.5, 7.5, 4.5, 5.5, 5)
+ line {
+ color("rgb(0, 176, 246)")
+ }
+ mode = ScatterMode.lines
+ name = "Premium"
+ }
+
+ val trace6 = Scatter {
+ x(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+ y(10, 8, 6, 4, 2, 0, 2, 4, 2, 0)
+ line {
+ color("rgb(231, 107, 243)")
+ }
+ mode = ScatterMode.lines
+ name = "Ideal"
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2, trace3, trace4, trace5, trace6)
+
+ layout {
+ paper_bgcolor("rgb(255, 255, 255)")
+ plot_bgcolor("rgb(229, 229, 229)")
+ xaxis {
+ gridcolor("rgb(255, 255, 255)")
+ range(1.0..10.0)
+ showgrid = true
+ showline = false
+ showticklabels = true
+ tickcolor("rgb(127, 127, 127)")
+ ticks = Ticks.outside
+ zeroline = false
+ }
+ yaxis {
+ gridcolor("rgb(255, 255, 255)")
+ showgrid = true
+ showline = false
+ showticklabels = true
+ tickcolor("rgb(127, 127, 127)")
+ ticks = Ticks.outside
+ zeroline = false
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/errorPlots/RandomDataErrorsX.kt b/plotly/examples/src/main/kotlin/errorPlots/RandomDataErrorsX.kt
new file mode 100644
index 00000000..59599e35
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/errorPlots/RandomDataErrorsX.kt
@@ -0,0 +1,38 @@
+package errorPlots
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.palettes.Xkcd
+import space.kscience.plotly.trace
+import java.util.*
+
+
+/**
+ * - simple scatter with random length of horizontal error bars
+ * - change error bars color
+ * - use XKCD as color palette
+ */
+fun main() {
+ val rnd = Random()
+ val xValues = (0..100 step 4).toList().map { it / 20.0 }
+ val err = List(26) { rnd.nextDouble() / 2 }
+
+ val plot = Plotly.plot {
+ trace {
+ x.numbers = xValues
+ marker {
+ color(Xkcd.PURPLE)
+ }
+ error_x {
+ array = err
+ color(Xkcd.PALE_PURPLE)
+ }
+ }
+ layout {
+ title = "Random Data Error"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/functionTraces.kt b/plotly/examples/src/main/kotlin/functionTraces.kt
new file mode 100644
index 00000000..45efb806
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/functionTraces.kt
@@ -0,0 +1,35 @@
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.UnstablePlotlyAPI
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.functionXY
+import space.kscience.plotly.trace
+import kotlin.math.PI
+import kotlin.math.sin
+
+@OptIn(UnstablePlotlyAPI::class)
+fun main() {
+ val plot = Plotly.plot {
+ repeat(50) { phase ->
+ trace {
+ functionXY(0.0..2 * PI, step = 0.05) {
+ sin(it + phase * 2 * PI / 60)
+ }
+ name = "Sin with phase offset ${phase * 2 * PI / 60}"
+ }
+ }
+
+ layout {
+ title = "Graph name"
+ xaxis {
+ title = "x axis"
+ }
+ yaxis {
+ title = "y axis"
+ }
+ height = 700
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/geo/choropleth.kt b/plotly/examples/src/main/kotlin/geo/choropleth.kt
new file mode 100644
index 00000000..8648e2d2
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/geo/choropleth.kt
@@ -0,0 +1,42 @@
+package geo
+
+import io.invoke
+import org.jetbrains.kotlinx.dataframe.DataFrame
+import org.jetbrains.kotlinx.dataframe.io.readCSV
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.geo.GeoScope
+import space.kscience.plotly.models.geo.LocationMode
+import space.kscience.plotly.models.geo.choropleth
+import space.kscience.plotly.models.geo.geo
+
+private val df = DataFrame.readCSV("https://raw.githubusercontent.com/plotly/datasets/master/2014_usa_states.csv")
+
+//https://plotly.com/javascript/choropleth-maps/#choropleth-map-of-2014-us-population-by-state
+fun main() {
+ val plot = Plotly.plot {
+ choropleth {
+ locationmode = LocationMode.`USA-states`
+ text(df["State"])
+ locations(df["Postal"])
+ z(df["Population"])
+ }
+
+ layout {
+ title = "2014 US Popultaion by State"
+ geo{
+ scope = GeoScope.usa
+ countrycolor(255,255,255)
+ landcolor(217, 217, 217)
+ showland = true
+ lakecolor(255, 255, 255)
+ showlakes = true
+ subunitcolor(255,255,255)
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/geo/dynamicMap.kt b/plotly/examples/src/main/kotlin/geo/dynamicMap.kt
new file mode 100644
index 00000000..d3151cf6
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/geo/dynamicMap.kt
@@ -0,0 +1,76 @@
+package geo
+
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.isActive
+import kotlinx.coroutines.launch
+import kotlinx.serialization.json.int
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.models.geo.LocationMode
+import space.kscience.plotly.models.geo.choroplethMapBox
+import space.kscience.plotly.models.geo.json.GeoJsonFeatureCollection
+import space.kscience.plotly.models.geo.json.combine
+import space.kscience.plotly.models.geo.openStreetMap
+import space.kscience.plotly.server.close
+import space.kscience.plotly.server.plot
+import space.kscience.plotly.server.serve
+import java.net.URL
+import kotlin.random.Random
+
+fun main() {
+
+ //downloading GeoJson
+ val geoJsonString =
+ URL("https://raw.githubusercontent.com/isellsoap/deutschlandGeoJSON/main/4_kreise/4_niedrig.geo.json").readText()
+
+
+ // Filtering GeoJson features and creating new feature set
+ val features = GeoJsonFeatureCollection.parse(geoJsonString).filter {
+ it.getString("NAME_1") == "Sachsen"
+ }.combine()
+
+ val server = Plotly.serve {
+ plot {
+ choroplethMapBox {
+ geoJsonFeatures(features)
+ //Switch to geojson-id mode
+ locationmode = LocationMode.`geojson-id`
+
+ //Setup the background map
+ openStreetMap {
+ center {
+ lat = 51.05
+ lon = 13.73
+ }
+ zoom = 7.0
+ } // Set hover text to region names
+ text.strings = features.map { it.getString("NAME_3")!! }
+ // Set displayed locations
+ locations.numbers = features.map { it.id!!.int }
+ // Set random values to locations
+ z.numbers = features.map { Random.nextDouble(1.0, 10.0) }
+ launch {
+ while (isActive) {
+ delay(300)
+ z.numbers = features.map { Random.nextDouble(1.0, 10.0) }
+ }
+ }
+ }
+
+ layout {
+ title = "Geojson demo"
+ height = 800
+ }
+ embedData = true
+ }
+ }
+
+
+ println("Press Enter to close server")
+ while (readLine()?.trim() != "exit") {
+ //wait
+ }
+
+ server.close()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/geo/saxony.kt b/plotly/examples/src/main/kotlin/geo/saxony.kt
new file mode 100644
index 00000000..55c18770
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/geo/saxony.kt
@@ -0,0 +1,61 @@
+package geo
+
+import kotlinx.serialization.json.int
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.geo.LocationMode
+import space.kscience.plotly.models.geo.choroplethMapBox
+import space.kscience.plotly.models.geo.json.GeoJsonFeatureCollection
+import space.kscience.plotly.models.geo.json.combine
+import space.kscience.plotly.models.geo.openStreetMap
+import java.net.URL
+import kotlin.random.Random
+
+
+fun main() {
+
+ //downloading GeoJson
+ val geoJsonString =
+ URL("https://raw.githubusercontent.com/isellsoap/deutschlandGeoJSON/main/4_kreise/4_niedrig.geo.json").readText()
+
+
+ // Filtering GeoJson features and creating new feature set
+ val features = GeoJsonFeatureCollection.parse(geoJsonString).filter {
+ it.getString("NAME_1") == "Sachsen"
+ }.combine()
+
+ val plot = Plotly.plot {
+ choroplethMapBox {
+// Use this for remote-loaded feature set
+// geojsonUrl =
+// "https://raw.githubusercontent.com/isellsoap/deutschlandGeoJSON/main/4_kreise/4_niedrig.geo.json"
+ //load local in-memory feature set and switch to
+ geoJsonFeatures(features)
+ //Switch to geojson-id mode
+ locationmode = LocationMode.`geojson-id`
+ // Set hover text to region names
+ text.strings = features.map { it.getString("NAME_3")!! }
+ // Set displayed locations
+ locations.numbers = features.map { it.id!!.int }
+ // Set random values to locations
+ z.numbers = features.map { Random.nextDouble(1.0, 10.0) }
+ }
+
+ layout {
+ title = "Geojson demo"
+ height = 800
+ }
+
+ // Setup the background map
+ openStreetMap {
+ center {
+ lat = 51.05
+ lon = 13.73
+ }
+ zoom = 7.0
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/geo/scattermapbox.kt b/plotly/examples/src/main/kotlin/geo/scattermapbox.kt
new file mode 100644
index 00000000..9cd7b5dc
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/geo/scattermapbox.kt
@@ -0,0 +1,47 @@
+package geo
+
+import io.invoke
+import org.jetbrains.kotlinx.dataframe.DataFrame
+import org.jetbrains.kotlinx.dataframe.io.readCSV
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.DragMode
+import space.kscience.plotly.models.geo.mapbox
+import space.kscience.plotly.models.geo.scattermapbox
+import space.kscience.plotly.models.geo.useOpenStreetMap
+
+private val df = DataFrame.readCSV(
+ "https://raw.githubusercontent.com/plotly/datasets/master/2015_06_30_precipitation.csv"
+)
+
+//https://plotly.com/javascript/mapbox-layers/#openstreetmap-tiles-no-token-needed
+fun main() {
+ val plot = Plotly.plot {
+ scattermapbox {
+ text(df["Globvalue"])
+ lon(df["Lon"])
+ lat(df["Lat"])
+ marker {
+ color("fuchsia")
+ size = 4
+ }
+ }
+
+ layout {
+ title = "OpenStreetMap with markers"
+ dragmode = DragMode.zoom
+ //margin { r = 0; t= 0; b= 0; l= 0 }
+ mapbox {
+ useOpenStreetMap()
+ center {
+ lat = 38
+ lon = -90
+ }
+ zoom = 3.0
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/gridPageLayout.kt b/plotly/examples/src/main/kotlin/gridPageLayout.kt
new file mode 100644
index 00000000..d87a8409
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/gridPageLayout.kt
@@ -0,0 +1,129 @@
+import kotlinx.html.div
+import space.kscience.plotly.*
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.models.invoke
+import space.kscience.plotly.palettes.T10
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.sin
+
+
+private class PlotGrid {
+ public data class PlotCell(val id: String, val plot: Plot, val row: Int, val col: Int, val width: Int = 1)
+
+ private val cells = HashMap()
+
+ /**
+ * @return Columns in ascending order, grouped by rows in ascending order.
+ * */
+ public val grid: List>
+ get() = cells.values.groupBy { it.row }.toSortedMap().values.map {
+ it.sortedBy { cell -> cell.col }
+ }.toList()
+
+ public operator fun get(id: String): PlotCell? = cells[id]
+
+ private var currentRow = 0
+ private var currentCol = 0
+
+ public fun plot(
+ plot: Plot,
+ id: String = plot.toString(),
+ width: Int = 6,
+ row: Int? = null,
+ col: Int? = null,
+ ): Plot {
+ val actualRow = if (row != null) {
+ row
+ } else {
+ currentCol = 0
+ currentRow++
+ }
+
+ val actualColumn = col ?: currentCol++
+
+ cells[id] = PlotCell(id, plot, actualRow, actualColumn, width)
+
+ return plot
+ }
+
+ public fun plot(
+ row: Int? = null,
+ col: Int? = null,
+ id: String? = null,
+ width: Int = 6,
+ block: Plot.() -> Unit,
+ ): Plot {
+ val plot = Plotly.plot(block)
+ return plot(plot, id ?: plot.toString(), width, row, col)
+ }
+}
+
+
+private fun Plotly.grid(block: PlotGrid.() -> Unit): PlotlyPage {
+ val grid = PlotGrid().apply(block)
+ return page(cdnBootstrap, cdnPlotlyHeader) { container ->
+ div("col") {
+ grid.grid.forEach { row ->
+ div("row") {
+ row.forEach { cell ->
+ div("col-${cell.width}") {
+ plot(cell.plot, cell.id, renderer = container)
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+fun main() {
+
+ val x = (0..100).map { it.toDouble() / 100.0 }
+ val y1 = x.map { sin(2.0 * PI * it) }
+ val y2 = x.map { cos(2.0 * PI * it) }
+
+ val trace1 = Trace(x, y1) {
+ name = "sin"
+ marker.color(T10.BLUE)
+
+ }
+
+ val trace2 = Trace(x, y2) {
+ name = "cos"
+ marker.color(T10.ORANGE)
+
+ }
+
+ val plot = Plotly.grid {
+// title = "Page sample"
+ plot(row = 1, width = 8) {
+ traces(trace1, trace2)
+ layout {
+ title = "First graph, row: 1, size: 8/12"
+ xaxis.title = "x axis name"
+ xaxis.title = "y axis name"
+ }
+ }
+
+ plot(row = 1, width = 4) {
+ traces(trace1, trace2)
+ layout {
+ title = "Second graph, row: 1, size: 4/12"
+ xaxis.title = "x axis name"
+ xaxis.title = "y axis name"
+ }
+ }
+
+ plot(row = 2, width = 12) {
+ traces(trace1, trace2)
+ layout {
+ title = "Third graph, row: 2, size: 12/12"
+ xaxis.title = "x axis name"
+ xaxis.title = "y axis name"
+ }
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/heatmap/AnnotatedHeatmap.kt b/plotly/examples/src/main/kotlin/heatmap/AnnotatedHeatmap.kt
new file mode 100644
index 00000000..2f279540
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/heatmap/AnnotatedHeatmap.kt
@@ -0,0 +1,75 @@
+package heatmap
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.heatmap
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Font
+import space.kscience.plotly.models.Text
+import kotlin.math.cos
+import kotlin.math.pow
+import kotlin.math.sin
+
+/**
+ * - Heatmap with annotations
+ * - Change font color and size of annotations text
+ * - Remove annotations arrows
+ * - Change colorscale and size of plot
+ */
+fun main() {
+ val x1 = (5..25).map { it.toDouble() / 5 }
+ val y1 = (5..25).map { it.toDouble() / 5 }
+ val z1 = mutableListOf>()
+
+ for (i in y1.indices) {
+ z1.add(MutableList(x1.size) { 0.0 })
+ }
+
+ val annotationsList = mutableListOf()
+
+ for (i in y1.indices) {
+ for (j in x1.indices) {
+ z1[i][j] = sin(x1[i]).pow(10) + cos(10 + y1[j] * x1[i]) * cos(x1[i])
+ val annotation = Text()
+ annotation.x = Value.of(x1[j])
+ annotation.y = Value.of(y1[i])
+ annotation.text = z1[i][j].toString().substring(0..4)
+
+ val annotationsFont = Font()
+ annotationsFont.size = 16
+ if (z1[i][j] > 0) {
+ annotationsFont.color("black")
+ } else {
+ annotationsFont.color("white")
+ }
+ annotation.font = annotationsFont
+ annotation.showarrow = false
+ annotationsList.add(annotation)
+ }
+ }
+
+ val plot = Plotly.plot {
+ heatmap {
+ x.set(x1)
+ y.set(y1)
+ z.set(z1)
+ colorscale = Value.of("Viridis")
+ }
+
+ layout {
+ height = 800
+ width = 1400
+ xaxis {
+ tickcolor("white")
+ }
+ yaxis {
+ tickcolor("white")
+ }
+ annotations = annotationsList
+ title = "Heatmap with Annotations"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/heatmap/AxisTitles.kt b/plotly/examples/src/main/kotlin/heatmap/AxisTitles.kt
new file mode 100644
index 00000000..c9fb6aa0
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/heatmap/AxisTitles.kt
@@ -0,0 +1,55 @@
+package heatmap
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.heatmap
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.palettes.Xkcd
+
+
+/**
+ * - Heatmap with custom colorscale
+ * - Add axis label
+ * - Use XKCD color palette
+ * - Change size of the plot
+ */
+fun main() {
+ val months = listOf("January", "February", "March", "April", "May", "June", "July", "August",
+ "September", "October", "November", "December")
+ val years = 1949..1961
+ val flights = listOf(
+ listOf(112, 115, 145, 171, 196, 204, 242, 284, 315, 340, 360, 417), /* January */
+ listOf(118, 126, 150, 180, 196, 188, 233, 277, 301, 318, 342, 391), /* February */
+ listOf(132, 141, 178, 193, 236, 235, 267, 317, 356, 362, 406, 419), /* March */
+ listOf(129, 135, 163, 181, 235, 227, 269, 313, 348, 348, 396, 461), /* April */
+ listOf(121, 125, 172, 183, 229, 234, 270, 318, 355, 363, 420, 472), /* May */
+ listOf(135, 149, 178, 218, 243, 264, 315, 374, 422, 435, 472, 535), /* June */
+ listOf(148, 170, 199, 230, 264, 302, 364, 413, 465, 491, 548, 622), /* July */
+ listOf(148, 170, 199, 242, 272, 293, 347, 405, 467, 505, 559, 606), /* August */
+ listOf(136, 158, 184, 209, 237, 259, 312, 355, 404, 404, 463, 508), /* September */
+ listOf(119, 133, 162, 191, 211, 229, 274, 306, 347, 359, 407, 461), /* October */
+ listOf(104, 114, 146, 172, 180, 203, 237, 271, 305, 310, 362, 390), /* November */
+ listOf(118, 140, 166, 194, 201, 229, 278, 306, 336, 337, 405, 432) /* December */)
+ val customColorscale = listOf(listOf(0, Xkcd.POWDER_BLUE), listOf(1, Xkcd.PURPLE))
+
+ val plot = Plotly.plot {
+ heatmap {
+ x.set(years)
+ y.set(months)
+ z.set(flights)
+ colorscale = Value.of(customColorscale)
+ }
+
+ layout {
+ width = 900
+ height = 900
+ xaxis {
+ title = "Years"
+ }
+ title = "Heatmap of Flight Density from 1949 to 1961"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/heatmap/BasicHeatmap.kt b/plotly/examples/src/main/kotlin/heatmap/BasicHeatmap.kt
new file mode 100644
index 00000000..5e8863c1
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/heatmap/BasicHeatmap.kt
@@ -0,0 +1,34 @@
+package heatmap
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.heatmap
+import space.kscience.plotly.makeFile
+
+
+/**
+ * - basic heatmap from 1 to 25
+ * - change heatmap colorscale
+ * - use 2D array as z
+ */
+fun main() {
+ val x1 = listOf(1, 2, 3, 4, 5)
+ val y1 = listOf(6, 7, 8, 9, 10)
+ val z1 = (1..25).chunked(5)
+
+ val plot = Plotly.plot {
+ heatmap {
+ x.set(x1)
+ y.set(y1)
+ z.set(z1)
+ colorscale = Value.of("Reds")
+ }
+
+ layout {
+ title = "Red Heatmap"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/heatmap/CategoricalAxisLabels.kt b/plotly/examples/src/main/kotlin/heatmap/CategoricalAxisLabels.kt
new file mode 100644
index 00000000..1b0038e3
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/heatmap/CategoricalAxisLabels.kt
@@ -0,0 +1,49 @@
+package heatmap
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.heatmap
+import space.kscience.plotly.makeFile
+
+
+/**
+ * - Annotated heatmap with categorical labels
+ * - change size of labels font
+ * - rotate axis labels
+ */
+fun main() {
+ val x1 = listOf("Monday", "Tuesday", "Wednesday", "Thursday", "Friday")
+ val y1 = listOf("Morning", "Afternoon", "Evening")
+ val z1 = listOf(
+ listOf(1, null, 30, 50, 1),
+ listOf(20, 1, 60, 80, 30),
+ listOf(30, 60, 1, -10, 20))
+
+ val plot = Plotly.plot {
+ heatmap {
+ x.set(x1)
+ y.set(y1)
+ z.set(z1)
+ }
+
+ layout {
+ xaxis {
+ tickfont {
+ size = 16
+ }
+ }
+ yaxis {
+ tickangle = -90
+ tickfont {
+ size = 16
+ }
+ }
+ title {
+ text = "Heatmap with Categorical Axis Labels"
+ font { size = 20 }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/heatmap/ConnectNullGaps.kt b/plotly/examples/src/main/kotlin/heatmap/ConnectNullGaps.kt
new file mode 100644
index 00000000..1db08e32
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/heatmap/ConnectNullGaps.kt
@@ -0,0 +1,59 @@
+package heatmap
+
+import space.kscience.plotly.*
+import space.kscience.plotly.models.Heatmap
+
+
+/**
+ * - heatmaps with and without gaps between not-null values
+ * - change plot size
+ * - stack two plots
+ */
+fun main() {
+ val x1 = (0..7)
+ val y2 = (0..6)
+
+ val z1 = listOf(
+ listOf(null, null, null, 12, 13, 14, 15, 16),
+ listOf(null, 1, null, 11, null, null, null, 17),
+ listOf(null, 2, 6, 7, null, null, null, 18),
+ listOf(null, 3, null, 8, null, null, null, 19),
+ listOf(5, 4, 10, 9, null, null, null, 20),
+ listOf(null, null, null, 27, null, null, null, 21),
+ listOf(null, null, null, 26, 25, 24, 23, 22))
+
+ val heatmap1 = Heatmap {
+ x.set(x1)
+ y.set(y2)
+ z.set(z1)
+ showscale = false
+ }
+
+ val heatmap2 = Heatmap {
+ x.set(x1)
+ y.set(y2)
+ z.set(z1)
+ showscale = false
+ connectgaps = true
+ }
+
+ Plotly.fragment {
+ plot {
+ traces(heatmap1)
+ layout {
+ width = 800
+ height = 450
+ title = "Gaps Between Nulls"
+ }
+ }
+
+ plot {
+ traces(heatmap2)
+ layout {
+ width = 800
+ height = 450
+ title = "Connected Gaps"
+ }
+ }
+ }.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/heatmap/CustomColorscale.kt b/plotly/examples/src/main/kotlin/heatmap/CustomColorscale.kt
new file mode 100644
index 00000000..e2e953e2
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/heatmap/CustomColorscale.kt
@@ -0,0 +1,71 @@
+package heatmap
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.heatmap
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Font
+import space.kscience.plotly.models.Text
+
+/**
+ * - Simple heatmap with annotations
+ * - Change annotation font color anf size
+ * - Use custom colorscale
+ */
+fun main() {
+ val x1 = listOf("Monday", "Wednesday", "Friday", "Sunday")
+ val y1 = listOf("June", "July", "August")
+ val z1 = listOf(
+ listOf(.1, .3, .5, .7),
+ listOf(1.0, .8, .6, .4),
+ listOf(.6, .4, .2, 0.0),
+ listOf(.9, .7, .5, .3))
+ val customColorscale = listOf(listOf(0, "navy"), listOf(1, "plum"))
+
+ val annotationsList = mutableListOf()
+ val annotationFont = Font()
+ annotationFont.color("white")
+ annotationFont.size = 16
+ for (i in y1.indices) {
+ for (j in x1.indices) {
+ val curAnnotation = Text()
+ curAnnotation.font = annotationFont
+ curAnnotation.x = Value.of(x1[j])
+ curAnnotation.y = Value.of(y1[i])
+ curAnnotation.text = z1[i][j].toString()
+ curAnnotation.showarrow = false
+ annotationsList.add(curAnnotation)
+ }
+ }
+
+ val plot = Plotly.plot {
+ heatmap {
+ x.set(x1)
+ y.set(y1)
+ z(z1)
+
+ colorscale = Value.of(customColorscale)
+ colorbar {
+ tickfont { size = 16 }
+ }
+ }
+
+ layout {
+ xaxis {
+ tickfont { size = 16 }
+ }
+ yaxis {
+ tickfont { size = 16 }
+ tickangle = -45
+ }
+ annotations = annotationsList
+ title {
+ text = "Heatmap with Custom Colorscale"
+ font { size = 20 }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/2DContourHistogram.kt b/plotly/examples/src/main/kotlin/histogram/2DContourHistogram.kt
new file mode 100644
index 00000000..19f103c8
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/2DContourHistogram.kt
@@ -0,0 +1,51 @@
+package histogram
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ContoursColoring
+import space.kscience.plotly.models.Histogram2DContour
+import space.kscience.plotly.models.MeasureMode
+
+
+/**
+ * - 2D contour histogram of a bivariate distribution
+ * - change histogram colorscale
+ * - change colorbar thickness and thickness mode
+ * - change width of the colorbar border
+ * - change contours coloring
+ */
+fun main() {
+ val x1 = mutableListOf()
+ val y1 = mutableListOf()
+
+ for (i in 0 until 500) {
+ x1.add(Math.random())
+ y1.add(Math.random())
+ }
+
+ val trace = Histogram2DContour {
+ x.set(x1)
+ y.set(y1)
+ colorscale = Value.of("Greens")
+ contours {
+ coloring = ContoursColoring.heatmap
+ }
+ colorbar {
+ borderwidth = 0
+ thicknessmode = MeasureMode.fraction
+ thickness = 0.05
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace)
+
+ layout {
+ title = "2D Contour Histogram of a Bivariate Normal Distribution"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/BasicHistogram.kt b/plotly/examples/src/main/kotlin/histogram/BasicHistogram.kt
new file mode 100644
index 00000000..a64f0d5a
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/BasicHistogram.kt
@@ -0,0 +1,55 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.histogram
+import space.kscience.plotly.makeFile
+import java.util.*
+
+
+/**
+ * - basic histogram
+ * - change size of gap between bins
+ * - change font color and size of title
+ * - change font size of axis title
+ */
+fun main() {
+ val rnd = Random()
+ val values = List(500) { rnd.nextDouble() }
+
+ val plot = Plotly.plot {
+ histogram {
+ x.numbers = values
+ name = "Random data"
+ }
+
+ layout {
+ bargap = 0.1
+ title {
+ text = "Basic Histogram"
+ font {
+ size = 20
+ color("black")
+ }
+ }
+ xaxis {
+ title {
+ text = "Value"
+ font {
+ size = 16
+ }
+ }
+ }
+ yaxis {
+ title {
+ text = "Count"
+ font {
+ size = 16
+ }
+ }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/ColoredAndStyledHistogram.kt b/plotly/examples/src/main/kotlin/histogram/ColoredAndStyledHistogram.kt
new file mode 100644
index 00000000..16390ce2
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/ColoredAndStyledHistogram.kt
@@ -0,0 +1,75 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.*
+import java.util.*
+
+/**
+ * - overlaying histograms
+ * - use RGBA as color palette
+ * - change bargap, bargroupgap, barmode parameters
+ */
+fun main() {
+ val rnd = Random()
+ val k = List(500) { rnd.nextDouble() }
+
+ val trace1 = Histogram {
+ x.numbers = k.map { it * 5 }
+ y.numbers = k.map { it }
+ name = "control"
+ histfunc = HistFunc.count
+ marker {
+ color(255, 50, 102, 0.7)
+ }
+ opacity = 0.5
+ xbins {
+ end = 2.8
+ start = 0.5
+ size = 0.06
+ }
+ }
+
+ val trace2 = Histogram {
+ x.numbers = k.map { it * 10 }
+ y.numbers = k.map { it*2 }
+ name = "experimental"
+ marker {
+ color(0, 100, 255, 0.7)
+ }
+ opacity = 0.75
+ xbins {
+ end = 4.0
+ start = -3.2
+ size = 0.06
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+ layout {
+ width = 900
+ height = 500
+ bargap = 0.05
+ bargroupgap = 0.2
+ barmode = BarMode.overlay
+ title = "Sampled Results"
+ xaxis {
+ title = "Value"
+ }
+ yaxis {
+ title = "Count"
+ }
+ legend {
+ x = 1
+ y = 1
+ xanchor = XAnchor.auto
+ bgcolor("#E2E2E2")
+ traceorder = TraceOrder.normal
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/CumulativeHistogram.kt b/plotly/examples/src/main/kotlin/histogram/CumulativeHistogram.kt
new file mode 100644
index 00000000..5fd8d558
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/CumulativeHistogram.kt
@@ -0,0 +1,45 @@
+package histogram
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.histogram
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.palettes.T10
+import java.util.*
+
+
+/**
+ * - cumulative histogram
+ * - use Tableau10 as color palette
+ */
+fun main() {
+ val rnd = Random()
+ val values = List(500) { rnd.nextDouble() }
+
+ val plot = Plotly.plot {
+ histogram {
+ x.numbers = values
+ name = "Random data"
+
+ cumulative {
+ enabled = true
+ }
+
+ marker {
+ color(T10.CYAN)
+ }
+ }
+
+ layout {
+ title = "Cumulative Histogram"
+ xaxis {
+ title = "Value"
+ }
+ yaxis {
+ title = "Sum of probabilities"
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/HorizontalHistogram.kt b/plotly/examples/src/main/kotlin/histogram/HorizontalHistogram.kt
new file mode 100644
index 00000000..7134a052
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/HorizontalHistogram.kt
@@ -0,0 +1,46 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.histogram
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.palettes.T10
+
+
+/**
+ * - horizontal histogram: count entries of each value
+ * ([1, 2, 2, 3, 2, 1, 4, 4] -> [1: 2, 2: 3, 3: 1, 4: 2])
+ * - use T10 as color palette (default color circle)
+ * - use color array
+ * - white ticks as space between axis and labels
+ * - change ticklen, tickcolor parameters
+ */
+fun main() {
+ val values = listOf(1, 2, 2, 3, 2, 1, 4, 4)
+ val colors = listOf(T10.RED, T10.GREEN, T10.ORANGE, T10.BLUE)
+
+ val plot = Plotly.plot {
+ histogram {
+ name = "Random data"
+ y.set(values)
+ marker {
+ colors(colors)
+ }
+ }
+
+ layout {
+ title = "Horizontal Histogram"
+ bargap = 0.1
+ xaxis {
+ title = "Count"
+ }
+ yaxis {
+ title = "Value"
+ ticklen = 3
+ tickcolor("#FFF")
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/NormalizedHistogram.kt b/plotly/examples/src/main/kotlin/histogram/NormalizedHistogram.kt
new file mode 100644
index 00000000..f400b640
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/NormalizedHistogram.kt
@@ -0,0 +1,47 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.histogram
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.HistNorm
+import space.kscience.plotly.palettes.Xkcd
+import kotlin.random.Random
+
+/**
+ * - normalized histogram: the counts normalized to form a probability density,
+ * i.e., the area (or integral) under the histogram will sum to 1.
+ * - change size of gap between bins
+ * - change font size of tick labels
+ */
+fun main() {
+ val x1 = List(500) { Random.nextDouble() }
+
+ val plot = Plotly.plot {
+ histogram {
+ x.numbers = x1
+ name = "Random data"
+ histnorm = HistNorm.probability
+ marker {
+ color(Xkcd.BLUE_GREEN)
+ }
+ }
+
+ layout {
+ title = "Normalized Histogram"
+ bargap = 0.1
+ xaxis {
+ tickfont {
+ size = 16
+ }
+ }
+ yaxis {
+ tickfont {
+ size = 16
+ }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/OverlaidHistogram.kt b/plotly/examples/src/main/kotlin/histogram/OverlaidHistogram.kt
new file mode 100644
index 00000000..8b7dfecb
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/OverlaidHistogram.kt
@@ -0,0 +1,55 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.BarMode
+import space.kscience.plotly.models.Histogram
+import space.kscience.plotly.palettes.T10
+import java.util.*
+
+/**
+ * - overlaying histograms
+ * - use T10 as color palette
+ * - change legend font size and color
+ */
+fun main() {
+ val rnd = Random()
+ val k = List(500) { rnd.nextDouble() }
+ val x1 = k.map { it + 1 }.toList()
+ val x2 = k.map { it + 1.1 }.toList()
+
+ val trace1 = Histogram {
+ x.set(x1)
+ opacity = 0.5
+ marker {
+ color(T10.BLUE)
+ }
+ }
+
+ val trace2 = Histogram {
+ x.set(x2)
+ opacity = 0.6
+ marker {
+ color(T10.PINK)
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+ layout {
+ title = "Overlaid Histogram"
+ barmode = BarMode.overlay
+ bargap = 0.1
+
+ legend {
+ font {
+ size = 16
+ color("black")
+ }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/SpecifyBinningHistogram.kt b/plotly/examples/src/main/kotlin/histogram/SpecifyBinningHistogram.kt
new file mode 100644
index 00000000..05fbe570
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/SpecifyBinningHistogram.kt
@@ -0,0 +1,48 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.histogram
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.HistFunc
+import space.kscience.plotly.models.XAnchor
+
+
+/**
+ * - defferent binning functions
+ * - default color cycle
+ * - change legend border width
+ */
+fun main() {
+ val categories = listOf("Apples", "Apples", "Apples", "Oranges", "Bananas")
+ val values = listOf("5", "10", "3", "10", "5")
+
+ val plot = Plotly.plot {
+ histogram {
+ name = "count"
+ x.strings = categories
+ y.strings = values
+ histfunc = HistFunc.count
+ }
+
+ histogram {
+ name = "sum"
+ x.strings = categories
+ y.strings = values
+ histfunc = HistFunc.sum
+ }
+
+ layout {
+ width = 750
+ title = "Specify Binning Function"
+ legend {
+ x = 1
+ y = 1
+ xanchor = XAnchor.auto
+ borderwidth = 1
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/histogram/StackedHistogram.kt b/plotly/examples/src/main/kotlin/histogram/StackedHistogram.kt
new file mode 100644
index 00000000..22c6fb09
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/histogram/StackedHistogram.kt
@@ -0,0 +1,42 @@
+package histogram
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.BarMode
+import space.kscience.plotly.models.Histogram
+import java.util.*
+
+
+fun main() {
+ val rnd = Random()
+ val k = List(500) { rnd.nextDouble() }
+ val x1 = k.map { it }.toList()
+ val x2 = k.map { it / 2 }.toList()
+
+ val trace1 = Histogram {
+ x.set(x1)
+ opacity = 0.5
+ marker {
+ color("green")
+ }
+ }
+
+ val trace2 = Histogram {
+ x.set(x2)
+ opacity = 0.5
+ marker {
+ color("orange")
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+ layout {
+ title = "Stacked Histogram"
+ barmode = BarMode.stack
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/io/ioUtils.kt b/plotly/examples/src/main/kotlin/io/ioUtils.kt
new file mode 100644
index 00000000..b84059a1
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/io/ioUtils.kt
@@ -0,0 +1,30 @@
+package io
+
+
+import org.jetbrains.kotlinx.dataframe.AnyCol
+import org.jetbrains.kotlinx.dataframe.AnyFrame
+import org.jetbrains.kotlinx.dataframe.DataFrame
+import org.jetbrains.kotlinx.dataframe.io.readCSV
+import space.kscience.dataforge.meta.Value
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.models.TraceValues
+
+fun readResourceAsString(resource: String): String =
+ Plotly.javaClass.getResourceAsStream(resource)?.readAllBytes()?.decodeToString()
+ ?: error("Resource $resource not found")
+
+fun readResourceAsCsv(resource: String): AnyFrame =
+ DataFrame.readCSV(Plotly.javaClass.getResource(resource)?.file?.toString() ?: error("Resource $resource not found"))
+
+/**
+ * Extension function for using krangl data columns as axis values
+ */
+operator fun TraceValues.invoke(column: AnyCol) {
+ set(column.values())
+}
+
+fun TraceValues.fromDataFrame(frame: AnyFrame, column: String) {
+ invoke(frame[column])
+}
+
+fun AnyCol.dfValues(): List = values().map { Value.of(it) }
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/io/loadFromResource.kt b/plotly/examples/src/main/kotlin/io/loadFromResource.kt
new file mode 100644
index 00000000..ef883606
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/io/loadFromResource.kt
@@ -0,0 +1,30 @@
+package io
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.scatter
+
+
+fun main() {
+ val resource = readResourceAsString("/simpleData.txt")
+
+ val data = resource.lines().map { it.split(" ").map { it.toInt() } }
+
+ val plot = Plotly.plot {
+ scatter {
+ x.numbers = data[0]
+ y.numbers = data[1]
+ mode = ScatterMode.markers
+ }
+
+ layout {
+ title {
+ text = "Load from resource"
+ }
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/latexLabels.kt b/plotly/examples/src/main/kotlin/latexLabels.kt
new file mode 100644
index 00000000..85f767fd
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/latexLabels.kt
@@ -0,0 +1,34 @@
+import space.kscience.plotly.*
+
+fun main() {
+ Plotly.page(mathJaxHeader, cdnPlotlyHeader) {
+ plot {
+ scatter {
+ x(2, 3, 4, 5)
+ y(10, 15, 13, 17)
+ }
+
+ text {
+ position(2, 10)
+ font {
+ size = 18
+ }
+ text = "\$\\alpha\$"
+ }
+
+ text {
+ position(5, 17)
+ font {
+ size = 18
+ }
+ text = "\$\\Omega\$"
+ }
+
+ layout {
+ title {
+ text = "Plot with annotations \$\\alpha~and~\\Omega\$"
+ }
+ }
+ }
+ }.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/localFileExport.kt b/plotly/examples/src/main/kotlin/localFileExport.kt
new file mode 100644
index 00000000..dd293598
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/localFileExport.kt
@@ -0,0 +1,30 @@
+import space.kscience.plotly.*
+import kotlin.math.PI
+import kotlin.math.sin
+
+
+@UnstablePlotlyAPI
+fun main() {
+ val xValues = (0..100).map { it.toDouble() / 100.0 }
+ val yValues = xValues.map { sin(2.0 * PI * it) }
+
+ val plot = Plotly.plot {
+ trace {
+ x.set(xValues)
+ y.set(yValues)
+ name = "for a single trace in graph its name would be hidden"
+ }
+ layout {
+ title = "Graph name"
+ xaxis {
+ title = "x axis"
+ }
+ yaxis {
+ title = "y axis"
+ }
+ }
+ }
+
+ plot.makeFile(selectFile())
+ //plot.makeFile(Files.createTempFile("plotlykt",".html"))
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/misc/dynamicBars.kt b/plotly/examples/src/main/kotlin/misc/dynamicBars.kt
new file mode 100644
index 00000000..fe0ad8f1
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/misc/dynamicBars.kt
@@ -0,0 +1,63 @@
+import kotlinx.coroutines.*
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.models.Bar
+import space.kscience.plotly.server.*
+import kotlin.random.Random
+
+
+@OptIn(DelicateCoroutinesApi::class)
+fun main() {
+ val initialValue = (1..10).toList()
+
+ val traces = (0..2).associate { i ->
+ val name = "Series $i"
+
+ name to Bar {
+ x.strings = initialValue.map { "Column: $it" }
+ y.numbers = initialValue
+ text.strings = initialValue.map { "Initial value of this datapoint is: ${it}" }
+ this.name = name
+ }
+ }
+
+ val server = Plotly.serve(port = 3872) {
+ pushUpdates(200)
+ //root level plots go to default page
+ plot {
+ traces(traces.values)
+ layout {
+ title = "Other dynamic plot"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+ }
+ }
+
+ server.show()
+
+ //Start pushing updates
+ GlobalScope.launch {
+ delay(1000)
+ while (isActive) {
+ repeat(10) { columnIndex ->
+ repeat(3) { seriesIndex ->
+ delay(200)
+ traces["Series $seriesIndex"]?.let { bar ->
+ println("Updating ${bar.name}, Column $columnIndex")
+ //TODO replace with dynamic data API
+ val yValues = bar.y.doubles
+ yValues[columnIndex] = Random.nextInt(0, 100).toDouble()
+ bar.y.doubles = yValues
+ bar.text.strings = yValues.map { "Updated value of this datapoint is: $it" }
+ }
+ }
+ }
+ }
+ }
+
+ println("Press Enter to close server")
+ readLine()
+
+ server.close()
+}
diff --git a/plotly/examples/src/main/kotlin/misc/dynamicHistogram.kt b/plotly/examples/src/main/kotlin/misc/dynamicHistogram.kt
new file mode 100644
index 00000000..b2335002
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/misc/dynamicHistogram.kt
@@ -0,0 +1,61 @@
+package misc
+
+import kotlinx.coroutines.*
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.histogram
+import space.kscience.plotly.layout
+import space.kscience.plotly.server.close
+import space.kscience.plotly.server.plot
+import space.kscience.plotly.server.serve
+import kotlin.random.Random
+
+@OptIn(DelicateCoroutinesApi::class)
+fun main() {
+ val server = Plotly.serve {
+ val rnd = Random(222)
+ plot {
+ histogram {
+ name = "Random data"
+ GlobalScope.launch {
+ while (isActive) {
+ x.numbers = List(500) { rnd.nextDouble() }
+ delay(300)
+ }
+ }
+ }
+
+ layout {
+ bargap = 0.1
+ title {
+ text = "Basic Histogram"
+ font {
+ size = 20
+ color("black")
+ }
+ }
+ xaxis {
+ title {
+ text = "Value"
+ font {
+ size = 16
+ }
+ }
+ }
+ yaxis {
+ title {
+ text = "Count"
+ font {
+ size = 16
+ }
+ }
+ }
+ }
+ }
+ }
+
+ println("Press Enter to close server")
+ readLine()
+
+ server.close()
+
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/misc/layoutImages.kt b/plotly/examples/src/main/kotlin/misc/layoutImages.kt
new file mode 100644
index 00000000..55684d29
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/misc/layoutImages.kt
@@ -0,0 +1,39 @@
+package misc
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ImageXAnchor
+import space.kscience.plotly.models.ImageYAnchor
+import space.kscience.plotly.scatter
+
+fun main() {
+ Plotly.plot {
+ scatter {
+ x(1, 2, 3)
+ y(1, 2, 3)
+ }
+ layout {
+ image {
+ source = "https://images.plot.ly/language-icons/api-home/python-logo.png"
+ x = 0.0
+ y = 1.0
+ sizex = 0.2
+ sizey = 0.2
+ xanchor = ImageXAnchor.right
+ yanchor = ImageYAnchor.bottom
+ }
+ image {
+ source = "https://images.plot.ly/language-icons/api-home/js-logo.png"
+ xref = "x"
+ yref = "y"
+ x = 1.5
+ y = 2.0
+ sizex = 1.0
+ sizey = 1.0
+ xanchor = ImageXAnchor.right
+ yanchor = ImageYAnchor.bottom
+ }
+ }
+ }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/misc/secondaryYAxis.kt b/plotly/examples/src/main/kotlin/misc/secondaryYAxis.kt
new file mode 100644
index 00000000..01e30a9c
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/misc/secondaryYAxis.kt
@@ -0,0 +1,46 @@
+package misc
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.AxisSide
+import space.kscience.plotly.scatter
+
+
+fun main() {
+ Plotly.plot {
+
+ scatter {
+ x(1, 2, 3)
+ y(40, 50, 60)
+ name = "yaxis data"
+ }
+
+ scatter {
+ x(2, 3, 4)
+ y(4, 5, 6)
+ name = "yaxis2 data"
+ yaxis = "y2"
+ }
+
+ layout {
+ title = "Double Y Axis Example"
+ yaxis {
+ title = "yaxis title"
+ }
+ yaxis(2) {
+ title {
+ text = "yaxis2 title"
+ font {
+ color("rgb(148, 103, 189)")
+ }
+ }
+ tickfont {
+ color("rgb(148, 103, 189)")
+ }
+ overlaying = "y"
+ side = AxisSide.right
+ }
+ }
+ }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/misc/singleValue.kt b/plotly/examples/src/main/kotlin/misc/singleValue.kt
new file mode 100644
index 00000000..ce1346b5
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/misc/singleValue.kt
@@ -0,0 +1,15 @@
+package misc
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.bar
+import space.kscience.plotly.makeFile
+
+fun main() {
+ val plot = Plotly.plot {
+ bar {
+ x("giraffes")
+ y(20)
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/pie/BasicPieChart.kt b/plotly/examples/src/main/kotlin/pie/BasicPieChart.kt
new file mode 100644
index 00000000..31502262
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/pie/BasicPieChart.kt
@@ -0,0 +1,30 @@
+package pie
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Pie
+
+/**
+ * - basic pie chart
+ * - change height and width of the plot
+ */
+fun main() {
+ val values = listOf(19, 26, 55)
+ val labels = listOf("Residential", "Non-Residential", "Utility")
+
+ val pie = Pie {
+ values(values)
+ labels(labels)
+ }
+
+ val plot = Plotly.plot {
+ traces(pie)
+ layout {
+ width = 500
+ height = 450
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/pie/DonutChart.kt b/plotly/examples/src/main/kotlin/pie/DonutChart.kt
new file mode 100644
index 00000000..84d3f3e2
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/pie/DonutChart.kt
@@ -0,0 +1,45 @@
+package pie
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.fragment
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Pie
+import space.kscience.plotly.plot
+
+
+fun main() {
+ val donut1 = Pie {
+ values(listOf(16, 15, 12, 6, 5, 4, 42))
+ labels(listOf("US", "China", "European Union", "Russian Federation", "Brazil", "India", "Rest of World"))
+ hole = 0.4
+ }
+
+ val donut2 = Pie {
+ values(listOf(27, 11, 25, 8, 1, 3, 25))
+ labels(listOf("US", "China", "European Union", "Russian Federation", "Brazil", "India", "Rest of World"))
+ hole = 0.4
+ }
+
+ Plotly.fragment {
+ plot {
+ traces(donut1)
+
+ layout {
+ width = 600
+ height = 600
+ title = "GHG Emissions"
+ }
+ }
+
+ plot {
+ traces(donut2)
+
+ layout {
+ width = 600
+ height = 600
+ title = "CO2"
+ }
+ }
+ }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/pie/ManyTracesChart.kt b/plotly/examples/src/main/kotlin/pie/ManyTracesChart.kt
new file mode 100644
index 00000000..9b7bba32
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/pie/ManyTracesChart.kt
@@ -0,0 +1,89 @@
+package pie
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Pie
+import space.kscience.plotly.models.TextInfo
+
+
+/**
+ * - Pie chart with many traces
+ * - Use colors array as pieColors
+ * - Change trace domain
+ */
+fun main() {
+ val allLabels = listOf("1st", "2nd", "3rd", "4th", "5th")
+ val allValues = listOf(
+ listOf(38, 27, 18, 10, 7),
+ listOf(28, 26, 21, 15, 10),
+ listOf(38, 19, 16, 14, 13),
+ listOf(31, 24, 19, 18, 8))
+ val ultimateColors = listOf(
+ listOf("rgb(56, 75, 126)", "rgb(18, 36, 37)", "rgb(34, 53, 101)", "rgb(36, 55, 57)", "rgb(6, 4, 4)"),
+ listOf("rgb(177, 127, 38)", "rgb(205, 152, 36)", "rgb(99, 79, 37)", "rgb(129, 180, 179)", "rgb(124, 103, 37)"),
+ listOf("rgb(33, 75, 99)", "rgb(79, 129, 102)", "rgb(151, 179, 100)", "rgb(175, 49, 35)", "rgb(36, 73, 147)"),
+ listOf("rgb(146, 123, 21)", "rgb(177, 180, 34)", "rgb(206, 206, 40)", "rgb(175, 51, 21)", "rgb(35, 36, 21)"))
+
+ val pie1 = Pie {
+ values = allValues[0].map { Value.of(it) }
+ labels = allLabels.map { Value.of(it) }
+ name = "Starry Night"
+ marker { pieColors = ultimateColors[0].map { Value.of(it) } }
+ domain {
+ x = listOf(0, 0.48)
+ y = listOf(0, 0.48)
+ }
+ hoverinfo = "label+percent+name"
+ textinfo = TextInfo.none
+ }
+ val pie2 = Pie {
+ values = allValues[1].map { Value.of(it) }
+ labels = allLabels.map { Value.of(it) }
+ name = "Sunflowers"
+ marker { pieColors = ultimateColors[1].map { Value.of(it) } }
+ domain {
+ x = listOf(0, 0.48)
+ y = listOf(0.52, 1)
+ }
+ hoverinfo = "label+percent+name"
+ textinfo = TextInfo.none
+ }
+ val pie3 = Pie {
+ values = allValues[2].map { Value.of(it) }
+ labels = allLabels.map { Value.of(it) }
+ name = "Irises"
+ marker { pieColors = ultimateColors[2].map { Value.of(it) } }
+ domain {
+ x = listOf(0.52, 1)
+ y = listOf(0, 0.48)
+ }
+ hoverinfo = "label+percent+name"
+ textinfo = TextInfo.none
+ }
+ val pie4 = Pie {
+ values = allValues[3].map { Value.of(it) }
+ labels = allLabels.map { Value.of(it) }
+ name = "The Night Cafe"
+ marker { pieColors = ultimateColors[3].map { Value.of(it) } }
+ domain {
+ x = listOf(0.52, 1)
+ y = listOf(0.52, 1)
+ }
+ hoverinfo = "label+percent+name"
+ textinfo = TextInfo.none
+ }
+
+ val plot = Plotly.plot {
+ traces(pie1, pie2, pie3, pie4)
+
+ layout {
+ title = "Pie Chart With Many Traces"
+ height = 500
+ width = 500
+ showlegend = false
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/pie/NestedPieChart.kt b/plotly/examples/src/main/kotlin/pie/NestedPieChart.kt
new file mode 100644
index 00000000..954c8d5b
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/pie/NestedPieChart.kt
@@ -0,0 +1,78 @@
+package pie
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Pie
+import space.kscience.plotly.palettes.Xkcd
+
+
+/**
+ * - Nested pie chart
+ * - Set sectors colors using marker -> colors
+ * - Change legend borderwidth
+ */
+fun main() {
+ val labels = listOf("party A", "party B", "party C", "party D")
+ val colorsPie = listOf(Xkcd.RED, Xkcd.GREEN, Xkcd.ORANGE, Xkcd.BLUE).map { Value.of(it) }
+
+ val firstPie = Pie {
+ name = "First day"
+ values(listOf(3, 2, 2, 3))
+ labels(labels)
+ hole = 0.5
+ sort = false
+ textfont { size = 16 }
+ domain {
+ x = listOf(0.2, 0.8)
+ y = listOf(0.1, 0.9)
+ }
+ marker {
+ pieColors = colorsPie
+ line {
+ color("white")
+ width = 2
+ }
+ }
+ }
+
+ val secondPie = Pie {
+ name = "Second day"
+ values(listOf(8, 7, 6, 5))
+ labels(labels)
+ hole = 0.77
+ opacity = 0.75
+ sort = false
+ textfont { size = 16 }
+ domain {
+ x = listOf(0.1, 0.9)
+ y = listOf(0, 1)
+ }
+ marker {
+ pieColors = colorsPie
+ line {
+ color("white")
+ width = 2
+ }
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(firstPie, secondPie)
+
+ layout {
+ width = 700
+ height = 600
+ title = "Nested Pie Charts"
+
+ legend {
+ borderwidth = 1
+ font {
+ size = 16
+ }
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/pie/OnlyLegendLabels.kt b/plotly/examples/src/main/kotlin/pie/OnlyLegendLabels.kt
new file mode 100644
index 00000000..b207cc12
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/pie/OnlyLegendLabels.kt
@@ -0,0 +1,33 @@
+package pie
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.TextInfo
+import space.kscience.plotly.pie
+
+fun main() {
+ val labels = listOf("Cookies", "Jellybean", "Milkshake", "Cheesecake")
+ val values = listOf(38.4, 40.6, 20.7, 10.3)
+
+ val plot = Plotly.plot {
+ pie {
+ labels(labels)
+ values(values)
+ textinfo = TextInfo.none
+ }
+
+ layout {
+ width = 700
+ height = 600
+ title = "Show Labels Only in Legend"
+ legend {
+ borderwidth = 1
+ font {
+ size = 16
+ }
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/pie/PullSectorPie.kt b/plotly/examples/src/main/kotlin/pie/PullSectorPie.kt
new file mode 100644
index 00000000..a41da970
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/pie/PullSectorPie.kt
@@ -0,0 +1,42 @@
+package pie
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.TextInfo
+import space.kscience.plotly.models.TextPosition
+import space.kscience.plotly.pie
+
+
+/**
+ * - Pie chart with pulled out sector
+ * - Change start angle of pie
+ * - Show labels outside the pie
+ */
+fun main() {
+ val labels = listOf("Python", "C++", "Ruby", "Java")
+ val values = listOf(215, 130, 245, 210)
+ val pullSectors = listOf(0.1, 0, 0, 0)
+
+ val plot = Plotly.plot {
+ pie {
+ labels(labels)
+ values(values)
+ pullList = pullSectors
+ rotation = -45
+ textposition = TextPosition.outside
+ textinfo = TextInfo.`label+percent`
+ textfont {
+ size = 16
+ }
+ showlegend = false
+ }
+
+ layout {
+ height = 600
+ width = 700
+ title = "Pull Sector Pie Chart"
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/plots3d/scatter3d.kt b/plotly/examples/src/main/kotlin/plots3d/scatter3d.kt
new file mode 100644
index 00000000..39143a79
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/plots3d/scatter3d.kt
@@ -0,0 +1,19 @@
+package plots3d
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.TraceType
+import space.kscience.plotly.trace
+
+
+fun main() {
+ val plot = Plotly.plot {
+ trace {
+ type = TraceType.scatter3d
+ x(1,2,3)
+ y(1,2,3)
+ z(1,2,3)
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/plots3d/surface3d.kt b/plotly/examples/src/main/kotlin/plots3d/surface3d.kt
new file mode 100644
index 00000000..9871449f
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/plots3d/surface3d.kt
@@ -0,0 +1,35 @@
+package plots3d
+
+import space.kscience.dataforge.meta.asValue
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.TraceType
+import space.kscience.plotly.trace
+
+private fun l(vararg numbers: Number) = numbers.map { it.asValue() }.asValue()
+
+fun main() {
+ val plot = Plotly.plot {
+ trace {
+ z.value = listOf(
+ l(8.83, 8.89, 8.81, 8.87, 8.9, 8.87),
+ l(8.89, 8.94, 8.85, 8.94, 8.96, 8.92),
+ l(8.84, 8.9, 8.82, 8.92, 8.93, 8.91),
+ l(8.79, 8.85, 8.79, 8.9, 8.94, 8.92),
+ l(8.79, 8.88, 8.81, 8.9, 8.95, 8.92),
+ l(8.8, 8.82, 8.78, 8.91, 8.94, 8.92),
+ l(8.75, 8.78, 8.77, 8.91, 8.95, 8.92),
+ l(8.8, 8.8, 8.77, 8.91, 8.95, 8.94),
+ l(8.74, 8.81, 8.76, 8.93, 8.98, 8.99),
+ l(8.89, 8.99, 8.92, 9.1, 9.13, 9.11),
+ l(8.97, 8.97, 8.91, 9.09, 9.11, 9.11),
+ l(9.04, 9.08, 9.05, 9.25, 9.28, 9.27),
+ l(9, 9.01, 9, 9.2, 9.23, 9.2),
+ l(8.99, 8.99, 8.98, 9.18, 9.2, 9.19),
+ l(8.93, 8.97, 8.97, 9.18, 9.2, 9.18)
+ ).asValue()
+ type = TraceType.surface
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/scatter/CategoricalDotPlot.kt b/plotly/examples/src/main/kotlin/scatter/CategoricalDotPlot.kt
new file mode 100644
index 00000000..2e7be11d
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/CategoricalDotPlot.kt
@@ -0,0 +1,90 @@
+package scatter
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.*
+
+
+/**
+ * - Categorical dot scatter plot
+ * - Use different scatter modes
+ * - Choose marker's symbol and size
+ * - Change background plot color
+ */
+fun main() {
+ val country = listOf("Switzerland (2011)", "Chile (2013)", "Japan (2014)", "United States (2012)",
+ "Slovenia (2014)", "Canada (2011)", "Poland (2010)", "Estonia (2015)", "Luxembourg (2013)", "Portugal (2011)")
+
+ val votingPop = listOf(40, 45.7, 52, 53.6, 54.1, 54.2, 54.5, 54.7, 55.1, 56.6)
+
+ val regVoters = listOf(49.1, 42, 52.7, 84.3, 51.7, 61.1, 55.3, 64.2, 91.1, 58.9)
+
+ val trace1 = Scatter {
+ x.numbers = votingPop
+ y.strings = country
+ mode = ScatterMode.markers
+ name = "Percent of estimated voting age population"
+ marker {
+ color("rgba(156, 165, 196, 0.95)")
+ line {
+ color("rgba(156, 165, 196, 1.0)")
+ width = 1
+ }
+ symbol = Symbol.circle
+ size = 16
+ }
+ }
+
+ val trace2 = Scatter {
+ x.numbers = regVoters
+ y.strings = country
+ mode = ScatterMode.markers
+ name = "Percent of estimated registered voters"
+ marker {
+ color("rgba(204, 204, 204, 0.95)")
+ line {
+ color("rgba(217, 217, 217, 1.0)")
+ width = 1
+ }
+ symbol = Symbol.circle
+ size = 16
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "Votes cast for ten lowest voting age population in OECD countries"
+ xaxis {
+ showgrid = false
+ showline = true
+ linecolor("rgb(102, 102, 102)")
+ title {
+ font { color("rgb(204, 204, 204)") }
+ }
+ tickfont { color("rgb(102, 102, 102)") }
+
+ autotick = false
+ dtick = Value.of(10)
+ ticks = Ticks.outside
+ tickcolor("rgb(102, 102, 102)")
+ }
+
+ margin { l = 140; r = 40; b = 50; t = 80 }
+ legend {
+ font { size = 10 }
+ yanchor = YAnchor.middle
+ xanchor = XAnchor.right
+ }
+ width = 600
+ height = 600
+ paper_bgcolor("rgb(254, 247, 234)")
+ plot_bgcolor("rgb(254, 247, 234)")
+ hovermode = HoverMode.closest
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/scatter/DataLabelsOnThePlot.kt b/plotly/examples/src/main/kotlin/scatter/DataLabelsOnThePlot.kt
new file mode 100644
index 00000000..60379e7b
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/DataLabelsOnThePlot.kt
@@ -0,0 +1,61 @@
+package scatter
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.models.TextPosition
+import space.kscience.plotly.scatter
+
+
+/**
+ * - Scatter plot only with markers
+ * - Data labels on the plot
+ * - Change textfont family
+ */
+fun main() {
+ val plot = Plotly.plot {
+ scatter {
+ x(1, 2, 3, 4)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.markers
+ name = "Team A"
+ text("A-1", "A-2", "A-3", "A-4", "A-5")
+ textposition = TextPosition.`top center`
+ textfont {
+ family = "Raleway, sans-serif"
+ }
+ marker { size = 12 }
+ }
+
+ scatter {
+ x(2, 3, 4, 5)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.lines
+ name = "Team B"
+ text("B-a", "B-b", "B-c", "B-d", "B-e")
+ textposition = TextPosition.`bottom center`
+ textfont {
+ family = "Times New Roman"
+ }
+ marker { size = 12 }
+ }
+
+ layout {
+ title = "Data Labels Hover"
+ xaxis {
+ range(0.75..5.25)
+ }
+ legend {
+ y = 0.5
+ font {
+ family = "Arial, sans-serif"
+ size = 20
+ color("grey")
+ }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/scatter/InterpolateOptions.kt b/plotly/examples/src/main/kotlin/scatter/InterpolateOptions.kt
new file mode 100644
index 00000000..c31f4332
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/InterpolateOptions.kt
@@ -0,0 +1,91 @@
+package scatter
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.LineShape
+import space.kscience.plotly.models.Scatter
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.models.TraceOrder
+
+
+/**
+ * - Interpolate options
+ * - Legend styling
+ * - Choose scatter mode and line shapes
+ */
+fun main() {
+ val trace1 = Scatter {
+ x(1, 2, 3, 4, 5)
+ y(1, 3, 2, 3, 1)
+ mode = ScatterMode.`lines+markers`
+ name = "linear"
+ line {
+ shape = LineShape.linear
+ }
+ }
+
+ val trace2 = Scatter {
+ x(1, 2, 3, 4, 5)
+ y(6, 8, 7, 8, 6)
+ mode = ScatterMode.`lines+markers`
+ name = "spline"
+ text("tweak line smoothness
with \"smoothing\" in line object")
+ line {
+ shape = LineShape.spline
+ }
+ }
+
+ val trace3 = Scatter {
+ x(1, 2, 3, 4, 5)
+ y(11, 13, 12, 13, 11)
+ mode = ScatterMode.`lines+markers`
+ name = "vhv"
+ line {
+ shape = LineShape.vhv
+ }
+ }
+
+ val trace4 = Scatter {
+ x(1, 2, 3, 4, 5)
+ y(16, 18, 17, 18, 16)
+ mode = ScatterMode.`lines+markers`
+ name = "hvh"
+ line {
+ shape = LineShape.hvh
+ }
+ }
+
+ val trace5 = Scatter {
+ x(1, 2, 3, 4, 5)
+ y(21, 23, 22, 23, 21)
+ mode = ScatterMode.`lines+markers`
+ name = "vh"
+ line {
+ shape = LineShape.vh
+ }
+ }
+
+ val trace6 = Scatter {
+ x(1, 2, 3, 4, 5)
+ y(26, 28, 27, 28, 26)
+ mode = ScatterMode.`lines+markers`
+ name = "hv"
+ line {
+ shape = LineShape.hv
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2, trace3, trace4, trace5, trace6)
+
+ layout {
+ legend {
+ y = 0.5
+ traceorder = TraceOrder.reversed
+ font { size = 16 }
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/scatter/LabellingLinesWithAnnotations.kt b/plotly/examples/src/main/kotlin/scatter/LabellingLinesWithAnnotations.kt
new file mode 100644
index 00000000..76b3b99a
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/LabellingLinesWithAnnotations.kt
@@ -0,0 +1,162 @@
+package scatter
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.*
+
+
+/**
+ * - Styled scatter plot
+ * - Use array of traces
+ * - Style annotations
+ */
+fun main() {
+ val xData = listOf(2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013)
+ val yData = listOf(
+ listOf(74, 82, 80, 74, 73, 72, 74, 70, 70, 66, 66, 69),
+ listOf(45, 42, 50, 46, 36, 36, 34, 35, 32, 31, 31, 28),
+ listOf(13, 14, 20, 24, 20, 24, 24, 40, 35, 41, 43, 50),
+ listOf(18, 21, 18, 21, 16, 14, 13, 18, 17, 16, 19, 23))
+ val colors = listOf("rgba(67, 67, 67, 1)", "rgba(115, 115, 115, 1)",
+ "rgba(49, 130, 189, 1)", "rgba(189, 189, 189, 1)")
+ val lineSize = listOf(2, 2, 4, 2)
+ val labels = listOf("Television", "Newspaper", "Internet", "Radio")
+
+ val tracesList = mutableListOf()
+ for (i in yData.indices) {
+ val result = Scatter {
+ x.set(xData)
+ y.set(yData[i])
+ line {
+ color(colors[i])
+ width = lineSize[i]
+ }
+ }
+ tracesList.add(result)
+
+ val result2 = Scatter {
+ x.set(listOf(xData[0], xData[11]))
+ y.set(listOf(yData[i][0], yData[i][11]))
+ mode = ScatterMode.markers
+ marker {
+ color(colors[i])
+ size = 12
+ }
+ }
+ tracesList.add(result2)
+ }
+
+ val annotationsList = mutableListOf()
+ val text1 = Text {
+ xref = "paper"
+ yref = "paper"
+ x = Value.of(0.0)
+ y = Value.of(1.05)
+ xanchor = XAnchor.left
+ yanchor = YAnchor.bottom
+ text = "Main Source for News"
+ font {
+ family = "Arial"
+ size = 30
+ color("rgb(37, 37, 37)")
+ }
+ showarrow = false
+ }
+ annotationsList.add(text1)
+ val text2 = Text {
+ xref = "paper"
+ yref = "paper"
+ x = Value.of(0.5)
+ y = Value.of(-0.1)
+ xanchor = XAnchor.center
+ yanchor = YAnchor.top
+ text = "Source: Pew Research Center & Storytelling with data"
+ showarrow = false
+ font {
+ family = "Arial"
+ size = 12
+ color("rgb(150, 150, 150)")
+ }
+ }
+ annotationsList.add(text2)
+ for (i in yData.indices) {
+ val result = Text {
+ xref = "paper"
+ x = Value.of(0.05)
+ y = Value.of(yData[i][0])
+ xanchor = XAnchor.right
+ yanchor = YAnchor.middle
+ text = labels[i] + " " + yData[i][0] + "%"
+ showarrow = false
+ font {
+ family = "Arial"
+ size = 16
+ color("black")
+ }
+ }
+ annotationsList.add(result)
+
+ val result2 = Text {
+ xref = "paper"
+ x = Value.of(0.95)
+ y = Value.of(yData[i][11])
+ xanchor = XAnchor.left
+ yanchor = YAnchor.middle
+ text = yData[i][11].toString() + "%"
+ font {
+ family = "Arial"
+ size = 16
+ color("black")
+ }
+ showarrow = false
+ }
+ annotationsList.add(result2)
+ }
+
+ val plot = Plotly.plot {
+ traces(tracesList)
+
+ layout {
+ showlegend = false
+ height = 600
+ width = 600
+ xaxis {
+ showline = true
+ showgrid = false
+ showticklabels = true
+ linecolor("rgb(204, 204, 204)")
+ linewidth = 2
+ autotick = false
+ ticks = Ticks.outside
+ tickcolor("rgb(204, 204, 204)")
+ tickwidth = 2
+ ticklen = 5
+ tickfont {
+ family = "Arial"
+ size = 12
+ color("rgb(82, 82, 82)")
+ }
+ }
+
+ yaxis {
+ showgrid = false
+ zeroline = false
+ showline = false
+ showticklabels = false
+ }
+
+ autosize = false
+ margin {
+ autoexpand = false
+ l = 100
+ r = 20
+ t = 100
+ }
+
+ annotations = annotationsList
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/scatter/LineAndScatterPlot.kt b/plotly/examples/src/main/kotlin/scatter/LineAndScatterPlot.kt
new file mode 100644
index 00000000..ff3f6c1f
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/LineAndScatterPlot.kt
@@ -0,0 +1,38 @@
+package scatter
+
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.scatter
+
+
+/**
+ * - Scatter plot with different scatter modes (markers, lines, markers+lines)
+ */
+fun main() {
+ val plot = Plotly.plot {
+ scatter {
+ x(1, 2, 3, 4)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.markers
+ }
+
+ scatter {
+ x(2, 3, 4, 5)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.lines
+ }
+
+ scatter {
+ x(1, 2, 3, 4)
+ y(12, 5, 2, 12)
+ mode = ScatterMode.`lines+markers`
+ }
+
+ layout {
+ title = "Line and Scatter Plot"
+ }
+ }
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/scatter/LogAxisScale.kt b/plotly/examples/src/main/kotlin/scatter/LogAxisScale.kt
new file mode 100644
index 00000000..0b28f46f
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/LogAxisScale.kt
@@ -0,0 +1,40 @@
+package scatter
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.layout
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.AxisType
+import space.kscience.plotly.models.Scatter
+
+
+/**
+ * - Scatter plot with logarithmic axes
+ */
+fun main() {
+ val trace1 = Scatter {
+ x(0, 1, 2, 3, 4, 5, 6, 7, 8)
+ y(8, 7, 6, 5, 4, 3, 2, 1, 0)
+ }
+
+ val trace2 = Scatter {
+ x(0, 1, 2, 3, 4, 5, 6, 7, 8)
+ y(0, 1, 2, 3, 4, 5, 6, 7, 8)
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+
+ layout {
+ title = "Log scale axis"
+ xaxis {
+ type = AxisType.log
+ autorange = true
+ }
+ yaxis {
+ type = AxisType.log
+ autorange = true
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/scatter/ScatterPlotWithColorDimension.kt b/plotly/examples/src/main/kotlin/scatter/ScatterPlotWithColorDimension.kt
new file mode 100644
index 00000000..b353fd76
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/ScatterPlotWithColorDimension.kt
@@ -0,0 +1,33 @@
+package scatter
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Scatter
+import space.kscience.plotly.models.ScatterMode
+
+
+/**
+ * - Scatter plot only with markers
+ * - Use numbers as color list
+ */
+fun main() {
+ val scatter = Scatter {
+ y.set(List(40) { 5.0 })
+ mode = ScatterMode.markers
+ marker {
+ size = 40
+ colors(List(40) { Value.of(it) })
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(scatter)
+
+ layout {
+ title = "Scatter plot with color dimension"
+ }
+ }
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/scatter/VerticalAndHorizontalLines.kt b/plotly/examples/src/main/kotlin/scatter/VerticalAndHorizontalLines.kt
new file mode 100644
index 00000000..91dfde0a
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/VerticalAndHorizontalLines.kt
@@ -0,0 +1,84 @@
+package scatter
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Dash
+import space.kscience.plotly.models.Scatter
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.models.ShapeType
+import space.kscience.plotly.shape
+
+
+/**
+ * - Text scatter mode
+ * - Add different lines using shapes
+ */
+fun main() {
+ val trace1 = Scatter {
+ x(2, 3.5, 6)
+ y(1, 1.5, 1)
+ text("Vertical Line", "Horizontal Dashed Line", "Diagonal dotted Line")
+ mode = ScatterMode.text
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1)
+
+ layout {
+ title = "Vertical and Horizontal Lines Positioned Relative to the Axes"
+ xaxis {
+ range(0.0..7.0)
+ }
+ yaxis {
+ range(0.0..2.5)
+ }
+
+ width = 700
+ height = 500
+
+ // vertical line
+ shape {
+ type = ShapeType.line
+ x0 = Value.of(1)
+ y0 = Value.of(0)
+ x1 = Value.of(1)
+ y1 = Value.of(2)
+ line {
+ color("rgb(55, 128, 191")
+ width = 3
+ }
+ }
+
+ // horizontal line
+ shape {
+ type = ShapeType.line
+ x0 = Value.of(2)
+ y0 = Value.of(2)
+ x1 = Value.of(5)
+ y1 = Value.of(2)
+ line {
+ color("rgb(50, 171, 96)")
+ width = 4
+ dash = Dash.dashdot
+ }
+ }
+
+ // diagonal line
+ shape {
+ type = ShapeType.line
+ x0 = Value.of(4)
+ y0 = Value.of(0)
+ x1 = Value.of(6)
+ y1 = Value.of(2)
+ line {
+ color("rgb(128, 0, 128)")
+ width = 4
+ dash = Dash.dot
+ }
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/scatter/stackedAreaPlot.kt b/plotly/examples/src/main/kotlin/scatter/stackedAreaPlot.kt
new file mode 100644
index 00000000..86f22dec
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/scatter/stackedAreaPlot.kt
@@ -0,0 +1,38 @@
+package scatter
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.GroupNorm
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.scatter
+
+
+/**
+ * from https://plotly.com/python/filled-area-plots/
+ */
+fun main() {
+ val xValues = listOf("Winter", "Spring", "Summer", "Fall")
+
+ Plotly.plot {
+
+ fun stack(vararg ys: Number, colorOverride: String? = null) {
+ scatter {
+ x.strings = xValues
+ y(*ys)
+ hoverinfo = "x+y"
+ mode = ScatterMode.lines
+ line {
+ width = 0.5
+ colorOverride?.let { color(colorOverride) }
+ }
+ stackgroup = "one"
+ groupnorm = GroupNorm.percent
+ }
+ }
+
+ stack(40, 60, 40, 10, colorOverride = "rgb(131, 90, 241)")
+ stack(20, 10, 10, 60, colorOverride = "rgb(111, 231, 219)")
+ stack(40, 30, 50, 30, colorOverride = "rgb(184, 247, 212)")
+
+ }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/script/README.md b/plotly/examples/src/main/kotlin/script/README.md
new file mode 100644
index 00000000..3d61bf8c
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/script/README.md
@@ -0,0 +1,3 @@
+# Run script
+
+`plotlykt-script customPage.plotly.kts`
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/script/customPage.plotly.kts b/plotly/examples/src/main/kotlin/script/customPage.plotly.kts
new file mode 100644
index 00000000..2e91ec1f
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/script/customPage.plotly.kts
@@ -0,0 +1,29 @@
+val x1 = (0..100).map { it.toDouble() / 100.0 }
+val y1 = x1.map { sin(2.0 * PI * it) }
+val y2 = x1.map { cos(2.0 * PI * it) }
+
+val trace1 = Trace(x1, y1) { name = "sin" }
+val trace2 = Trace(x1, y2) { name = "cos" }
+
+
+plot {
+ traces(trace1, trace2)
+ layout {
+ title = "The plot above"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+}
+hr()
+h1 { +"A custom separator" }
+hr()
+div {
+ plot {
+ traces(trace1, trace2)
+ layout {
+ title = "The plot below"
+ xaxis.title = "x axis name"
+ yaxis.title = "y axis name"
+ }
+ }
+}
diff --git a/plotly/examples/src/main/kotlin/simpleServer.kt b/plotly/examples/src/main/kotlin/simpleServer.kt
new file mode 100644
index 00000000..1ed21ca1
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/simpleServer.kt
@@ -0,0 +1,90 @@
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.html.a
+import kotlinx.html.div
+import kotlinx.html.h1
+import kotlinx.html.style
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plot
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.models.invoke
+import space.kscience.plotly.plot
+import space.kscience.plotly.server.close
+import space.kscience.plotly.server.serve
+import space.kscience.plotly.server.show
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.sin
+
+@ExperimentalCoroutinesApi
+fun main() {
+ val server = Plotly.serve {
+ val x = (0..100).map { it.toDouble() / 100.0 }.toDoubleArray()
+ val y1 = x.map { sin(2.0 * PI * it) }.toDoubleArray()
+ val y2 = x.map { cos(2.0 * PI * it) }.toDoubleArray()
+
+ val trace1 = Trace(x, y1) { name = "sin" }
+ val trace2 = Trace(x, y2) { name = "cos" }
+
+ val plot1: Plot = Plotly.plot{
+ traces(trace1, trace2)
+ layout {
+ title = "First graph, row: 1, size: 8/12"
+ xaxis { title = "x axis name" }
+ yaxis { title = "y axis name" }
+ }
+ }
+
+ //root level plots go to default page
+ page {
+ h1 { +"This is the plot page" }
+ a("/other") { +"The other page" }
+ div {
+ style = "display: flex; align-items: stretch; "
+ div {
+ style = "width: 64%;"
+ plot(plot1)
+ }
+ div {
+ style = "width: 32%;"
+ plot {
+ traces(trace1, trace2)
+ layout {
+ title = "Second graph, row: 1, size: 4/12"
+ xaxis { title = "x axis name" }
+ yaxis { title = "y axis name" }
+ }
+ }
+ }
+ }
+
+
+
+ div {
+ plot {
+ traces(trace1, trace2)
+ layout {
+ title = "Third graph, row: 2, size: 12/12"
+ xaxis { title = "x axis name" }
+ yaxis { title = "y axis name" }
+ }
+ }
+ }
+ }
+
+ page("other") {
+ h1 { +"This is the other plot page" }
+ a("/") { +"Back to the main page" }
+ plot(plot1)
+ }
+
+ }
+
+ server.show()
+
+ println("Press Enter to close server")
+ readLine()
+
+ server.close()
+
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/staticPlot.kt b/plotly/examples/src/main/kotlin/staticPlot.kt
new file mode 100644
index 00000000..cac829d6
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/staticPlot.kt
@@ -0,0 +1,31 @@
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.trace
+import kotlin.math.PI
+import kotlin.math.sin
+
+fun main() {
+ val xValues = (0..100).map { it.toDouble() / 100.0 }
+ val yValues = xValues.map { sin(2.0 * PI * it) }
+
+ val plot = Plotly.plot {
+ trace {
+ x.set(xValues)
+ y.set(yValues)
+ name = "for a single trace in graph its name would be hidden"
+ }
+
+ layout {
+ title = "Graph name"
+ xaxis {
+ title = "x axis"
+ }
+ yaxis {
+ title = "y axis"
+ }
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/svgSaveViaOrca.kt b/plotly/examples/src/main/kotlin/svgSaveViaOrca.kt
new file mode 100644
index 00000000..50c7b123
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/svgSaveViaOrca.kt
@@ -0,0 +1,88 @@
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.UnstablePlotlyAPI
+import space.kscience.plotly.export
+import space.kscience.plotly.models.Scatter
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.selectFile
+import javax.swing.filechooser.FileNameExtensionFilter
+
+
+/**
+ * - Scatter plot with many traces
+ * - Hide axis & grid lines
+ * - Export picture as svg using orca
+ */
+@OptIn(UnstablePlotlyAPI::class)
+fun main() {
+ val trace1 = Scatter {
+ x(52698, 43117)
+ y(53, 31)
+ mode = ScatterMode.markers
+ name = "North America"
+ text("United States", "Canada")
+ marker {
+ color("rgb(164, 194, 244)")
+ size = 12
+ line {
+ color("white")
+ width = 1
+ }
+ }
+ }
+
+ val trace2 = Scatter {
+ x(39317, 37236, 35650, 30066, 29570, 27159, 23557, 21046, 18007)
+ y(33, 20, 13, 19, 27, 19, 49, 44, 38)
+ mode = ScatterMode.markers
+ name = "Europe"
+ text("Germany", "Britain", "France", "Spain", "Italy", "Czech Rep.", "Greece", "Poland")
+ marker {
+ color("rgb(255, 217, 102)")
+ size = 12
+ }
+ }
+
+ val trace3 = Scatter {
+ x(42952, 37037, 33106, 17478, 9813, 5253, 4692, 3899)
+ y(23, 42, 54, 89, 14, 99, 93, 70)
+ mode = ScatterMode.markers
+ name = "Asia/Pacific"
+ text("Australia", "Japan", "South Korea", "Malaysia", "China", "Indonesia", "Philippines", "India")
+ marker {
+ color("rgb(234, 153, 153)")
+ size = 12
+ }
+ }
+
+ val trace4 = Scatter {
+ x(19097, 18601, 15595, 13546, 12026, 7434, 5419)
+ y(43, 47, 56, 80, 86, 93, 80)
+ mode = ScatterMode.markers
+ name = "Latin America"
+ text("Chile", "Argentina", "Mexico", "Venezuela", "Venezuela", "El Salvador", "Bolivia")
+ marker {
+ color("rgb(142, 124, 195)")
+ size = 12
+ }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2, trace3, trace4)
+
+ layout {
+ title = "Quarter 1 Growth"
+ xaxis {
+ title = "GDP per Capita"
+ showgrid = false
+ zeroline = false
+ }
+ yaxis {
+ title = "Percent"
+ showline = false
+ }
+ }
+ }
+
+ plot.export(selectFile(FileNameExtensionFilter("SVG","svg")) ?: error("File not selected"))
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/tabPageLayout.kt b/plotly/examples/src/main/kotlin/tabPageLayout.kt
new file mode 100644
index 00000000..75cc6d9c
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/tabPageLayout.kt
@@ -0,0 +1,113 @@
+import kotlinx.html.*
+import space.kscience.plotly.*
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.models.invoke
+import space.kscience.plotly.palettes.T10
+import kotlin.math.PI
+import kotlin.math.cos
+import kotlin.math.sin
+
+
+public class PlotTabs {
+ public data class Tab(val title: String, val id: String, val content: PlotlyFragment)
+
+ private val _tabs = ArrayList()
+ public val tabs: List get() = _tabs
+
+ public fun tab(title: String, id: String = title, block: FlowContent.(renderer: PlotlyRenderer) -> Unit) {
+ _tabs.add(Tab(title, id, PlotlyFragment(block)))
+ }
+}
+
+public fun Plotly.tabs(tabsID: String = "tabs", block: PlotTabs.() -> Unit): PlotlyPage {
+ val grid = PlotTabs().apply(block)
+
+ return page(cdnBootstrap, cdnPlotlyHeader) { container ->
+ ul("nav nav-tabs") {
+ role = "tablist"
+ id = tabsID
+ grid.tabs.forEachIndexed { index, tab ->
+ li("nav-item") {
+ a(classes = "nav-link") {
+ if (index == 0) {
+ classes = classes + "active"
+ }
+ id = "${tab.id}-tab"
+ attributes["data-toggle"] = "tab"
+ href = "#${tab.id}"
+ role = "tab"
+ attributes["aria-controls"] = tab.id
+ attributes["aria-selected"] = "true"
+ +tab.title
+ }
+ }
+ }
+ }
+ div("tab-content") {
+ id = "$tabsID-content"
+ grid.tabs.forEachIndexed { index, tab ->
+ div("tab-pane fade") {
+ if (index == 0) {
+ classes = classes + setOf("show", "active")
+ }
+ id = tab.id
+ role = "tabpanel"
+ attributes["aria-labelledby"] = "${tab.id}-tab"
+ tab.content.render(this, container)
+ }
+ }
+ }
+ }
+}
+
+
+@Suppress("DEPRECATION")
+@UnstablePlotlyAPI
+fun main() {
+
+ val x = (0..100).map { it.toDouble() / 100.0 }
+ val y1 = x.map { sin(2.0 * PI * it) }
+ val y2 = x.map { cos(2.0 * PI * it) }
+
+ val trace1 = Trace(x, y1) {
+ name = "sin"
+ marker.color(T10.BLUE)
+
+ }
+
+ val trace2 = Trace(x, y2) {
+ name = "cos"
+ marker.color(T10.ORANGE)
+
+ }
+
+ val responsive = PlotlyConfig {
+ responsive = true
+ }
+
+ val plot = Plotly.tabs {
+
+ tab("First") {
+ plot(config = responsive) {
+ traces(trace1)
+ layout {
+ title = "First graph"
+ xaxis.title = "x axis name"
+ xaxis.title = "y axis name"
+ }
+ }
+ }
+ tab("Second") {
+ plot(config = responsive) {
+ traces(trace2)
+ layout {
+ title = "Second graph"
+ xaxis.title = "x axis name"
+ xaxis.title = "y axis name"
+ }
+ }
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/table/BasicTable.kt b/plotly/examples/src/main/kotlin/table/BasicTable.kt
new file mode 100644
index 00000000..0a49775f
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/table/BasicTable.kt
@@ -0,0 +1,63 @@
+package table
+
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.HorizontalAlign
+import space.kscience.plotly.models.Table
+
+/**
+ * - basic table trace with customization.
+ */
+fun main() {
+ val values = listOf(
+ listOf("Salaries", "Office", "Merchandise", "Legal", "TOTAL"),
+ listOf(1200000, 20000, 80000, 2000, 12120000),
+ listOf(1300000, 20000, 70000, 2000, 130902000),
+ listOf(1300000, 20000, 120000, 2000, 131222000),
+ listOf(1400000, 20000, 90000, 2000, 14102000),
+ )
+
+ val labels = listOf(
+ listOf("EXPENSES"), listOf("Q1"), listOf("Q2"), listOf("Q3"), listOf("Q4")
+ )
+
+ val table = Table {
+ columnorder(0, 1, 2, 4, 3)
+ columnwidth(10, 10, 30, 30, 20)
+ header {
+ this.values(labels)
+ align(HorizontalAlign.left, HorizontalAlign.center)
+
+ line {
+ width = 1
+ color("#506784")
+ }
+ fill {
+ color("#119DFF")
+ }
+ font {
+ family = "Arial"
+ size = 12
+ color("white")
+ }
+ }
+ cells {
+ this.values(values)
+ align(HorizontalAlign.left, HorizontalAlign.center)
+ line {
+ width = 1
+ color("#506784")
+ }
+ fill {
+ colors(listOf("#25FEFD", "white"))
+ }
+ font {
+ family = "Arial"
+ size = 11
+ color("#506784")
+ }
+ }
+ }
+
+ Plotly.plot { traces(table) }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/tutorials/SinusPicture.kt b/plotly/examples/src/main/kotlin/tutorials/SinusPicture.kt
new file mode 100644
index 00000000..2f951e8b
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/tutorials/SinusPicture.kt
@@ -0,0 +1,155 @@
+package tutorials
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.plotly.*
+import space.kscience.plotly.models.*
+import space.kscience.plotly.palettes.Xkcd
+import kotlin.math.PI
+import kotlin.math.sin
+
+
+/**
+ * - Draw Math Graph with LaTeX annotations
+ * - Custom zeroline
+ * - Dashed and colored lines
+ * - Draw vertical lines
+ * - Use XKCD color palette
+ * - Change margins on the plot edges
+ * - Add shapes (vertical lines)
+ */
+fun main() {
+ val div = 200 / PI
+ val sub = PI / 6
+ val xValues: List = (-410..410).map { it / div }
+ val yValues = mutableListOf()
+ val yText = mutableListOf()
+
+ for (elem in xValues) {
+ val x = sin(elem)
+ yValues.add(x)
+ yText.add("sin = $x")
+ }
+
+ val xElems = listOf(-2 * PI + sub, -PI - sub, sub, PI - sub)
+ val shapesList = xElems.map { elem ->
+ Shape {
+ xref = "x"
+ yref = "y"
+ startXY(elem, 0)
+ endXY(elem, 0.5)
+ line { color("red") }
+ }
+ }
+
+ Plotly.page(mathJaxHeader, cdnPlotlyHeader) {
+ plot {
+ scatter { // sinus
+ x.set(xValues)
+ y.set(yValues)
+ name = "\$\\Large{y = \\mathrm{sin}\\,x}\$"
+ text.strings = yText
+ hoverinfo = "text"
+ line { color(Xkcd.CERULEAN) }
+ }
+ scatter { // sin(x) = 0
+ mode = ScatterMode.markers
+ x(-2 * PI, -PI, PI, 2 * PI)
+ y(0, 0, 0, 0)
+ line { color(Xkcd.CERULEAN_BLUE) }
+ marker { size = 8 }
+ showlegend = false
+ hoverinfo = "none"
+ }
+ scatter { // sin(x) = 1/2
+ mode = ScatterMode.markers
+ x.set(xElems + xElems)
+ y(0.5, 0.5, 0.5, 0.5, 0, 0, 0, 0)
+ line { color("red") }
+ marker { size = 8 }
+ showlegend = false
+ hoverinfo = "none"
+ }
+ scatter {
+ mode = ScatterMode.text
+ x(-0.35, 0.28, PI * 2 + 0.4)
+ y(0.56, 1.3, 0.1)
+ text.strings = listOf("\$\\Large{1/2}\$", "\$\\huge{y}\$", "\$\\huge{x}\$")
+ textfont {
+ colors(listOf("red", "black", "black"))
+ }
+ showlegend = false
+ hoverinfo = "none"
+ }
+
+ layout {
+ height = 500
+ width = 900
+ shapes = shapesList
+ margin { l = 20; r = 20; b = 20; t = 50 }
+
+ text { // arrow OX
+ y = Value.of(0)
+ x = Value.of(2 * PI + 20 / div)
+ ax = Value.of(-800)
+ ay = Value.of(0)
+ }
+ text { // arrow OY
+ x = Value.of(0)
+ y = Value.of(1 + 20 / div)
+ ax = Value.of(0)
+ ay = Value.of(430)
+ }
+
+ shape { // y = 1
+ xref = "x"
+ yref = "y"
+ startXY(-2 * PI, 1)
+ endXY(2 * PI, 1)
+ line { dash = Dash.dash }
+ }
+ shape { // y = 1/2
+ xref = "x"
+ yref = "y"
+ startXY(-2 * PI, 0.5)
+ endXY(2 * PI, 0.5)
+ line {
+ color("red")
+ dash = Dash.dash
+ }
+ }
+ shape { // y = -1
+ xref = "x"
+ yref = "y"
+ startXY(-2 * PI, -1)
+ endXY(2 * PI, -1)
+ line { dash = Dash.dash }
+ }
+
+ xaxis {
+ zeroline = false
+ showgrid = false
+ anchor = "free"
+ position = 0.43
+ tickvals(listOf(-2 * PI - 0.05, -PI - 0.15, PI - 0.05, 2 * PI + 0.1))
+ ticktext(listOf("\$\\huge{-2\\pi}\$", "\$\\huge{-\\pi}\$", "\$\\huge{\\pi}\$", "\$\\huge{2\\pi}\$"))
+ }
+ yaxis {
+ zeroline = false
+ showgrid = false
+ anchor = "free"
+ position = 0.485
+ tickvals(listOf(-0.91, 0.09, 1.09))
+ ticktext(listOf("\$\\Large{-1}\$", "\$\\Large{0}\$", "\$\\Large{1}\$"))
+ }
+ legend {
+ x = 0.97
+ y = 1
+ borderwidth = 1
+ font { size = 32 }
+ xanchor = XAnchor.right
+ yanchor = YAnchor.top
+ }
+ }
+ }
+ }.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/unsupportedFeature.kt b/plotly/examples/src/main/kotlin/unsupportedFeature.kt
new file mode 100644
index 00000000..a8659da3
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/unsupportedFeature.kt
@@ -0,0 +1,46 @@
+import space.kscience.dataforge.meta.ListValue
+import space.kscience.dataforge.meta.Meta
+import space.kscience.dataforge.meta.asValue
+import space.kscience.dataforge.meta.configure
+import space.kscience.dataforge.meta.invoke
+import space.kscience.dataforge.meta.set
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Trace
+import space.kscience.plotly.models.invoke
+
+
+fun main() {
+
+ val x = (0..5)
+ val y = x.map { it * it }
+
+ val trace = Trace.invoke(x, y) {
+ name = "sin"
+ /* The hover text definition is currently not supported.
+ * We are applying it directly to configuration.
+ * It is still observable in the same way as other properties but is not type safe.
+ */
+ meta["text"] = x.map { "label for $it".asValue() }
+ }
+
+ val plot = Plotly.plot {
+ traces(trace)
+ layout {
+ title = "Plot with labels"
+ xaxis {
+ title = "x axis name"
+ configure {
+ "rangebreaks" putIndexed listOf(
+ Meta {
+ "values" put ListValue(2.0, 3.0)
+ }
+ )
+ }
+ }
+ yaxis { title = "y axis name" }
+ }
+ }
+
+ plot.makeFile()
+}
diff --git a/plotly/examples/src/main/kotlin/violin/AdvancedViolin.kt b/plotly/examples/src/main/kotlin/violin/AdvancedViolin.kt
new file mode 100644
index 00000000..bd5fcfa1
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/violin/AdvancedViolin.kt
@@ -0,0 +1,96 @@
+package violin
+
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.*
+
+
+/**
+ * - Styled violin plot
+ */
+fun main() {
+ val trace1 = Violin {
+ text("sample length: 32")
+ marker {
+ line {
+ width = 2
+ color("#bebada")
+ }
+ symbol = Symbol.valueOf("line-ns")
+ }
+ orientation = Orientation.h
+ hoveron = ViolinHoveron.`points+kde`
+ meanline {
+ visible = true
+ }
+ legendgroup = "F"
+ scalegroup = "F"
+ points = ViolinPoints.all
+ pointpos = 1.2
+ jitter = 0
+ box {
+ visible = true
+ }
+ scalemode = ViolinScaleMode.count
+ showlegend = false
+ side = ViolinSide.positive
+ y0 = Value.of(0)
+ line {
+ color("#bebada")
+ }
+ name = "F"
+
+ x(10.07, 34.83, 10.65, 12.43, 24.08, 13.42, 12.48, 29.8, 14.52, 11.38,
+ 20.27, 11.17, 12.26, 18.26, 8.51, 10.33, 14.15, 13.16, 17.47, 27.05, 16.43,
+ 8.35, 18.64, 11.87, 19.81, 43.11, 13.0, 12.74, 13.0, 16.4, 16.47, 18.78)
+ }
+
+ val trace2 = Violin {
+ text("sample length: 32")
+ marker {
+ line {
+ width = 2
+ color("#8dd3c7")
+ }
+ symbol = Symbol.valueOf("line-ns")
+ }
+ orientation = Orientation.h
+ hoveron = ViolinHoveron.`points+kde`
+ meanline {
+ visible = true
+ }
+ legendgroup = "M"
+ scalegroup = "M"
+ points = ViolinPoints.all
+ pointpos = -1.2
+ jitter = 0
+ box {
+ visible = true
+ }
+ scalemode = ViolinScaleMode.count
+ showlegend = false
+ side = ViolinSide.negative
+ y0 = Value.of(0)
+
+ line {
+ color("#8dd3c7")
+ }
+ name = "M"
+
+ x(27.2, 22.76, 17.29, 19.44, 16.66, 32.68, 15.98, 13.03, 18.28, 24.71,
+ 21.16, 11.69, 14.26, 15.95, 8.52, 22.82, 19.08, 16.0, 34.3, 41.19, 9.78,
+ 7.51, 28.44, 15.48, 16.58, 7.56, 10.34, 13.51, 18.71, 20.53)
+ }
+
+
+ val plot = Plotly.plot {
+ traces(trace1, trace2)
+ layout {
+ title = "Advanced Violin Plot"
+ }
+ }
+
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/violin/BasicHorizontalViolinPlot.kt b/plotly/examples/src/main/kotlin/violin/BasicHorizontalViolinPlot.kt
new file mode 100644
index 00000000..92b64cb1
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/violin/BasicHorizontalViolinPlot.kt
@@ -0,0 +1,39 @@
+package violin
+
+import io.readResourceAsCsv
+import space.kscience.dataforge.meta.Value
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.ViolinPoints
+import space.kscience.plotly.violin
+
+
+/**
+ * - Horizontal violin plot
+ * - Load resource from local file using krangl
+ * - Change colors of the plot
+ * - Show all points
+ */
+fun main() {
+ val df = readResourceAsCsv("/violin_data.csv")
+
+ val plot = Plotly.plot {
+ violin {
+ x.set(df["total_bill"].values())
+ points = ViolinPoints.all
+ box { visible = true }
+ line { color("black") }
+ fillcolor("#8dd3c7")
+ opacity = 0.6
+ meanline { visible = true }
+ y0 = Value.of("Total Bill")
+ }
+
+ layout {
+ title = "Basic Horizontal Violin Plot"
+ xaxis { zeroline = false }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/violin/GroupedViolinPlot.kt b/plotly/examples/src/main/kotlin/violin/GroupedViolinPlot.kt
new file mode 100644
index 00000000..25d8d6d7
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/violin/GroupedViolinPlot.kt
@@ -0,0 +1,59 @@
+package violin
+
+import io.fromDataFrame
+import io.readResourceAsCsv
+import org.jetbrains.kotlinx.dataframe.api.column
+import org.jetbrains.kotlinx.dataframe.api.filter
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.models.Violin
+import space.kscience.plotly.models.ViolinMode
+
+
+/**
+ * - Grouped violin plot
+ * - Load csv from local file using krangl
+ */
+fun main() {
+ val df = readResourceAsCsv("/violin_data.csv")
+
+ val sex by column()
+
+ val violin1 = Violin {
+ val males = df.filter { sex() == "Male" }
+
+ x.fromDataFrame(males, "day")
+ y.fromDataFrame(males, "total_bill")
+ legendgroup = "M"
+ scalegroup = "M"
+ name = "M"
+ box { visible = true }
+ line { color("blue") }
+ meanline { visible = true }
+ }
+
+ val violin2 = Violin {
+ val females = df.filter { sex() == "Female" }
+
+ x.fromDataFrame(females, "day")
+ y.fromDataFrame(females, "total_bill")
+ legendgroup = "F"
+ scalegroup = "F"
+ name = "F"
+ box { visible = true }
+ line { color("pink") }
+ meanline { visible = true }
+ }
+
+ val plot = Plotly.plot {
+ traces(violin1, violin2)
+
+ layout {
+ title = "Grouped Violin Plot"
+ yaxis { zeroline = false }
+ violinmode = ViolinMode.group
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/violin/MultipleTracesViolin.kt b/plotly/examples/src/main/kotlin/violin/MultipleTracesViolin.kt
new file mode 100644
index 00000000..37fe4db5
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/violin/MultipleTracesViolin.kt
@@ -0,0 +1,76 @@
+package violin
+
+import org.jetbrains.kotlinx.dataframe.DataFrame
+import org.jetbrains.kotlinx.dataframe.api.column
+import org.jetbrains.kotlinx.dataframe.api.filter
+import org.jetbrains.kotlinx.dataframe.io.readCSV
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.makeFile
+import space.kscience.plotly.violin
+
+
+/**
+ * - Violin plot with multiple traces
+ * - Load resources from url using krangl
+ */
+fun main() {
+ val csvUrl = "https://raw.githubusercontent.com/plotly/datasets/master/violin_data.csv"
+ val df = DataFrame.readCSV(csvUrl)
+
+ val day by column()
+
+ val thursdayDf = df.filter { day() == "Thur" }
+ val fridayDf = df.filter { day() == "Fri" }
+ val saturdayDf = df.filter { day() == "Sat" }
+ val sundayDf = df.filter { day() == "Sun" }
+
+ val plot = Plotly.plot {
+ violin {
+ name = "Thursday"
+ y.set(thursdayDf["total_bill"].values())
+
+ line { color("green") }
+ box { visible = true }
+ meanline { visible = true }
+ }
+
+ violin {
+ name = "Friday"
+ y.set(fridayDf["total_bill"].values())
+
+ line { color("red") }
+ box { visible = true }
+ meanline { visible = true }
+ }
+
+ violin {
+ name = "Saturday"
+ y.set(saturdayDf["total_bill"].values())
+
+ line { color("orange") }
+ box { visible = true }
+ meanline { visible = true }
+ }
+
+ violin {
+ name = "Sunday"
+ y.set(sundayDf["total_bill"].values())
+
+ line { color("blue") }
+ box { visible = true }
+ meanline { visible = true }
+ }
+
+ layout {
+ width = 700
+ height = 450
+ title = "Multiple Traces Violin Plot"
+
+ yaxis {
+ zeroline = false
+ }
+ }
+ }
+ plot.makeFile()
+}
\ No newline at end of file
diff --git a/plotly/examples/src/main/kotlin/worksheets/lineAndScatter.ws.kts b/plotly/examples/src/main/kotlin/worksheets/lineAndScatter.ws.kts
new file mode 100644
index 00000000..a73a8b75
--- /dev/null
+++ b/plotly/examples/src/main/kotlin/worksheets/lineAndScatter.ws.kts
@@ -0,0 +1,29 @@
+import space.kscience.dataforge.meta.invoke
+import space.kscience.plotly.Plotly
+import space.kscience.plotly.models.ScatterMode
+import space.kscience.plotly.scatter
+import space.kscience.plotly.toHTML
+
+Plotly.plot {
+ scatter {
+ x(1, 2, 3, 4)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.markers
+ }
+
+ scatter {
+ x(2, 3, 4, 5)
+ y(10, 15, 13, 17)
+ mode = ScatterMode.lines
+ }
+
+ scatter {
+ x(1, 2, 3, 4)
+ y(12, 5, 2, 12)
+ mode = ScatterMode.`lines+markers`
+ }
+
+ layout {
+ title = "Line and Scatter Plot"
+ }
+}.toHTML()
\ No newline at end of file
diff --git a/plotly/examples/src/main/resources/simpleData.txt b/plotly/examples/src/main/resources/simpleData.txt
new file mode 100644
index 00000000..118dd534
--- /dev/null
+++ b/plotly/examples/src/main/resources/simpleData.txt
@@ -0,0 +1,2 @@
+1 2 3 4
+2 5 7 1
\ No newline at end of file
diff --git a/plotly/examples/src/main/resources/violin_data.csv b/plotly/examples/src/main/resources/violin_data.csv
new file mode 100644
index 00000000..402a92e0
--- /dev/null
+++ b/plotly/examples/src/main/resources/violin_data.csv
@@ -0,0 +1,245 @@
+total_bill,tip,sex,smoker,day,time,size
+16.99,1.01,Female,No,Sun,Dinner,2
+10.34,1.66,Male,No,Sun,Dinner,3
+21.01,3.5,Male,No,Sun,Dinner,3
+23.68,3.31,Male,No,Sun,Dinner,2
+24.59,3.61,Female,No,Sun,Dinner,4
+25.29,4.71,Male,No,Sun,Dinner,4
+8.77,2,Male,No,Sun,Dinner,2
+26.88,3.12,Male,No,Sun,Dinner,4
+15.04,1.96,Male,No,Sun,Dinner,2
+14.78,3.23,Male,No,Sun,Dinner,2
+10.27,1.71,Male,No,Sun,Dinner,2
+35.26,5,Female,No,Sun,Dinner,4
+15.42,1.57,Male,No,Sun,Dinner,2
+18.43,3,Male,No,Sun,Dinner,4
+14.83,3.02,Female,No,Sun,Dinner,2
+21.58,3.92,Male,No,Sun,Dinner,2
+10.33,1.67,Female,No,Sun,Dinner,3
+16.29,3.71,Male,No,Sun,Dinner,3
+16.97,3.5,Female,No,Sun,Dinner,3
+20.65,3.35,Male,No,Sat,Dinner,3
+17.92,4.08,Male,No,Sat,Dinner,2
+20.29,2.75,Female,No,Sat,Dinner,2
+15.77,2.23,Female,No,Sat,Dinner,2
+39.42,7.58,Male,No,Sat,Dinner,4
+19.82,3.18,Male,No,Sat,Dinner,2
+17.81,2.34,Male,No,Sat,Dinner,4
+13.37,2,Male,No,Sat,Dinner,2
+12.69,2,Male,No,Sat,Dinner,2
+21.7,4.3,Male,No,Sat,Dinner,2
+19.65,3,Female,No,Sat,Dinner,2
+9.55,1.45,Male,No,Sat,Dinner,2
+18.35,2.5,Male,No,Sat,Dinner,4
+15.06,3,Female,No,Sat,Dinner,2
+20.69,2.45,Female,No,Sat,Dinner,4
+17.78,3.27,Male,No,Sat,Dinner,2
+24.06,3.6,Male,No,Sat,Dinner,3
+16.31,2,Male,No,Sat,Dinner,3
+16.93,3.07,Female,No,Sat,Dinner,3
+18.69,2.31,Male,No,Sat,Dinner,3
+31.27,5,Male,No,Sat,Dinner,3
+16.04,2.24,Male,No,Sat,Dinner,3
+17.46,2.54,Male,No,Sun,Dinner,2
+13.94,3.06,Male,No,Sun,Dinner,2
+9.68,1.32,Male,No,Sun,Dinner,2
+30.4,5.6,Male,No,Sun,Dinner,4
+18.29,3,Male,No,Sun,Dinner,2
+22.23,5,Male,No,Sun,Dinner,2
+32.4,6,Male,No,Sun,Dinner,4
+28.55,2.05,Male,No,Sun,Dinner,3
+18.04,3,Male,No,Sun,Dinner,2
+12.54,2.5,Male,No,Sun,Dinner,2
+10.29,2.6,Female,No,Sun,Dinner,2
+34.81,5.2,Female,No,Sun,Dinner,4
+9.94,1.56,Male,No,Sun,Dinner,2
+25.56,4.34,Male,No,Sun,Dinner,4
+19.49,3.51,Male,No,Sun,Dinner,2
+38.01,3,Male,Yes,Sat,Dinner,4
+26.41,1.5,Female,No,Sat,Dinner,2
+11.24,1.76,Male,Yes,Sat,Dinner,2
+48.27,6.73,Male,No,Sat,Dinner,4
+20.29,3.21,Male,Yes,Sat,Dinner,2
+13.81,2,Male,Yes,Sat,Dinner,2
+11.02,1.98,Male,Yes,Sat,Dinner,2
+18.29,3.76,Male,Yes,Sat,Dinner,4
+17.59,2.64,Male,No,Sat,Dinner,3
+20.08,3.15,Male,No,Sat,Dinner,3
+16.45,2.47,Female,No,Sat,Dinner,2
+3.07,1,Female,Yes,Sat,Dinner,1
+20.23,2.01,Male,No,Sat,Dinner,2
+15.01,2.09,Male,Yes,Sat,Dinner,2
+12.02,1.97,Male,No,Sat,Dinner,2
+17.07,3,Female,No,Sat,Dinner,3
+26.86,3.14,Female,Yes,Sat,Dinner,2
+25.28,5,Female,Yes,Sat,Dinner,2
+14.73,2.2,Female,No,Sat,Dinner,2
+10.51,1.25,Male,No,Sat,Dinner,2
+17.92,3.08,Male,Yes,Sat,Dinner,2
+27.2,4,Male,No,Thur,Lunch,4
+22.76,3,Male,No,Thur,Lunch,2
+17.29,2.71,Male,No,Thur,Lunch,2
+19.44,3,Male,Yes,Thur,Lunch,2
+16.66,3.4,Male,No,Thur,Lunch,2
+10.07,1.83,Female,No,Thur,Lunch,1
+32.68,5,Male,Yes,Thur,Lunch,2
+15.98,2.03,Male,No,Thur,Lunch,2
+34.83,5.17,Female,No,Thur,Lunch,4
+13.03,2,Male,No,Thur,Lunch,2
+18.28,4,Male,No,Thur,Lunch,2
+24.71,5.85,Male,No,Thur,Lunch,2
+21.16,3,Male,No,Thur,Lunch,2
+28.97,3,Male,Yes,Fri,Dinner,2
+22.49,3.5,Male,No,Fri,Dinner,2
+5.75,1,Female,Yes,Fri,Dinner,2
+16.32,4.3,Female,Yes,Fri,Dinner,2
+22.75,3.25,Female,No,Fri,Dinner,2
+40.17,4.73,Male,Yes,Fri,Dinner,4
+27.28,4,Male,Yes,Fri,Dinner,2
+12.03,1.5,Male,Yes,Fri,Dinner,2
+21.01,3,Male,Yes,Fri,Dinner,2
+12.46,1.5,Male,No,Fri,Dinner,2
+11.35,2.5,Female,Yes,Fri,Dinner,2
+15.38,3,Female,Yes,Fri,Dinner,2
+44.3,2.5,Female,Yes,Sat,Dinner,3
+22.42,3.48,Female,Yes,Sat,Dinner,2
+20.92,4.08,Female,No,Sat,Dinner,2
+15.36,1.64,Male,Yes,Sat,Dinner,2
+20.49,4.06,Male,Yes,Sat,Dinner,2
+25.21,4.29,Male,Yes,Sat,Dinner,2
+18.24,3.76,Male,No,Sat,Dinner,2
+14.31,4,Female,Yes,Sat,Dinner,2
+14,3,Male,No,Sat,Dinner,2
+7.25,1,Female,No,Sat,Dinner,1
+38.07,4,Male,No,Sun,Dinner,3
+23.95,2.55,Male,No,Sun,Dinner,2
+25.71,4,Female,No,Sun,Dinner,3
+17.31,3.5,Female,No,Sun,Dinner,2
+29.93,5.07,Male,No,Sun,Dinner,4
+10.65,1.5,Female,No,Thur,Lunch,2
+12.43,1.8,Female,No,Thur,Lunch,2
+24.08,2.92,Female,No,Thur,Lunch,4
+11.69,2.31,Male,No,Thur,Lunch,2
+13.42,1.68,Female,No,Thur,Lunch,2
+14.26,2.5,Male,No,Thur,Lunch,2
+15.95,2,Male,No,Thur,Lunch,2
+12.48,2.52,Female,No,Thur,Lunch,2
+29.8,4.2,Female,No,Thur,Lunch,6
+8.52,1.48,Male,No,Thur,Lunch,2
+14.52,2,Female,No,Thur,Lunch,2
+11.38,2,Female,No,Thur,Lunch,2
+22.82,2.18,Male,No,Thur,Lunch,3
+19.08,1.5,Male,No,Thur,Lunch,2
+20.27,2.83,Female,No,Thur,Lunch,2
+11.17,1.5,Female,No,Thur,Lunch,2
+12.26,2,Female,No,Thur,Lunch,2
+18.26,3.25,Female,No,Thur,Lunch,2
+8.51,1.25,Female,No,Thur,Lunch,2
+10.33,2,Female,No,Thur,Lunch,2
+14.15,2,Female,No,Thur,Lunch,2
+16,2,Male,Yes,Thur,Lunch,2
+13.16,2.75,Female,No,Thur,Lunch,2
+17.47,3.5,Female,No,Thur,Lunch,2
+34.3,6.7,Male,No,Thur,Lunch,6
+41.19,5,Male,No,Thur,Lunch,5
+27.05,5,Female,No,Thur,Lunch,6
+16.43,2.3,Female,No,Thur,Lunch,2
+8.35,1.5,Female,No,Thur,Lunch,2
+18.64,1.36,Female,No,Thur,Lunch,3
+11.87,1.63,Female,No,Thur,Lunch,2
+9.78,1.73,Male,No,Thur,Lunch,2
+7.51,2,Male,No,Thur,Lunch,2
+14.07,2.5,Male,No,Sun,Dinner,2
+13.13,2,Male,No,Sun,Dinner,2
+17.26,2.74,Male,No,Sun,Dinner,3
+24.55,2,Male,No,Sun,Dinner,4
+19.77,2,Male,No,Sun,Dinner,4
+29.85,5.14,Female,No,Sun,Dinner,5
+48.17,5,Male,No,Sun,Dinner,6
+25,3.75,Female,No,Sun,Dinner,4
+13.39,2.61,Female,No,Sun,Dinner,2
+16.49,2,Male,No,Sun,Dinner,4
+21.5,3.5,Male,No,Sun,Dinner,4
+12.66,2.5,Male,No,Sun,Dinner,2
+16.21,2,Female,No,Sun,Dinner,3
+13.81,2,Male,No,Sun,Dinner,2
+17.51,3,Female,Yes,Sun,Dinner,2
+24.52,3.48,Male,No,Sun,Dinner,3
+20.76,2.24,Male,No,Sun,Dinner,2
+31.71,4.5,Male,No,Sun,Dinner,4
+10.59,1.61,Female,Yes,Sat,Dinner,2
+10.63,2,Female,Yes,Sat,Dinner,2
+50.81,10,Male,Yes,Sat,Dinner,3
+15.81,3.16,Male,Yes,Sat,Dinner,2
+7.25,5.15,Male,Yes,Sun,Dinner,2
+31.85,3.18,Male,Yes,Sun,Dinner,2
+16.82,4,Male,Yes,Sun,Dinner,2
+32.9,3.11,Male,Yes,Sun,Dinner,2
+17.89,2,Male,Yes,Sun,Dinner,2
+14.48,2,Male,Yes,Sun,Dinner,2
+9.6,4,Female,Yes,Sun,Dinner,2
+34.63,3.55,Male,Yes,Sun,Dinner,2
+34.65,3.68,Male,Yes,Sun,Dinner,4
+23.33,5.65,Male,Yes,Sun,Dinner,2
+45.35,3.5,Male,Yes,Sun,Dinner,3
+23.17,6.5,Male,Yes,Sun,Dinner,4
+40.55,3,Male,Yes,Sun,Dinner,2
+20.69,5,Male,No,Sun,Dinner,5
+20.9,3.5,Female,Yes,Sun,Dinner,3
+30.46,2,Male,Yes,Sun,Dinner,5
+18.15,3.5,Female,Yes,Sun,Dinner,3
+23.1,4,Male,Yes,Sun,Dinner,3
+15.69,1.5,Male,Yes,Sun,Dinner,2
+19.81,4.19,Female,Yes,Thur,Lunch,2
+28.44,2.56,Male,Yes,Thur,Lunch,2
+15.48,2.02,Male,Yes,Thur,Lunch,2
+16.58,4,Male,Yes,Thur,Lunch,2
+7.56,1.44,Male,No,Thur,Lunch,2
+10.34,2,Male,Yes,Thur,Lunch,2
+43.11,5,Female,Yes,Thur,Lunch,4
+13,2,Female,Yes,Thur,Lunch,2
+13.51,2,Male,Yes,Thur,Lunch,2
+18.71,4,Male,Yes,Thur,Lunch,3
+12.74,2.01,Female,Yes,Thur,Lunch,2
+13,2,Female,Yes,Thur,Lunch,2
+16.4,2.5,Female,Yes,Thur,Lunch,2
+20.53,4,Male,Yes,Thur,Lunch,4
+16.47,3.23,Female,Yes,Thur,Lunch,3
+26.59,3.41,Male,Yes,Sat,Dinner,3
+38.73,3,Male,Yes,Sat,Dinner,4
+24.27,2.03,Male,Yes,Sat,Dinner,2
+12.76,2.23,Female,Yes,Sat,Dinner,2
+30.06,2,Male,Yes,Sat,Dinner,3
+25.89,5.16,Male,Yes,Sat,Dinner,4
+48.33,9,Male,No,Sat,Dinner,4
+13.27,2.5,Female,Yes,Sat,Dinner,2
+28.17,6.5,Female,Yes,Sat,Dinner,3
+12.9,1.1,Female,Yes,Sat,Dinner,2
+28.15,3,Male,Yes,Sat,Dinner,5
+11.59,1.5,Male,Yes,Sat,Dinner,2
+7.74,1.44,Male,Yes,Sat,Dinner,2
+30.14,3.09,Female,Yes,Sat,Dinner,4
+12.16,2.2,Male,Yes,Fri,Lunch,2
+13.42,3.48,Female,Yes,Fri,Lunch,2
+8.58,1.92,Male,Yes,Fri,Lunch,1
+15.98,3,Female,No,Fri,Lunch,3
+13.42,1.58,Male,Yes,Fri,Lunch,2
+16.27,2.5,Female,Yes,Fri,Lunch,2
+10.09,2,Female,Yes,Fri,Lunch,2
+20.45,3,Male,No,Sat,Dinner,4
+13.28,2.72,Male,No,Sat,Dinner,2
+22.12,2.88,Female,Yes,Sat,Dinner,2
+24.01,2,Male,Yes,Sat,Dinner,4
+15.69,3,Male,Yes,Sat,Dinner,3
+11.61,3.39,Male,No,Sat,Dinner,2
+10.77,1.47,Male,No,Sat,Dinner,2
+15.53,3,Male,Yes,Sat,Dinner,2
+10.07,1.25,Male,No,Sat,Dinner,2
+12.6,1,Male,Yes,Sat,Dinner,2
+32.83,1.17,Male,Yes,Sat,Dinner,2
+35.83,4.67,Female,No,Sat,Dinner,3
+29.03,5.92,Male,No,Sat,Dinner,3
+27.18,2,Female,Yes,Sat,Dinner,2
+22.67,2,Male,Yes,Sat,Dinner,2
+17.82,1.75,Male,No,Sat,Dinner,2
+18.78,3,Female,No,Thur,Dinner,2
diff --git a/plotly/plotlykt-core/README.md b/plotly/plotlykt-core/README.md
new file mode 100644
index 00000000..da4cddad
--- /dev/null
+++ b/plotly/plotlykt-core/README.md
@@ -0,0 +1,21 @@
+# Module plotlykt-core
+
+
+
+## Usage
+
+## Artifact:
+
+The Maven coordinates of this project are `space.kscience:plotlykt-core:0.7.1`.
+
+**Gradle Kotlin DSL:**
+```kotlin
+repositories {
+ maven("https://repo.kotlin.link")
+ mavenCentral()
+}
+
+dependencies {
+ implementation("space.kscience:plotlykt-core:0.7.1")
+}
+```
diff --git a/plotly/plotlykt-core/api/plotlykt-core.api b/plotly/plotlykt-core/api/plotlykt-core.api
new file mode 100644
index 00000000..c36b0b65
--- /dev/null
+++ b/plotly/plotlykt-core/api/plotlykt-core.api
@@ -0,0 +1,3183 @@
+public final class space/kscience/plotly/BootstrapHeadersKt {
+ public static final fun getCdnBootstrap ()Lspace/kscience/plotly/PlotlyHtmlFragment;
+}
+
+public final class space/kscience/plotly/DfExtKt {
+ public static final fun numberGreaterThan (Lspace/kscience/dataforge/meta/Scheme;Ljava/lang/Number;Ljava/lang/Number;Lspace/kscience/dataforge/names/Name;)Lkotlin/properties/ReadWriteProperty;
+ public static synthetic fun numberGreaterThan$default (Lspace/kscience/dataforge/meta/Scheme;Ljava/lang/Number;Ljava/lang/Number;Lspace/kscience/dataforge/names/Name;ILjava/lang/Object;)Lkotlin/properties/ReadWriteProperty;
+ public static final fun numberInRange (Lspace/kscience/dataforge/meta/Scheme;Lkotlin/ranges/ClosedRange;Lspace/kscience/dataforge/names/Name;)Lkotlin/properties/ReadWriteProperty;
+ public static synthetic fun numberInRange$default (Lspace/kscience/dataforge/meta/Scheme;Lkotlin/ranges/ClosedRange;Lspace/kscience/dataforge/names/Name;ILjava/lang/Object;)Lkotlin/properties/ReadWriteProperty;
+}
+
+public final class space/kscience/plotly/FileExportKt {
+ public static final fun display (Lspace/kscience/plotly/Plotly;Lkotlin/jvm/functions/Function2;)V
+ public static final fun export (Lspace/kscience/plotly/Plot;Ljava/nio/file/Path;Lspace/kscience/plotly/OrcaFormat;)V
+ public static synthetic fun export$default (Lspace/kscience/plotly/Plot;Ljava/nio/file/Path;Lspace/kscience/plotly/OrcaFormat;ILjava/lang/Object;)V
+ public static final fun makeFile (Lspace/kscience/plotly/Plot;Ljava/nio/file/Path;ZLspace/kscience/plotly/ResourceLocation;Lspace/kscience/plotly/PlotlyConfig;)V
+ public static final fun makeFile (Lspace/kscience/plotly/PlotlyFragment;Ljava/nio/file/Path;ZLjava/lang/String;Lspace/kscience/plotly/ResourceLocation;Ljava/util/List;)V
+ public static final fun makeFile (Lspace/kscience/plotly/PlotlyPage;Ljava/nio/file/Path;Z)V
+ public static synthetic fun makeFile$default (Lspace/kscience/plotly/Plot;Ljava/nio/file/Path;ZLspace/kscience/plotly/ResourceLocation;Lspace/kscience/plotly/PlotlyConfig;ILjava/lang/Object;)V
+ public static synthetic fun makeFile$default (Lspace/kscience/plotly/PlotlyFragment;Ljava/nio/file/Path;ZLjava/lang/String;Lspace/kscience/plotly/ResourceLocation;Ljava/util/List;ILjava/lang/Object;)V
+ public static synthetic fun makeFile$default (Lspace/kscience/plotly/PlotlyPage;Ljava/nio/file/Path;ZILjava/lang/Object;)V
+ public static final fun selectFile (Ljavax/swing/filechooser/FileNameExtensionFilter;)Ljava/nio/file/Path;
+ public static synthetic fun selectFile$default (Ljavax/swing/filechooser/FileNameExtensionFilter;ILjava/lang/Object;)Ljava/nio/file/Path;
+}
+
+public final class space/kscience/plotly/HtmlKt {
+ public static final fun getCdnPlotlyHeader ()Lspace/kscience/plotly/PlotlyHtmlFragment;
+ public static final fun getMathJaxHeader ()Lspace/kscience/plotly/PlotlyHtmlFragment;
+ public static final fun plus (Lspace/kscience/plotly/PlotlyHtmlFragment;Lspace/kscience/plotly/PlotlyHtmlFragment;)Lspace/kscience/plotly/PlotlyHtmlFragment;
+ public static final fun toHTML (Lspace/kscience/plotly/Plot;[Lspace/kscience/plotly/PlotlyHtmlFragment;Lspace/kscience/plotly/PlotlyConfig;)Ljava/lang/String;
+ public static synthetic fun toHTML$default (Lspace/kscience/plotly/Plot;[Lspace/kscience/plotly/PlotlyHtmlFragment;Lspace/kscience/plotly/PlotlyConfig;ILjava/lang/Object;)Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/OrcaFormat : java/lang/Enum {
+ public static final field jpeg Lspace/kscience/plotly/OrcaFormat;
+ public static final field pdf Lspace/kscience/plotly/OrcaFormat;
+ public static final field png Lspace/kscience/plotly/OrcaFormat;
+ public static final field svg Lspace/kscience/plotly/OrcaFormat;
+ public static final field webp Lspace/kscience/plotly/OrcaFormat;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/OrcaFormat;
+ public static fun values ()[Lspace/kscience/plotly/OrcaFormat;
+}
+
+public final class space/kscience/plotly/Plot : space/kscience/dataforge/meta/Configurable, space/kscience/dataforge/meta/MetaRepr, space/kscience/dataforge/meta/descriptors/Described {
+ public static final field Companion Lspace/kscience/plotly/Plot$Companion;
+ public fun ()V
+ public fun (Lspace/kscience/dataforge/meta/ObservableMutableMeta;)V
+ public synthetic fun (Lspace/kscience/dataforge/meta/ObservableMutableMeta;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
+ public final fun addTrace (Lspace/kscience/plotly/models/Trace;)V
+ public final fun getData ()Ljava/util/List;
+ public fun getDescriptor ()Lspace/kscience/dataforge/meta/descriptors/MetaDescriptor;
+ public final fun getLayout ()Lspace/kscience/plotly/models/Layout;
+ public synthetic fun getMeta ()Lspace/kscience/dataforge/meta/MutableMeta;
+ public fun getMeta ()Lspace/kscience/dataforge/meta/ObservableMutableMeta;
+ public fun toMeta ()Lspace/kscience/dataforge/meta/Meta;
+ public final fun traces (Ljava/util/Collection;)V
+ public final fun traces ([Lspace/kscience/plotly/models/Trace;)V
+}
+
+public final class space/kscience/plotly/Plot$Companion {
+ public final fun getDescriptor ()Lspace/kscience/dataforge/meta/descriptors/MetaDescriptor;
+}
+
+public final class space/kscience/plotly/PlotExtensionsKt {
+ public static final fun bar (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Bar;
+ public static final fun box (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Box;
+ public static final fun candlestick (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/CandleStick;
+ public static final fun contour (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Contour;
+ public static final fun heatmap (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Heatmap;
+ public static final fun histogram (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Histogram;
+ public static final fun histogram2d (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Histogram2D;
+ public static final fun histogram2dcontour (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Histogram2DContour;
+ public static final fun pie (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Pie;
+ public static final fun scatter (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Scatter;
+ public static final fun shape (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)V
+ public static final fun table (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Table;
+ public static final fun text (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)V
+ public static final fun violin (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Violin;
+}
+
+public final class space/kscience/plotly/PlotKt {
+ public static final fun Plot (Lspace/kscience/dataforge/meta/Meta;)Lspace/kscience/plotly/Plot;
+ public static final fun layout (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)V
+ public static final fun toJsonString (Lspace/kscience/plotly/Plot;)Ljava/lang/String;
+ public static final fun trace (Lspace/kscience/plotly/Plot;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Trace;
+}
+
+public final class space/kscience/plotly/Plotly {
+ public static final field INSTANCE Lspace/kscience/plotly/Plotly;
+ public static final field PLOTLY_CDN Ljava/lang/String;
+ public static final field VERSION Ljava/lang/String;
+ public final fun getCoordinateNames ()Ljava/util/List;
+ public final fun plot (Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/Plot;
+}
+
+public final class space/kscience/plotly/PlotlyConfig : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/PlotlyConfig$Companion;
+ public fun ()V
+ public final fun getEditable ()Ljava/lang/Boolean;
+ public final fun getImageFormat ()Ljava/lang/String;
+ public final fun getPlotlyServerURL ()Ljava/lang/String;
+ public final fun getResponsive ()Ljava/lang/Boolean;
+ public final fun getShowEditInChartStudio ()Ljava/lang/Boolean;
+ public final fun saveAsSvg ()V
+ public final fun setEditable (Ljava/lang/Boolean;)V
+ public final fun setImageFormat (Ljava/lang/String;)V
+ public final fun setPlotlyServerURL (Ljava/lang/String;)V
+ public final fun setResponsive (Ljava/lang/Boolean;)V
+ public final fun setShowEditInChartStudio (Ljava/lang/Boolean;)V
+ public fun toString ()Ljava/lang/String;
+ public final fun withEditorButton ()V
+}
+
+public final class space/kscience/plotly/PlotlyConfig$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/PlotlyFragment {
+ public fun (Lkotlin/jvm/functions/Function2;)V
+ public final fun getRender ()Lkotlin/jvm/functions/Function2;
+}
+
+public final class space/kscience/plotly/PlotlyHeadersKt {
+ public static final fun localCssHeader (Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/lang/String;)Lspace/kscience/plotly/PlotlyHtmlFragment;
+ public static final fun localScriptHeader (Ljava/nio/file/Path;Ljava/nio/file/Path;Ljava/lang/String;)Lspace/kscience/plotly/PlotlyHtmlFragment;
+}
+
+public final class space/kscience/plotly/PlotlyHtmlFragment {
+ public fun (Lkotlin/jvm/functions/Function1;)V
+ public final fun getVisit ()Lkotlin/jvm/functions/Function1;
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/PlotlyKt {
+ public static final fun toJsonString (Ljava/util/List;)Ljava/lang/String;
+ public static final fun toJsonString (Lspace/kscience/dataforge/meta/Scheme;)Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/PlotlyPage {
+ public fun (Ljava/util/Collection;Lspace/kscience/plotly/PlotlyFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;)V
+ public synthetic fun (Ljava/util/Collection;Lspace/kscience/plotly/PlotlyFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
+ public final fun component1 ()Ljava/util/Collection;
+ public final fun component2 ()Lspace/kscience/plotly/PlotlyFragment;
+ public final fun component3 ()Ljava/lang/String;
+ public final fun component4 ()Lspace/kscience/plotly/PlotlyRenderer;
+ public final fun copy (Ljava/util/Collection;Lspace/kscience/plotly/PlotlyFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;)Lspace/kscience/plotly/PlotlyPage;
+ public static synthetic fun copy$default (Lspace/kscience/plotly/PlotlyPage;Ljava/util/Collection;Lspace/kscience/plotly/PlotlyFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;ILjava/lang/Object;)Lspace/kscience/plotly/PlotlyPage;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getFragment ()Lspace/kscience/plotly/PlotlyFragment;
+ public final fun getHeaders ()Ljava/util/Collection;
+ public final fun getRenderer ()Lspace/kscience/plotly/PlotlyRenderer;
+ public final fun getTitle ()Ljava/lang/String;
+ public fun hashCode ()I
+ public final fun render ()Ljava/lang/String;
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/PlotlyPageKt {
+ public static final fun fragment (Lspace/kscience/plotly/Plotly;Lkotlin/jvm/functions/Function2;)Lspace/kscience/plotly/PlotlyFragment;
+ public static final fun page (Lspace/kscience/plotly/Plotly;[Lspace/kscience/plotly/PlotlyHtmlFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;Lkotlin/jvm/functions/Function2;)Lspace/kscience/plotly/PlotlyPage;
+ public static synthetic fun page$default (Lspace/kscience/plotly/Plotly;[Lspace/kscience/plotly/PlotlyHtmlFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lspace/kscience/plotly/PlotlyPage;
+ public static final fun toPage (Lspace/kscience/plotly/Plot;[Lspace/kscience/plotly/PlotlyHtmlFragment;Lspace/kscience/plotly/PlotlyConfig;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;)Lspace/kscience/plotly/PlotlyPage;
+ public static final fun toPage (Lspace/kscience/plotly/PlotlyFragment;[Lspace/kscience/plotly/PlotlyHtmlFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;)Lspace/kscience/plotly/PlotlyPage;
+ public static synthetic fun toPage$default (Lspace/kscience/plotly/Plot;[Lspace/kscience/plotly/PlotlyHtmlFragment;Lspace/kscience/plotly/PlotlyConfig;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;ILjava/lang/Object;)Lspace/kscience/plotly/PlotlyPage;
+ public static synthetic fun toPage$default (Lspace/kscience/plotly/PlotlyFragment;[Lspace/kscience/plotly/PlotlyHtmlFragment;Ljava/lang/String;Lspace/kscience/plotly/PlotlyRenderer;ILjava/lang/Object;)Lspace/kscience/plotly/PlotlyPage;
+}
+
+public abstract interface class space/kscience/plotly/PlotlyRenderer {
+ public abstract fun renderPlot (Lkotlinx/html/FlowContent;Lspace/kscience/plotly/Plot;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;)Lspace/kscience/plotly/Plot;
+ public static synthetic fun renderPlot$default (Lspace/kscience/plotly/PlotlyRenderer;Lkotlinx/html/FlowContent;Lspace/kscience/plotly/Plot;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;ILjava/lang/Object;)Lspace/kscience/plotly/Plot;
+}
+
+public final class space/kscience/plotly/PlotlyRendererKt {
+ public static final fun plot (Lkotlinx/html/FlowContent;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;Lspace/kscience/plotly/PlotlyRenderer;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/Plot;
+ public static final fun plot (Lkotlinx/html/FlowContent;Lspace/kscience/plotly/Plot;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;Lspace/kscience/plotly/PlotlyRenderer;)Lspace/kscience/plotly/Plot;
+ public static synthetic fun plot$default (Lkotlinx/html/FlowContent;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;Lspace/kscience/plotly/PlotlyRenderer;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lspace/kscience/plotly/Plot;
+ public static synthetic fun plot$default (Lkotlinx/html/FlowContent;Lspace/kscience/plotly/Plot;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;Lspace/kscience/plotly/PlotlyRenderer;ILjava/lang/Object;)Lspace/kscience/plotly/Plot;
+}
+
+public final class space/kscience/plotly/ResourceLocation : java/lang/Enum {
+ public static final field EMBED Lspace/kscience/plotly/ResourceLocation;
+ public static final field LOCAL Lspace/kscience/plotly/ResourceLocation;
+ public static final field REMOTE Lspace/kscience/plotly/ResourceLocation;
+ public static final field SYSTEM Lspace/kscience/plotly/ResourceLocation;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/ResourceLocation;
+ public static fun values ()[Lspace/kscience/plotly/ResourceLocation;
+}
+
+public final class space/kscience/plotly/StaticPlotlyRenderer : space/kscience/plotly/PlotlyRenderer {
+ public static final field INSTANCE Lspace/kscience/plotly/StaticPlotlyRenderer;
+ public fun renderPlot (Lkotlinx/html/FlowContent;Lspace/kscience/plotly/Plot;Ljava/lang/String;Lspace/kscience/plotly/PlotlyConfig;)Lspace/kscience/plotly/Plot;
+}
+
+public abstract interface annotation class space/kscience/plotly/UnstablePlotlyAPI : java/lang/annotation/Annotation {
+}
+
+public abstract interface annotation class space/kscience/plotly/UnsupportedPlotlyAPI : java/lang/annotation/Annotation {
+}
+
+public final class space/kscience/plotly/events/PlotlyEvent {
+ public fun (Ljava/util/List;)V
+ public final fun component1 ()Ljava/util/List;
+ public final fun copy (Ljava/util/List;)Lspace/kscience/plotly/events/PlotlyEvent;
+ public static synthetic fun copy$default (Lspace/kscience/plotly/events/PlotlyEvent;Ljava/util/List;ILjava/lang/Object;)Lspace/kscience/plotly/events/PlotlyEvent;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getPoints ()Ljava/util/List;
+ public fun hashCode ()I
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/events/PlotlyEventListenerType : java/lang/Enum {
+ public static final field CLICK Lspace/kscience/plotly/events/PlotlyEventListenerType;
+ public static final field HOVER Lspace/kscience/plotly/events/PlotlyEventListenerType;
+ public static final field SELECTED Lspace/kscience/plotly/events/PlotlyEventListenerType;
+ public static final field SELECTING Lspace/kscience/plotly/events/PlotlyEventListenerType;
+ public static final field UNHOVER Lspace/kscience/plotly/events/PlotlyEventListenerType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public final fun getEventType ()Ljava/lang/String;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/events/PlotlyEventListenerType;
+ public static fun values ()[Lspace/kscience/plotly/events/PlotlyEventListenerType;
+}
+
+public final class space/kscience/plotly/events/PlotlyEventPoint {
+ public fun (ILkotlinx/serialization/json/JsonElement;Ljava/lang/Integer;Lspace/kscience/dataforge/meta/Value;Lspace/kscience/dataforge/meta/Value;)V
+ public synthetic fun (ILkotlinx/serialization/json/JsonElement;Ljava/lang/Integer;Lspace/kscience/dataforge/meta/Value;Lspace/kscience/dataforge/meta/Value;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
+ public final fun component1 ()I
+ public final fun component2 ()Lkotlinx/serialization/json/JsonElement;
+ public final fun component3 ()Ljava/lang/Integer;
+ public final fun component4 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun component5 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun copy (ILkotlinx/serialization/json/JsonElement;Ljava/lang/Integer;Lspace/kscience/dataforge/meta/Value;Lspace/kscience/dataforge/meta/Value;)Lspace/kscience/plotly/events/PlotlyEventPoint;
+ public static synthetic fun copy$default (Lspace/kscience/plotly/events/PlotlyEventPoint;ILkotlinx/serialization/json/JsonElement;Ljava/lang/Integer;Lspace/kscience/dataforge/meta/Value;Lspace/kscience/dataforge/meta/Value;ILjava/lang/Object;)Lspace/kscience/plotly/events/PlotlyEventPoint;
+ public fun equals (Ljava/lang/Object;)Z
+ public final fun getCurveNumber ()I
+ public final fun getData ()Lkotlinx/serialization/json/JsonElement;
+ public final fun getPointNumber ()Ljava/lang/Integer;
+ public final fun getX ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getY ()Lspace/kscience/dataforge/meta/Value;
+ public fun hashCode ()I
+ public fun toString ()Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/models/Axis : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Axis$Companion;
+ public fun ()V
+ public final fun getAnchor ()Ljava/lang/String;
+ public final fun getAutomargin ()Ljava/lang/Boolean;
+ public final fun getAutorange ()Z
+ public final fun getAutotick ()Ljava/lang/Boolean;
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getDtick ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getGridcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getGridwidth ()Ljava/lang/Number;
+ public final fun getLinecolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getLinewidth ()Ljava/lang/Number;
+ public final fun getOverlaying ()Ljava/lang/String;
+ public final fun getPosition ()Ljava/lang/Number;
+ public final fun getRange ()Lkotlin/ranges/ClosedFloatingPointRange;
+ public final fun getShowgrid ()Ljava/lang/Boolean;
+ public final fun getShowline ()Ljava/lang/Boolean;
+ public final fun getShowticklabels ()Ljava/lang/Boolean;
+ public final fun getSide ()Lspace/kscience/plotly/models/AxisSide;
+ public final fun getTickangle ()Ljava/lang/Number;
+ public final fun getTickcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getTickfont ()Lspace/kscience/plotly/models/Font;
+ public final fun getTicklen ()Ljava/lang/Number;
+ public final fun getTickmode ()Lspace/kscience/plotly/models/TickMode;
+ public final fun getTicks ()Lspace/kscience/plotly/models/Ticks;
+ public final fun getTicktext ()Ljava/util/List;
+ public final fun getTickvals ()Ljava/util/List;
+ public final fun getTickwidth ()Ljava/lang/Number;
+ public final fun getTitle ()Ljava/lang/String;
+ public final fun getType ()Lspace/kscience/plotly/models/AxisType;
+ public final fun getVisible ()Ljava/lang/Boolean;
+ public final fun getZeroline ()Ljava/lang/Boolean;
+ public final fun getZerolinecolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getZerolinewidth ()Ljava/lang/Number;
+ public final fun range (Lkotlin/ranges/ClosedFloatingPointRange;)V
+ public final fun range (Lkotlin/ranges/ClosedRange;)V
+ public final fun range (Lspace/kscience/dataforge/meta/Value;Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setAnchor (Ljava/lang/String;)V
+ public final fun setAutomargin (Ljava/lang/Boolean;)V
+ public final fun setAutorange (Z)V
+ public final fun setAutotick (Ljava/lang/Boolean;)V
+ public final fun setDtick (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setGridwidth (Ljava/lang/Number;)V
+ public final fun setLinewidth (Ljava/lang/Number;)V
+ public final fun setOverlaying (Ljava/lang/String;)V
+ public final fun setPosition (Ljava/lang/Number;)V
+ public final fun setRange (Lkotlin/ranges/ClosedFloatingPointRange;)V
+ public final fun setShowgrid (Ljava/lang/Boolean;)V
+ public final fun setShowline (Ljava/lang/Boolean;)V
+ public final fun setShowticklabels (Ljava/lang/Boolean;)V
+ public final fun setSide (Lspace/kscience/plotly/models/AxisSide;)V
+ public final fun setTickangle (Ljava/lang/Number;)V
+ public final fun setTickfont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setTicklen (Ljava/lang/Number;)V
+ public final fun setTickmode (Lspace/kscience/plotly/models/TickMode;)V
+ public final fun setTicks (Lspace/kscience/plotly/models/Ticks;)V
+ public final fun setTicktext (Ljava/util/List;)V
+ public final fun setTickvals (Ljava/util/List;)V
+ public final fun setTickwidth (Ljava/lang/Number;)V
+ public final fun setTitle (Ljava/lang/String;)V
+ public final fun setType (Lspace/kscience/plotly/models/AxisType;)V
+ public final fun setVisible (Ljava/lang/Boolean;)V
+ public final fun setZeroline (Ljava/lang/Boolean;)V
+ public final fun setZerolinewidth (Ljava/lang/Number;)V
+ public final fun tickfont (Lkotlin/jvm/functions/Function1;)V
+ public final fun ticktext (Ljava/lang/Iterable;)V
+ public final fun tickvals (Ljava/lang/Iterable;)V
+ public final fun title (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/Axis$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/AxisSide : java/lang/Enum {
+ public static final field bottom Lspace/kscience/plotly/models/AxisSide;
+ public static final field left Lspace/kscience/plotly/models/AxisSide;
+ public static final field right Lspace/kscience/plotly/models/AxisSide;
+ public static final field top Lspace/kscience/plotly/models/AxisSide;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/AxisSide;
+ public static fun values ()[Lspace/kscience/plotly/models/AxisSide;
+}
+
+public final class space/kscience/plotly/models/AxisType : java/lang/Enum {
+ public static final field - Lspace/kscience/plotly/models/AxisType;
+ public static final field category Lspace/kscience/plotly/models/AxisType;
+ public static final field date Lspace/kscience/plotly/models/AxisType;
+ public static final field linear Lspace/kscience/plotly/models/AxisType;
+ public static final field log Lspace/kscience/plotly/models/AxisType;
+ public static final field multicategory Lspace/kscience/plotly/models/AxisType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/AxisType;
+ public static fun values ()[Lspace/kscience/plotly/models/AxisType;
+}
+
+public final class space/kscience/plotly/models/Bar : space/kscience/plotly/models/Trace, space/kscience/plotly/models/SelectedPoints {
+ public static final field Companion Lspace/kscience/plotly/models/Bar$Companion;
+ public fun ()V
+ public final fun getBase ()Ljava/util/List;
+ public final fun getConstraintext ()Lspace/kscience/plotly/models/ConstrainText;
+ public final fun getOffset ()Ljava/lang/Number;
+ public final fun getOffsetsList ()Ljava/util/List;
+ public fun getSelected ()Lspace/kscience/plotly/models/SelectPoints;
+ public fun getSelectedpoints ()Ljava/util/List;
+ public fun getUnselected ()Lspace/kscience/plotly/models/SelectPoints;
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun getWidthList ()Ljava/util/List;
+ public final fun selected (Lkotlin/jvm/functions/Function1;)V
+ public final fun setBase (Ljava/util/List;)V
+ public final fun setConstraintext (Lspace/kscience/plotly/models/ConstrainText;)V
+ public final fun setOffset (Ljava/lang/Number;)V
+ public final fun setOffsetsList (Ljava/util/List;)V
+ public fun setSelected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public fun setSelectedpoints (Ljava/util/List;)V
+ public fun setUnselected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public final fun setWidth (Ljava/lang/Number;)V
+ public final fun setWidthList (Ljava/util/List;)V
+ public final fun unselected (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/Bar$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/BarMode : java/lang/Enum {
+ public static final field group Lspace/kscience/plotly/models/BarMode;
+ public static final field overlay Lspace/kscience/plotly/models/BarMode;
+ public static final field relative Lspace/kscience/plotly/models/BarMode;
+ public static final field stack Lspace/kscience/plotly/models/BarMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/BarMode;
+ public static fun values ()[Lspace/kscience/plotly/models/BarMode;
+}
+
+public final class space/kscience/plotly/models/BarNorm : java/lang/Enum {
+ public static final field "" Lspace/kscience/plotly/models/BarNorm;
+ public static final field fraction Lspace/kscience/plotly/models/BarNorm;
+ public static final field percent Lspace/kscience/plotly/models/BarNorm;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/BarNorm;
+ public static fun values ()[Lspace/kscience/plotly/models/BarNorm;
+}
+
+public final class space/kscience/plotly/models/Bins : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Bins$Companion;
+ public fun ()V
+ public final fun getEnd ()Ljava/lang/Number;
+ public final fun getSize ()Ljava/lang/Number;
+ public final fun getStart ()Ljava/lang/Number;
+ public final fun setEnd (Ljava/lang/Number;)V
+ public final fun setSize (Ljava/lang/Number;)V
+ public final fun setStart (Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/Bins$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Box : space/kscience/plotly/models/Trace, space/kscience/plotly/models/SelectedPoints {
+ public static final field Companion Lspace/kscience/plotly/models/Box$Companion;
+ public fun ()V
+ public final fun getBoxmean ()Lspace/kscience/plotly/models/BoxMean;
+ public final fun getBoxpoints ()Lspace/kscience/plotly/models/BoxPoints;
+ public final fun getHoveron ()Lspace/kscience/plotly/models/BoxHoveron;
+ public final fun getJitter ()D
+ public final fun getLowerfence ()Ljava/util/List;
+ public final fun getMean ()Ljava/util/List;
+ public final fun getMedian ()Ljava/util/List;
+ public final fun getNotched ()Ljava/lang/Boolean;
+ public final fun getNotchspan ()Ljava/util/List;
+ public final fun getNotchwidth ()D
+ public final fun getPointpos ()D
+ public final fun getQ1 ()Ljava/util/List;
+ public final fun getQ3 ()Ljava/util/List;
+ public final fun getQuartilemethod ()Lspace/kscience/plotly/models/QuartileMethod;
+ public final fun getSd ()Ljava/util/List;
+ public fun getSelected ()Lspace/kscience/plotly/models/SelectPoints;
+ public fun getSelectedpoints ()Ljava/util/List;
+ public fun getUnselected ()Lspace/kscience/plotly/models/SelectPoints;
+ public final fun getUpperfence ()Ljava/util/List;
+ public final fun getWhiskerwidth ()D
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun lowerfence (Ljava/lang/Iterable;)V
+ public final fun mean (Ljava/lang/Iterable;)V
+ public final fun median (Ljava/lang/Iterable;)V
+ public final fun notchspan (Ljava/lang/Iterable;)V
+ public final fun q1 (Ljava/lang/Iterable;)V
+ public final fun q3 (Ljava/lang/Iterable;)V
+ public final fun sd (Ljava/lang/Iterable;)V
+ public final fun selected (Lkotlin/jvm/functions/Function1;)V
+ public final fun setBoxmean (Lspace/kscience/plotly/models/BoxMean;)V
+ public final fun setBoxpoints (Lspace/kscience/plotly/models/BoxPoints;)V
+ public final fun setHoveron (Lspace/kscience/plotly/models/BoxHoveron;)V
+ public final fun setJitter (D)V
+ public final fun setLowerfence (Ljava/util/List;)V
+ public final fun setMean (Ljava/util/List;)V
+ public final fun setMedian (Ljava/util/List;)V
+ public final fun setNotched (Ljava/lang/Boolean;)V
+ public final fun setNotchspan (Ljava/util/List;)V
+ public final fun setNotchwidth (D)V
+ public final fun setPointpos (D)V
+ public final fun setQ1 (Ljava/util/List;)V
+ public final fun setQ3 (Ljava/util/List;)V
+ public final fun setQuartilemethod (Lspace/kscience/plotly/models/QuartileMethod;)V
+ public final fun setSd (Ljava/util/List;)V
+ public fun setSelected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public fun setSelectedpoints (Ljava/util/List;)V
+ public fun setUnselected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public final fun setUpperfence (Ljava/util/List;)V
+ public final fun setWhiskerwidth (D)V
+ public final fun setWidth (Ljava/lang/Number;)V
+ public final fun unselected (Lkotlin/jvm/functions/Function1;)V
+ public final fun upperfence (Ljava/lang/Iterable;)V
+}
+
+public final class space/kscience/plotly/models/Box$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/BoxHoveron : java/lang/Enum {
+ public static final field boxes Lspace/kscience/plotly/models/BoxHoveron;
+ public static final field boxes+points Lspace/kscience/plotly/models/BoxHoveron;
+ public static final field points Lspace/kscience/plotly/models/BoxHoveron;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/BoxHoveron;
+ public static fun values ()[Lspace/kscience/plotly/models/BoxHoveron;
+}
+
+public final class space/kscience/plotly/models/BoxMean : java/lang/Enum {
+ public static final field false Lspace/kscience/plotly/models/BoxMean;
+ public static final field sd Lspace/kscience/plotly/models/BoxMean;
+ public static final field true Lspace/kscience/plotly/models/BoxMean;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/BoxMean;
+ public static fun values ()[Lspace/kscience/plotly/models/BoxMean;
+}
+
+public final class space/kscience/plotly/models/BoxMode : java/lang/Enum {
+ public static final field group Lspace/kscience/plotly/models/BoxMode;
+ public static final field overlay Lspace/kscience/plotly/models/BoxMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/BoxMode;
+ public static fun values ()[Lspace/kscience/plotly/models/BoxMode;
+}
+
+public final class space/kscience/plotly/models/BoxPoints : java/lang/Enum {
+ public static final field all Lspace/kscience/plotly/models/BoxPoints;
+ public static final field false Lspace/kscience/plotly/models/BoxPoints;
+ public static final field outliers Lspace/kscience/plotly/models/BoxPoints;
+ public static final field suspectedoutliers Lspace/kscience/plotly/models/BoxPoints;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/BoxPoints;
+ public static fun values ()[Lspace/kscience/plotly/models/BoxPoints;
+}
+
+public final class space/kscience/plotly/models/Calendar : java/lang/Enum {
+ public static final field chinese Lspace/kscience/plotly/models/Calendar;
+ public static final field coptic Lspace/kscience/plotly/models/Calendar;
+ public static final field discworld Lspace/kscience/plotly/models/Calendar;
+ public static final field ethiopian Lspace/kscience/plotly/models/Calendar;
+ public static final field gregorian Lspace/kscience/plotly/models/Calendar;
+ public static final field hebrew Lspace/kscience/plotly/models/Calendar;
+ public static final field islamic Lspace/kscience/plotly/models/Calendar;
+ public static final field jalali Lspace/kscience/plotly/models/Calendar;
+ public static final field julian Lspace/kscience/plotly/models/Calendar;
+ public static final field mayan Lspace/kscience/plotly/models/Calendar;
+ public static final field nanakshahi Lspace/kscience/plotly/models/Calendar;
+ public static final field nepali Lspace/kscience/plotly/models/Calendar;
+ public static final field persian Lspace/kscience/plotly/models/Calendar;
+ public static final field taiwan Lspace/kscience/plotly/models/Calendar;
+ public static final field thai Lspace/kscience/plotly/models/Calendar;
+ public static final field ummalqura Lspace/kscience/plotly/models/Calendar;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Calendar;
+ public static fun values ()[Lspace/kscience/plotly/models/Calendar;
+}
+
+public final class space/kscience/plotly/models/CandleStick : space/kscience/plotly/models/Trace {
+ public static final field Companion Lspace/kscience/plotly/models/CandleStick$Companion;
+ public fun ()V
+ public final fun getCandleStickMeta ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getClose ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getDecreasing ()Lspace/kscience/plotly/models/CandleStickLine;
+ public final fun getHigh ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getIds ()Ljava/util/List;
+ public final fun getIncreasing ()Lspace/kscience/plotly/models/CandleStickLine;
+ public final fun getLineWidth ()D
+ public final fun getLow ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getOpen ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getWhiskerwidth ()D
+ public final fun getXaxis ()Ljava/lang/String;
+ public final fun getXperiod ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getXperiod0 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getXperiodalignment ()Lspace/kscience/plotly/models/XPeriodAlignment;
+ public final fun getYaxis ()Ljava/lang/String;
+ public final fun setCandleStickMeta (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setDecreasing (Lspace/kscience/plotly/models/CandleStickLine;)V
+ public final fun setIds (Ljava/util/List;)V
+ public final fun setIncreasing (Lspace/kscience/plotly/models/CandleStickLine;)V
+ public final fun setLineWidth (D)V
+ public final fun setWhiskerwidth (D)V
+ public final fun setXaxis (Ljava/lang/String;)V
+ public final fun setXperiod (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setXperiod0 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setXperiodalignment (Lspace/kscience/plotly/models/XPeriodAlignment;)V
+ public final fun setYaxis (Ljava/lang/String;)V
+}
+
+public final class space/kscience/plotly/models/CandleStick$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/CandleStickLine : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/CandleStickLine$Companion;
+ public fun ()V
+ public final fun getFillcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getLineColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getLineWidth ()D
+ public final fun setLineWidth (D)V
+}
+
+public final class space/kscience/plotly/models/CandleStickLine$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Cells : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Cells$Companion;
+ public fun ()V
+ public final fun align (Ljava/util/List;)V
+ public final fun align (Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun align ([Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun fill (Lkotlin/jvm/functions/Function1;)V
+ public final fun font (Lkotlin/jvm/functions/Function1;)V
+ public final fun getAlign ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getFill ()Lspace/kscience/plotly/models/Fill;
+ public final fun getFont ()Lspace/kscience/plotly/models/Font;
+ public final fun getHeight ()Ljava/lang/Number;
+ public final fun getLine ()Lspace/kscience/plotly/models/LayoutLine;
+ public final fun getValues ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun line (Lkotlin/jvm/functions/Function1;)V
+ public final fun setAlign (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun setFill (Lspace/kscience/plotly/models/Fill;)V
+ public final fun setFont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setHeight (Ljava/lang/Number;)V
+ public final fun setLine (Lspace/kscience/plotly/models/LayoutLine;)V
+ public final fun setValues (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun values (Ljava/lang/Iterable;)V
+}
+
+public final class space/kscience/plotly/models/Cells$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Color {
+ public final fun getString ()Ljava/lang/String;
+ public final fun getValue ()Lspace/kscience/dataforge/meta/Value;
+ public final fun invoke (Ljava/lang/Number;)V
+ public final fun invoke (Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;)V
+ public final fun invoke (Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;)V
+ public final fun invoke (Ljava/lang/String;)V
+ public final fun setString (Ljava/lang/String;)V
+ public final fun setValue (Lspace/kscience/dataforge/meta/Value;)V
+}
+
+public final class space/kscience/plotly/models/ColorBar : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/ColorBar$Companion;
+ public fun ()V
+ public final fun getBgcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getBordercolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getBorderwidth ()Ljava/lang/Number;
+ public final fun getConstraintext ()Lspace/kscience/plotly/models/ConstrainText;
+ public final fun getLen ()Ljava/lang/Number;
+ public final fun getLenmode ()Lspace/kscience/plotly/models/MeasureMode;
+ public final fun getOutlinecolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getOutlinewidth ()Ljava/lang/Number;
+ public final fun getThickness ()Ljava/lang/Number;
+ public final fun getThicknessmode ()Lspace/kscience/plotly/models/MeasureMode;
+ public final fun getTickfont ()Lspace/kscience/plotly/models/Font;
+ public final fun getTitle ()Lspace/kscience/plotly/models/Title;
+ public final fun getX ()Ljava/lang/Number;
+ public final fun getXanchor ()Lspace/kscience/plotly/models/XAnchor;
+ public final fun getXpad ()Ljava/lang/Number;
+ public final fun getY ()Ljava/lang/Number;
+ public final fun getYanchor ()Lspace/kscience/plotly/models/YAnchor;
+ public final fun getYpad ()I
+ public final fun setBorderwidth (Ljava/lang/Number;)V
+ public final fun setConstraintext (Lspace/kscience/plotly/models/ConstrainText;)V
+ public final fun setLen (Ljava/lang/Number;)V
+ public final fun setLenmode (Lspace/kscience/plotly/models/MeasureMode;)V
+ public final fun setOutlinewidth (Ljava/lang/Number;)V
+ public final fun setThickness (Ljava/lang/Number;)V
+ public final fun setThicknessmode (Lspace/kscience/plotly/models/MeasureMode;)V
+ public final fun setTickfont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setTitle (Lspace/kscience/plotly/models/Title;)V
+ public final fun setX (Ljava/lang/Number;)V
+ public final fun setXanchor (Lspace/kscience/plotly/models/XAnchor;)V
+ public final fun setXpad (Ljava/lang/Number;)V
+ public final fun setY (Ljava/lang/Number;)V
+ public final fun setYanchor (Lspace/kscience/plotly/models/YAnchor;)V
+ public final fun setYpad (I)V
+ public final fun tickfont (Lkotlin/jvm/functions/Function1;)V
+ public final fun title (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/ColorBar$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ColorKt {
+ public static final fun color (Lspace/kscience/dataforge/meta/Scheme;Lspace/kscience/dataforge/names/Name;)Lkotlin/properties/ReadOnlyProperty;
+ public static synthetic fun color$default (Lspace/kscience/dataforge/meta/Scheme;Lspace/kscience/dataforge/names/Name;ILjava/lang/Object;)Lkotlin/properties/ReadOnlyProperty;
+}
+
+public final class space/kscience/plotly/models/ConstrainText : java/lang/Enum {
+ public static final field both Lspace/kscience/plotly/models/ConstrainText;
+ public static final field inside Lspace/kscience/plotly/models/ConstrainText;
+ public static final field none Lspace/kscience/plotly/models/ConstrainText;
+ public static final field outside Lspace/kscience/plotly/models/ConstrainText;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ConstrainText;
+ public static fun values ()[Lspace/kscience/plotly/models/ConstrainText;
+}
+
+public final class space/kscience/plotly/models/Contour : space/kscience/plotly/models/Trace, space/kscience/plotly/models/ContourSpec, space/kscience/plotly/models/HeatmapContour {
+ public static final field Companion Lspace/kscience/plotly/models/Contour$Companion;
+ public fun ()V
+ public final fun contours (Lkotlin/jvm/functions/Function1;)V
+ public fun getAutocontour ()Ljava/lang/Boolean;
+ public fun getContours ()Lspace/kscience/plotly/models/Contours;
+ public fun getNcontours ()I
+ public fun getXtype ()Lspace/kscience/plotly/models/DataType;
+ public fun getYtype ()Lspace/kscience/plotly/models/DataType;
+ public fun setAutocontour (Ljava/lang/Boolean;)V
+ public fun setContours (Lspace/kscience/plotly/models/Contours;)V
+ public fun setNcontours (I)V
+ public fun setXtype (Lspace/kscience/plotly/models/DataType;)V
+ public fun setYtype (Lspace/kscience/plotly/models/DataType;)V
+}
+
+public final class space/kscience/plotly/models/Contour$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public abstract interface class space/kscience/plotly/models/ContourSpec {
+ public abstract fun getAutocontour ()Ljava/lang/Boolean;
+ public abstract fun getContours ()Lspace/kscience/plotly/models/Contours;
+ public abstract fun getNcontours ()I
+ public abstract fun setAutocontour (Ljava/lang/Boolean;)V
+ public abstract fun setContours (Lspace/kscience/plotly/models/Contours;)V
+ public abstract fun setNcontours (I)V
+}
+
+public final class space/kscience/plotly/models/Contours : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Contours$Companion;
+ public fun ()V
+ public final fun getColoring ()Lspace/kscience/plotly/models/ContoursColoring;
+ public final fun getEnd ()Ljava/lang/Number;
+ public final fun getLabelfont ()Lspace/kscience/plotly/models/Font;
+ public final fun getShowlabels ()Ljava/lang/Boolean;
+ public final fun getShowlines ()Ljava/lang/Boolean;
+ public final fun getSize ()Ljava/lang/Number;
+ public final fun getStart ()Ljava/lang/Number;
+ public final fun getType ()Lspace/kscience/plotly/models/ContoursType;
+ public final fun labelfont (Lkotlin/jvm/functions/Function1;)V
+ public final fun setColoring (Lspace/kscience/plotly/models/ContoursColoring;)V
+ public final fun setEnd (Ljava/lang/Number;)V
+ public final fun setLabelfont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setShowlabels (Ljava/lang/Boolean;)V
+ public final fun setShowlines (Ljava/lang/Boolean;)V
+ public final fun setSize (Ljava/lang/Number;)V
+ public final fun setStart (Ljava/lang/Number;)V
+ public final fun setType (Lspace/kscience/plotly/models/ContoursType;)V
+}
+
+public final class space/kscience/plotly/models/Contours$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ContoursColoring : java/lang/Enum {
+ public static final field fill Lspace/kscience/plotly/models/ContoursColoring;
+ public static final field heatmap Lspace/kscience/plotly/models/ContoursColoring;
+ public static final field lines Lspace/kscience/plotly/models/ContoursColoring;
+ public static final field none Lspace/kscience/plotly/models/ContoursColoring;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ContoursColoring;
+ public static fun values ()[Lspace/kscience/plotly/models/ContoursColoring;
+}
+
+public final class space/kscience/plotly/models/ContoursType : java/lang/Enum {
+ public static final field constraint Lspace/kscience/plotly/models/ContoursType;
+ public static final field levels Lspace/kscience/plotly/models/ContoursType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ContoursType;
+ public static fun values ()[Lspace/kscience/plotly/models/ContoursType;
+}
+
+public final class space/kscience/plotly/models/Cumulative : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Cumulative$Companion;
+ public fun ()V
+ public final fun getCurrentbin ()Lspace/kscience/plotly/models/CurrentBin;
+ public final fun getEnabled ()Ljava/lang/Boolean;
+ public final fun setCurrentbin (Lspace/kscience/plotly/models/CurrentBin;)V
+ public final fun setEnabled (Ljava/lang/Boolean;)V
+}
+
+public final class space/kscience/plotly/models/Cumulative$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/CurrentBin : java/lang/Enum {
+ public static final field exclude Lspace/kscience/plotly/models/CurrentBin;
+ public static final field half Lspace/kscience/plotly/models/CurrentBin;
+ public static final field include Lspace/kscience/plotly/models/CurrentBin;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/CurrentBin;
+ public static fun values ()[Lspace/kscience/plotly/models/CurrentBin;
+}
+
+public final class space/kscience/plotly/models/Dash : java/lang/Enum {
+ public static final field dash Lspace/kscience/plotly/models/Dash;
+ public static final field dashdot Lspace/kscience/plotly/models/Dash;
+ public static final field dot Lspace/kscience/plotly/models/Dash;
+ public static final field longdash Lspace/kscience/plotly/models/Dash;
+ public static final field longdashdot Lspace/kscience/plotly/models/Dash;
+ public static final field solid Lspace/kscience/plotly/models/Dash;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Dash;
+ public static fun values ()[Lspace/kscience/plotly/models/Dash;
+}
+
+public final class space/kscience/plotly/models/DataType : java/lang/Enum {
+ public static final field array Lspace/kscience/plotly/models/DataType;
+ public static final field scaled Lspace/kscience/plotly/models/DataType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/DataType;
+ public static fun values ()[Lspace/kscience/plotly/models/DataType;
+}
+
+public final class space/kscience/plotly/models/Domain : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Domain$Companion;
+ public fun ()V
+ public final fun getColumn ()I
+ public final fun getRow ()I
+ public final fun getX ()Ljava/util/List;
+ public final fun getY ()Ljava/util/List;
+ public final fun setColumn (I)V
+ public final fun setRow (I)V
+ public final fun setX (Ljava/util/List;)V
+ public final fun setY (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/Domain$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/DragMode : java/lang/Enum {
+ public static final field drawcircle Lspace/kscience/plotly/models/DragMode;
+ public static final field drawclosedpath Lspace/kscience/plotly/models/DragMode;
+ public static final field drawline Lspace/kscience/plotly/models/DragMode;
+ public static final field drawopenpath Lspace/kscience/plotly/models/DragMode;
+ public static final field drawrect Lspace/kscience/plotly/models/DragMode;
+ public static final field false Lspace/kscience/plotly/models/DragMode;
+ public static final field lasso Lspace/kscience/plotly/models/DragMode;
+ public static final field orbit Lspace/kscience/plotly/models/DragMode;
+ public static final field pan Lspace/kscience/plotly/models/DragMode;
+ public static final field select Lspace/kscience/plotly/models/DragMode;
+ public static final field turntable Lspace/kscience/plotly/models/DragMode;
+ public static final field zoom Lspace/kscience/plotly/models/DragMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/DragMode;
+ public static fun values ()[Lspace/kscience/plotly/models/DragMode;
+}
+
+public final class space/kscience/plotly/models/Error : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Error$Companion;
+ public fun ()V
+ public final fun getArray ()Ljava/util/List;
+ public final fun getArrayminus ()Ljava/util/List;
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getSymmetric ()Ljava/lang/Boolean;
+ public final fun getThickness ()Ljava/lang/Number;
+ public final fun getTraceref ()I
+ public final fun getTracerefminus ()I
+ public final fun getType ()Lspace/kscience/plotly/models/ErrorType;
+ public final fun getValue ()Ljava/lang/Number;
+ public final fun getValueminus ()Ljava/lang/Number;
+ public final fun getVisible ()Ljava/lang/Boolean;
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun setArray (Ljava/util/List;)V
+ public final fun setArrayminus (Ljava/util/List;)V
+ public final fun setSymmetric (Ljava/lang/Boolean;)V
+ public final fun setThickness (Ljava/lang/Number;)V
+ public final fun setTraceref (I)V
+ public final fun setTracerefminus (I)V
+ public final fun setType (Lspace/kscience/plotly/models/ErrorType;)V
+ public final fun setValue (Ljava/lang/Number;)V
+ public final fun setValueminus (Ljava/lang/Number;)V
+ public final fun setVisible (Ljava/lang/Boolean;)V
+ public final fun setWidth (Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/Error$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ErrorType : java/lang/Enum {
+ public static final field constant Lspace/kscience/plotly/models/ErrorType;
+ public static final field data Lspace/kscience/plotly/models/ErrorType;
+ public static final field percent Lspace/kscience/plotly/models/ErrorType;
+ public static final field sqrt Lspace/kscience/plotly/models/ErrorType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ErrorType;
+ public static fun values ()[Lspace/kscience/plotly/models/ErrorType;
+}
+
+public final class space/kscience/plotly/models/Fill : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Fill$Companion;
+ public fun ()V
+ public final fun colors (Ljava/lang/Iterable;)V
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun setColor (Lspace/kscience/plotly/models/Color;)V
+}
+
+public final class space/kscience/plotly/models/Fill$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/FillTraceKt {
+ public static final fun appendXY (Lspace/kscience/plotly/models/Trace;Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;)V
+ public static final fun appendXY (Lspace/kscience/plotly/models/Trace;[Lkotlin/Pair;)V
+ public static synthetic fun appendXY$default (Lspace/kscience/plotly/models/Trace;Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;Ljava/lang/Number;ILjava/lang/Object;)V
+ public static final fun functionXY (Lspace/kscience/plotly/models/Trace;Ljava/lang/Iterable;Lkotlin/jvm/functions/Function1;)V
+ public static final fun functionXY (Lspace/kscience/plotly/models/Trace;Lkotlin/ranges/ClosedFloatingPointRange;DLkotlin/jvm/functions/Function1;)V
+ public static final fun functionXY (Lspace/kscience/plotly/models/Trace;Lkotlin/ranges/IntRange;Lkotlin/jvm/functions/Function1;)V
+ public static synthetic fun functionXY$default (Lspace/kscience/plotly/models/Trace;Lkotlin/ranges/ClosedFloatingPointRange;DLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
+}
+
+public final class space/kscience/plotly/models/FillType : java/lang/Enum {
+ public static final field none Lspace/kscience/plotly/models/FillType;
+ public static final field tonext Lspace/kscience/plotly/models/FillType;
+ public static final field tonextx Lspace/kscience/plotly/models/FillType;
+ public static final field tonexty Lspace/kscience/plotly/models/FillType;
+ public static final field toself Lspace/kscience/plotly/models/FillType;
+ public static final field tozerox Lspace/kscience/plotly/models/FillType;
+ public static final field tozeroy Lspace/kscience/plotly/models/FillType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/FillType;
+ public static fun values ()[Lspace/kscience/plotly/models/FillType;
+}
+
+public final class space/kscience/plotly/models/Font : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Font$Companion;
+ public fun ()V
+ public final fun colors (Ljava/lang/Iterable;)V
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getFamiliesList ()Ljava/util/List;
+ public final fun getFamily ()Ljava/lang/String;
+ public final fun getSize ()Ljava/lang/Number;
+ public final fun getSizesList ()Ljava/util/List;
+ public final fun setFamiliesList (Ljava/util/List;)V
+ public final fun setFamily (Ljava/lang/String;)V
+ public final fun setSize (Ljava/lang/Number;)V
+ public final fun setSizesList (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/Font$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Gradient : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Gradient$Companion;
+ public fun ()V
+ public final fun colors (Ljava/lang/Iterable;)V
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getType ()Lspace/kscience/plotly/models/GradientType;
+ public final fun getTypesList ()Ljava/util/List;
+ public final fun setType (Lspace/kscience/plotly/models/GradientType;)V
+ public final fun setTypesList (Ljava/util/List;)V
+ public final fun typesList (Ljava/lang/Iterable;)V
+}
+
+public final class space/kscience/plotly/models/Gradient$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/GradientType : java/lang/Enum {
+ public static final field horizontal Lspace/kscience/plotly/models/GradientType;
+ public static final field none Lspace/kscience/plotly/models/GradientType;
+ public static final field radial Lspace/kscience/plotly/models/GradientType;
+ public static final field vertical Lspace/kscience/plotly/models/GradientType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/GradientType;
+ public static fun values ()[Lspace/kscience/plotly/models/GradientType;
+}
+
+public final class space/kscience/plotly/models/GroupNorm : java/lang/Enum {
+ public static final field Lspace/kscience/plotly/models/GroupNorm;
+ public static final field fraction Lspace/kscience/plotly/models/GroupNorm;
+ public static final field percent Lspace/kscience/plotly/models/GroupNorm;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/GroupNorm;
+ public static fun values ()[Lspace/kscience/plotly/models/GroupNorm;
+}
+
+public final class space/kscience/plotly/models/Header : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Header$Companion;
+ public fun ()V
+ public final fun align (Ljava/util/List;)V
+ public final fun align (Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun align ([Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun fill (Lkotlin/jvm/functions/Function1;)V
+ public final fun font (Lkotlin/jvm/functions/Function1;)V
+ public final fun getAlign ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getFill ()Lspace/kscience/plotly/models/Fill;
+ public final fun getFont ()Lspace/kscience/plotly/models/Font;
+ public final fun getHeight ()Ljava/lang/Number;
+ public final fun getLine ()Lspace/kscience/plotly/models/LayoutLine;
+ public final fun getValues ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun setAlign (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun setFill (Lspace/kscience/plotly/models/Fill;)V
+ public final fun setFont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setHeight (Ljava/lang/Number;)V
+ public final fun setLine (Lspace/kscience/plotly/models/LayoutLine;)V
+ public final fun setValues (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun values (Ljava/lang/Iterable;)V
+}
+
+public final class space/kscience/plotly/models/Header$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public class space/kscience/plotly/models/Heatmap : space/kscience/plotly/models/Trace, space/kscience/plotly/models/HeatmapContour, space/kscience/plotly/models/Table2D {
+ public static final field Companion Lspace/kscience/plotly/models/Heatmap$Companion;
+ public fun ()V
+ public fun getXgap ()Ljava/lang/Number;
+ public fun getXtype ()Lspace/kscience/plotly/models/DataType;
+ public fun getYgap ()Ljava/lang/Number;
+ public fun getYtype ()Lspace/kscience/plotly/models/DataType;
+ public fun getZsmooth ()Lspace/kscience/plotly/models/ZsmoothType;
+ public fun setXgap (Ljava/lang/Number;)V
+ public fun setXtype (Lspace/kscience/plotly/models/DataType;)V
+ public fun setYgap (Ljava/lang/Number;)V
+ public fun setYtype (Lspace/kscience/plotly/models/DataType;)V
+ public fun setZsmooth (Lspace/kscience/plotly/models/ZsmoothType;)V
+}
+
+public final class space/kscience/plotly/models/Heatmap$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public abstract interface class space/kscience/plotly/models/HeatmapContour {
+ public abstract fun getXtype ()Lspace/kscience/plotly/models/DataType;
+ public abstract fun getYtype ()Lspace/kscience/plotly/models/DataType;
+ public abstract fun setXtype (Lspace/kscience/plotly/models/DataType;)V
+ public abstract fun setYtype (Lspace/kscience/plotly/models/DataType;)V
+}
+
+public final class space/kscience/plotly/models/HeatmapGL : space/kscience/plotly/models/Heatmap {
+ public static final field Companion Lspace/kscience/plotly/models/HeatmapGL$Companion;
+ public fun ()V
+}
+
+public final class space/kscience/plotly/models/HeatmapGL$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/HistFunc : java/lang/Enum {
+ public static final field average Lspace/kscience/plotly/models/HistFunc;
+ public static final field count Lspace/kscience/plotly/models/HistFunc;
+ public static final field max Lspace/kscience/plotly/models/HistFunc;
+ public static final field min Lspace/kscience/plotly/models/HistFunc;
+ public static final field sum Lspace/kscience/plotly/models/HistFunc;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/HistFunc;
+ public static fun values ()[Lspace/kscience/plotly/models/HistFunc;
+}
+
+public final class space/kscience/plotly/models/HistNorm : java/lang/Enum {
+ public static final field density Lspace/kscience/plotly/models/HistNorm;
+ public static final field empty Lspace/kscience/plotly/models/HistNorm;
+ public static final field percent Lspace/kscience/plotly/models/HistNorm;
+ public static final field probability Lspace/kscience/plotly/models/HistNorm;
+ public static final field probability density Lspace/kscience/plotly/models/HistNorm;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/HistNorm;
+ public static fun values ()[Lspace/kscience/plotly/models/HistNorm;
+}
+
+public class space/kscience/plotly/models/Histogram : space/kscience/plotly/models/Trace {
+ public static final field Companion Lspace/kscience/plotly/models/Histogram$Companion;
+ public fun ()V
+ public final fun cumulative (Lkotlin/jvm/functions/Function1;)V
+ public final fun getBingroup ()Ljava/lang/String;
+ public final fun getCumulative ()Lspace/kscience/plotly/models/Cumulative;
+ public final fun getDirection ()Lspace/kscience/plotly/models/HistogramDirection;
+ public final fun getHistfunc ()Lspace/kscience/plotly/models/HistFunc;
+ public final fun getHistnorm ()Lspace/kscience/plotly/models/HistNorm;
+ public final fun getNbinsx ()I
+ public final fun getNbinsy ()I
+ public final fun getXbingroup ()Ljava/lang/String;
+ public final fun getXbins ()Lspace/kscience/plotly/models/Bins;
+ public final fun getYbingroup ()Ljava/lang/String;
+ public final fun getYbins ()Lspace/kscience/plotly/models/Bins;
+ public final fun setBingroup (Ljava/lang/String;)V
+ public final fun setCumulative (Lspace/kscience/plotly/models/Cumulative;)V
+ public final fun setDirection (Lspace/kscience/plotly/models/HistogramDirection;)V
+ public final fun setHistfunc (Lspace/kscience/plotly/models/HistFunc;)V
+ public final fun setHistnorm (Lspace/kscience/plotly/models/HistNorm;)V
+ public final fun setNbinsx (I)V
+ public final fun setNbinsy (I)V
+ public final fun setXbingroup (Ljava/lang/String;)V
+ public final fun setXbins (Lspace/kscience/plotly/models/Bins;)V
+ public final fun setYbingroup (Ljava/lang/String;)V
+ public final fun setYbins (Lspace/kscience/plotly/models/Bins;)V
+ public final fun xbins (Lkotlin/jvm/functions/Function1;)V
+ public final fun ybins (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/Histogram$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Histogram2D : space/kscience/plotly/models/Histogram, space/kscience/plotly/models/Table2D {
+ public static final field Companion Lspace/kscience/plotly/models/Histogram2D$Companion;
+ public fun ()V
+ public fun getXgap ()Ljava/lang/Number;
+ public fun getYgap ()Ljava/lang/Number;
+ public fun getZsmooth ()Lspace/kscience/plotly/models/ZsmoothType;
+ public fun setXgap (Ljava/lang/Number;)V
+ public fun setYgap (Ljava/lang/Number;)V
+ public fun setZsmooth (Lspace/kscience/plotly/models/ZsmoothType;)V
+}
+
+public final class space/kscience/plotly/models/Histogram2D$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Histogram2DContour : space/kscience/plotly/models/Histogram, space/kscience/plotly/models/ContourSpec {
+ public static final field Companion Lspace/kscience/plotly/models/Histogram2DContour$Companion;
+ public fun ()V
+ public final fun contours (Lkotlin/jvm/functions/Function1;)V
+ public fun getAutocontour ()Ljava/lang/Boolean;
+ public fun getContours ()Lspace/kscience/plotly/models/Contours;
+ public fun getNcontours ()I
+ public fun setAutocontour (Ljava/lang/Boolean;)V
+ public fun setContours (Lspace/kscience/plotly/models/Contours;)V
+ public fun setNcontours (I)V
+}
+
+public final class space/kscience/plotly/models/Histogram2DContour$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/HistogramDirection : java/lang/Enum {
+ public static final field decreasing Lspace/kscience/plotly/models/HistogramDirection;
+ public static final field increasing Lspace/kscience/plotly/models/HistogramDirection;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/HistogramDirection;
+ public static fun values ()[Lspace/kscience/plotly/models/HistogramDirection;
+}
+
+public final class space/kscience/plotly/models/HorizontalAlign : java/lang/Enum {
+ public static final field center Lspace/kscience/plotly/models/HorizontalAlign;
+ public static final field left Lspace/kscience/plotly/models/HorizontalAlign;
+ public static final field right Lspace/kscience/plotly/models/HorizontalAlign;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/HorizontalAlign;
+ public static fun values ()[Lspace/kscience/plotly/models/HorizontalAlign;
+}
+
+public final class space/kscience/plotly/models/HoverMode : java/lang/Enum {
+ public static final field closest Lspace/kscience/plotly/models/HoverMode;
+ public static final field false Lspace/kscience/plotly/models/HoverMode;
+ public static final field x Lspace/kscience/plotly/models/HoverMode;
+ public static final field x unified Lspace/kscience/plotly/models/HoverMode;
+ public static final field y Lspace/kscience/plotly/models/HoverMode;
+ public static final field y unified Lspace/kscience/plotly/models/HoverMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/HoverMode;
+ public static fun values ()[Lspace/kscience/plotly/models/HoverMode;
+}
+
+public final class space/kscience/plotly/models/Hoverlabel : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Hoverlabel$Companion;
+ public fun ()V
+ public final fun align (Ljava/util/List;)V
+ public final fun align (Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun align ([Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun bgcolors (Ljava/lang/Iterable;)V
+ public final fun bordercolors (Ljava/lang/Iterable;)V
+ public final fun font (Lkotlin/jvm/functions/Function1;)V
+ public final fun getAlign ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getBgcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getBordercolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getFont ()Lspace/kscience/plotly/models/Font;
+ public final fun getNamelength ()Ljava/lang/Number;
+ public final fun getNamelengths ()Ljava/util/List;
+ public final fun setAlign (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun setBgcolor (Lspace/kscience/plotly/models/Color;)V
+ public final fun setBordercolor (Lspace/kscience/plotly/models/Color;)V
+ public final fun setFont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setNamelength (Ljava/lang/Number;)V
+ public final fun setNamelengths (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/Hoverlabel$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Image : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Image$Companion;
+ public fun ()V
+ public final fun getLayer ()Lspace/kscience/plotly/models/ImageLayer;
+ public final fun getName ()Ljava/lang/String;
+ public final fun getOpacity ()D
+ public final fun getSizex ()D
+ public final fun getSizey ()D
+ public final fun getSizing ()Lspace/kscience/plotly/models/ImageSizing;
+ public final fun getSource ()Ljava/lang/String;
+ public final fun getTemplateitemname ()Ljava/lang/String;
+ public final fun getVisible ()Z
+ public final fun getX ()D
+ public final fun getXanchor ()Lspace/kscience/plotly/models/ImageXAnchor;
+ public final fun getXref ()Ljava/lang/String;
+ public final fun getY ()D
+ public final fun getYanchor ()Lspace/kscience/plotly/models/ImageYAnchor;
+ public final fun getYref ()Ljava/lang/String;
+ public final fun setLayer (Lspace/kscience/plotly/models/ImageLayer;)V
+ public final fun setName (Ljava/lang/String;)V
+ public final fun setOpacity (D)V
+ public final fun setSizex (D)V
+ public final fun setSizey (D)V
+ public final fun setSizing (Lspace/kscience/plotly/models/ImageSizing;)V
+ public final fun setSource (Ljava/lang/String;)V
+ public final fun setTemplateitemname (Ljava/lang/String;)V
+ public final fun setVisible (Z)V
+ public final fun setX (D)V
+ public final fun setXanchor (Lspace/kscience/plotly/models/ImageXAnchor;)V
+ public final fun setXref (Ljava/lang/String;)V
+ public final fun setY (D)V
+ public final fun setYanchor (Lspace/kscience/plotly/models/ImageYAnchor;)V
+ public final fun setYref (Ljava/lang/String;)V
+}
+
+public final class space/kscience/plotly/models/Image$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ImageLayer : java/lang/Enum {
+ public static final field above Lspace/kscience/plotly/models/ImageLayer;
+ public static final field below Lspace/kscience/plotly/models/ImageLayer;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ImageLayer;
+ public static fun values ()[Lspace/kscience/plotly/models/ImageLayer;
+}
+
+public final class space/kscience/plotly/models/ImageSizing : java/lang/Enum {
+ public static final field contain Lspace/kscience/plotly/models/ImageSizing;
+ public static final field fill Lspace/kscience/plotly/models/ImageSizing;
+ public static final field stretch Lspace/kscience/plotly/models/ImageSizing;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ImageSizing;
+ public static fun values ()[Lspace/kscience/plotly/models/ImageSizing;
+}
+
+public final class space/kscience/plotly/models/ImageXAnchor : java/lang/Enum {
+ public static final field center Lspace/kscience/plotly/models/ImageXAnchor;
+ public static final field left Lspace/kscience/plotly/models/ImageXAnchor;
+ public static final field right Lspace/kscience/plotly/models/ImageXAnchor;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ImageXAnchor;
+ public static fun values ()[Lspace/kscience/plotly/models/ImageXAnchor;
+}
+
+public final class space/kscience/plotly/models/ImageYAnchor : java/lang/Enum {
+ public static final field bottom Lspace/kscience/plotly/models/ImageYAnchor;
+ public static final field middle Lspace/kscience/plotly/models/ImageYAnchor;
+ public static final field top Lspace/kscience/plotly/models/ImageYAnchor;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ImageYAnchor;
+ public static fun values ()[Lspace/kscience/plotly/models/ImageYAnchor;
+}
+
+public final class space/kscience/plotly/models/Layout : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Layout$Companion;
+ public fun ()V
+ public final fun annotation (Lkotlin/jvm/functions/Function1;)V
+ public final fun annotation (Lspace/kscience/plotly/models/Text;)V
+ public final fun figure (Lkotlin/jvm/functions/Function1;)V
+ public final fun figure (Lspace/kscience/plotly/models/Shape;)V
+ public final fun getAnnotations ()Ljava/util/List;
+ public final fun getAutosize ()Ljava/lang/Boolean;
+ public final fun getBargap ()Ljava/lang/Number;
+ public final fun getBargroupgap ()Ljava/lang/Number;
+ public final fun getBarmode ()Lspace/kscience/plotly/models/BarMode;
+ public final fun getBarnorm ()Lspace/kscience/plotly/models/BarNorm;
+ public final fun getBoxgap ()Ljava/lang/Number;
+ public final fun getBoxgroupgap ()Ljava/lang/Number;
+ public final fun getBoxmode ()Lspace/kscience/plotly/models/BoxMode;
+ public final fun getCalendar ()Lspace/kscience/plotly/models/Calendar;
+ public final fun getDragmode ()Lspace/kscience/plotly/models/DragMode;
+ public final fun getHeight ()Ljava/lang/Number;
+ public final fun getHoverdistance ()Ljava/lang/Number;
+ public final fun getHovermode ()Lspace/kscience/plotly/models/HoverMode;
+ public final fun getLegend ()Lspace/kscience/plotly/models/Legend;
+ public final fun getMargin ()Lspace/kscience/plotly/models/Margin;
+ public final fun getPaper_bgcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getPlot_bgcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getSeparators ()Ljava/lang/String;
+ public final fun getShapes ()Ljava/util/List;
+ public final fun getShowlegend ()Ljava/lang/Boolean;
+ public final fun getTitle ()Ljava/lang/String;
+ public final fun getViolingap ()Ljava/lang/Number;
+ public final fun getViolingroupgap ()Ljava/lang/Number;
+ public final fun getViolinmode ()Lspace/kscience/plotly/models/ViolinMode;
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun getXaxis ()Lspace/kscience/plotly/models/Axis;
+ public final fun getYaxis ()Lspace/kscience/plotly/models/Axis;
+ public final fun image (Lkotlin/jvm/functions/Function1;)V
+ public final fun image (Lspace/kscience/plotly/models/Image;)V
+ public final fun legend (Lkotlin/jvm/functions/Function1;)V
+ public final fun margin (Lkotlin/jvm/functions/Function1;)V
+ public final fun setAnnotations (Ljava/util/List;)V
+ public final fun setAutosize (Ljava/lang/Boolean;)V
+ public final fun setBargap (Ljava/lang/Number;)V
+ public final fun setBargroupgap (Ljava/lang/Number;)V
+ public final fun setBarmode (Lspace/kscience/plotly/models/BarMode;)V
+ public final fun setBarnorm (Lspace/kscience/plotly/models/BarNorm;)V
+ public final fun setBoxgap (Ljava/lang/Number;)V
+ public final fun setBoxgroupgap (Ljava/lang/Number;)V
+ public final fun setBoxmode (Lspace/kscience/plotly/models/BoxMode;)V
+ public final fun setCalendar (Lspace/kscience/plotly/models/Calendar;)V
+ public final fun setDragmode (Lspace/kscience/plotly/models/DragMode;)V
+ public final fun setHeight (Ljava/lang/Number;)V
+ public final fun setHoverdistance (Ljava/lang/Number;)V
+ public final fun setHovermode (Lspace/kscience/plotly/models/HoverMode;)V
+ public final fun setLegend (Lspace/kscience/plotly/models/Legend;)V
+ public final fun setMargin (Lspace/kscience/plotly/models/Margin;)V
+ public final fun setSeparators (Ljava/lang/String;)V
+ public final fun setShapes (Ljava/util/List;)V
+ public final fun setShowlegend (Ljava/lang/Boolean;)V
+ public final fun setTitle (Ljava/lang/String;)V
+ public final fun setViolingap (Ljava/lang/Number;)V
+ public final fun setViolingroupgap (Ljava/lang/Number;)V
+ public final fun setViolinmode (Lspace/kscience/plotly/models/ViolinMode;)V
+ public final fun setWidth (Ljava/lang/Number;)V
+ public final fun setXaxis (Lspace/kscience/plotly/models/Axis;)V
+ public final fun setYaxis (Lspace/kscience/plotly/models/Axis;)V
+ public final fun title (Lkotlin/jvm/functions/Function1;)V
+ public final fun xaxis (Lkotlin/jvm/functions/Function1;)V
+ public final fun yaxis (ILkotlin/jvm/functions/Function1;)V
+ public final fun yaxis (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/Layout$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/LayoutLine : space/kscience/dataforge/meta/Scheme, space/kscience/plotly/models/Line {
+ public static final field Companion Lspace/kscience/plotly/models/LayoutLine$Companion;
+ public fun ()V
+ public fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getDash ()Lspace/kscience/plotly/models/Dash;
+ public final fun getShape ()Lspace/kscience/plotly/models/LineShape;
+ public final fun getSmoothing ()Ljava/lang/Number;
+ public fun getWidth ()Ljava/lang/Number;
+ public fun getWidthList ()Ljava/util/List;
+ public final fun setDash (Lspace/kscience/plotly/models/Dash;)V
+ public final fun setShape (Lspace/kscience/plotly/models/LineShape;)V
+ public final fun setSmoothing (Ljava/lang/Number;)V
+ public fun setWidth (Ljava/lang/Number;)V
+ public fun setWidthList (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/LayoutLine$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Legend : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Legend$Companion;
+ public fun ()V
+ public final fun font (Lkotlin/jvm/functions/Function1;)V
+ public final fun getBgcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getBordercolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getBorderwidth ()Ljava/lang/Number;
+ public final fun getFont ()Lspace/kscience/plotly/models/Font;
+ public final fun getOrientation ()Lspace/kscience/plotly/models/LegendOrientation;
+ public final fun getTraceorder ()Lspace/kscience/plotly/models/TraceOrder;
+ public final fun getX ()Ljava/lang/Number;
+ public final fun getXanchor ()Lspace/kscience/plotly/models/XAnchor;
+ public final fun getY ()Ljava/lang/Number;
+ public final fun getYanchor ()Lspace/kscience/plotly/models/YAnchor;
+ public final fun setBorderwidth (Ljava/lang/Number;)V
+ public final fun setFont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setOrientation (Lspace/kscience/plotly/models/LegendOrientation;)V
+ public final fun setTraceorder (Lspace/kscience/plotly/models/TraceOrder;)V
+ public final fun setX (Ljava/lang/Number;)V
+ public final fun setXanchor (Lspace/kscience/plotly/models/XAnchor;)V
+ public final fun setY (Ljava/lang/Number;)V
+ public final fun setYanchor (Lspace/kscience/plotly/models/YAnchor;)V
+}
+
+public final class space/kscience/plotly/models/Legend$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/LegendOrientation : java/lang/Enum {
+ public static final field horizontal Lspace/kscience/plotly/models/LegendOrientation;
+ public static final field vertical Lspace/kscience/plotly/models/LegendOrientation;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/LegendOrientation;
+ public static fun values ()[Lspace/kscience/plotly/models/LegendOrientation;
+}
+
+public abstract interface class space/kscience/plotly/models/Line {
+ public abstract fun getColor ()Lspace/kscience/plotly/models/Color;
+ public abstract fun getWidth ()Ljava/lang/Number;
+ public abstract fun getWidthList ()Ljava/util/List;
+ public abstract fun setWidth (Ljava/lang/Number;)V
+ public abstract fun setWidthList (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/LineShape : java/lang/Enum {
+ public static final field hv Lspace/kscience/plotly/models/LineShape;
+ public static final field hvh Lspace/kscience/plotly/models/LineShape;
+ public static final field linear Lspace/kscience/plotly/models/LineShape;
+ public static final field spline Lspace/kscience/plotly/models/LineShape;
+ public static final field vh Lspace/kscience/plotly/models/LineShape;
+ public static final field vhv Lspace/kscience/plotly/models/LineShape;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/LineShape;
+ public static fun values ()[Lspace/kscience/plotly/models/LineShape;
+}
+
+public final class space/kscience/plotly/models/Margin : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Margin$Companion;
+ public fun ()V
+ public final fun getAutoexpand ()Ljava/lang/Boolean;
+ public final fun getB ()Ljava/lang/Number;
+ public final fun getL ()Ljava/lang/Number;
+ public final fun getPad ()Ljava/lang/Number;
+ public final fun getR ()Ljava/lang/Number;
+ public final fun getT ()Ljava/lang/Number;
+ public final fun setAutoexpand (Ljava/lang/Boolean;)V
+ public final fun setB (Ljava/lang/Number;)V
+ public final fun setL (Ljava/lang/Number;)V
+ public final fun setPad (Ljava/lang/Number;)V
+ public final fun setR (Ljava/lang/Number;)V
+ public final fun setT (Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/Margin$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/Marker : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Marker$Companion;
+ public fun ()V
+ public final fun colorbar (Lkotlin/jvm/functions/Function1;)V
+ public final fun colors (Ljava/lang/Iterable;)V
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getColorbar ()Lspace/kscience/plotly/models/ColorBar;
+ public final fun getGradient ()Lspace/kscience/plotly/models/Gradient;
+ public final fun getLine ()Lspace/kscience/plotly/models/MarkerLine;
+ public final fun getMaxdisplayed ()I
+ public final fun getOpacitiesList ()Ljava/util/List;
+ public final fun getOpacity ()Ljava/lang/Number;
+ public final fun getOutliercolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getPieColors ()Ljava/util/List;
+ public final fun getSize ()Ljava/lang/Number;
+ public final fun getSizemin ()Ljava/lang/Number;
+ public final fun getSizemode ()Lspace/kscience/plotly/models/SizeMode;
+ public final fun getSizeref ()Ljava/lang/Number;
+ public final fun getSizesList ()Ljava/util/List;
+ public final fun getSymbol ()Lspace/kscience/plotly/models/Symbol;
+ public final fun getSymbolsList ()Ljava/util/List;
+ public final fun gradient (Lkotlin/jvm/functions/Function1;)V
+ public final fun line (Lkotlin/jvm/functions/Function1;)V
+ public final fun setColorbar (Lspace/kscience/plotly/models/ColorBar;)V
+ public final fun setGradient (Lspace/kscience/plotly/models/Gradient;)V
+ public final fun setLine (Lspace/kscience/plotly/models/MarkerLine;)V
+ public final fun setMaxdisplayed (I)V
+ public final fun setOpacitiesList (Ljava/util/List;)V
+ public final fun setOpacity (Ljava/lang/Number;)V
+ public final fun setPieColors (Ljava/util/List;)V
+ public final fun setSize (Ljava/lang/Number;)V
+ public final fun setSizemin (Ljava/lang/Number;)V
+ public final fun setSizemode (Lspace/kscience/plotly/models/SizeMode;)V
+ public final fun setSizeref (Ljava/lang/Number;)V
+ public final fun setSizesList (Ljava/util/List;)V
+ public final fun setSymbol (Lspace/kscience/plotly/models/Symbol;)V
+ public final fun setSymbolsList (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/Marker$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/MarkerLine : space/kscience/dataforge/meta/Scheme, space/kscience/plotly/models/Line {
+ public static final field Companion Lspace/kscience/plotly/models/MarkerLine$Companion;
+ public fun ()V
+ public final fun colors (Ljava/lang/Iterable;)V
+ public final fun getAutocolorscale ()Ljava/lang/Boolean;
+ public final fun getCauto ()Ljava/lang/Boolean;
+ public final fun getCmax ()Ljava/lang/Number;
+ public final fun getCmid ()Ljava/lang/Number;
+ public final fun getCmin ()Ljava/lang/Number;
+ public fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getColorscale ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getOutliercolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getOutlierwidth ()Ljava/lang/Number;
+ public final fun getReversescale ()Ljava/lang/Boolean;
+ public fun getWidth ()Ljava/lang/Number;
+ public fun getWidthList ()Ljava/util/List;
+ public final fun setAutocolorscale (Ljava/lang/Boolean;)V
+ public final fun setCauto (Ljava/lang/Boolean;)V
+ public final fun setCmax (Ljava/lang/Number;)V
+ public final fun setCmid (Ljava/lang/Number;)V
+ public final fun setCmin (Ljava/lang/Number;)V
+ public final fun setColorscale (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setOutlierwidth (Ljava/lang/Number;)V
+ public final fun setReversescale (Ljava/lang/Boolean;)V
+ public fun setWidth (Ljava/lang/Number;)V
+ public fun setWidthList (Ljava/util/List;)V
+}
+
+public final class space/kscience/plotly/models/MarkerLine$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/MeanLine : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/MeanLine$Companion;
+ public fun ()V
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getVisible ()Ljava/lang/Boolean;
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun setVisible (Ljava/lang/Boolean;)V
+ public final fun setWidth (Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/MeanLine$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/MeasureMode : java/lang/Enum {
+ public static final field fraction Lspace/kscience/plotly/models/MeasureMode;
+ public static final field pixels Lspace/kscience/plotly/models/MeasureMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/MeasureMode;
+ public static fun values ()[Lspace/kscience/plotly/models/MeasureMode;
+}
+
+public final class space/kscience/plotly/models/Orientation : java/lang/Enum {
+ public static final field h Lspace/kscience/plotly/models/Orientation;
+ public static final field v Lspace/kscience/plotly/models/Orientation;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Orientation;
+ public static fun values ()[Lspace/kscience/plotly/models/Orientation;
+}
+
+public final class space/kscience/plotly/models/Pie : space/kscience/plotly/models/Trace {
+ public static final field Companion Lspace/kscience/plotly/models/Pie$Companion;
+ public fun ()V
+ public final fun getDirection ()Lspace/kscience/plotly/models/PieDirection;
+ public final fun getDlabel ()Ljava/lang/Number;
+ public final fun getHole ()Ljava/lang/Number;
+ public final fun getLabel0 ()Ljava/lang/Number;
+ public final fun getPull ()Ljava/lang/Number;
+ public final fun getPullList ()Ljava/util/List;
+ public final fun getRotation ()Ljava/lang/Number;
+ public final fun getSort ()Ljava/lang/Boolean;
+ public final fun getTextinfo ()Lspace/kscience/plotly/models/TextInfo;
+ public final fun setDirection (Lspace/kscience/plotly/models/PieDirection;)V
+ public final fun setDlabel (Ljava/lang/Number;)V
+ public final fun setHole (Ljava/lang/Number;)V
+ public final fun setLabel0 (Ljava/lang/Number;)V
+ public final fun setPull (Ljava/lang/Number;)V
+ public final fun setPullList (Ljava/util/List;)V
+ public final fun setRotation (Ljava/lang/Number;)V
+ public final fun setSort (Ljava/lang/Boolean;)V
+ public final fun setTextinfo (Lspace/kscience/plotly/models/TextInfo;)V
+}
+
+public final class space/kscience/plotly/models/Pie$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/PieDirection : java/lang/Enum {
+ public static final field clockwise Lspace/kscience/plotly/models/PieDirection;
+ public static final field counterclockwise Lspace/kscience/plotly/models/PieDirection;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/PieDirection;
+ public static fun values ()[Lspace/kscience/plotly/models/PieDirection;
+}
+
+public final class space/kscience/plotly/models/QuartileMethod : java/lang/Enum {
+ public static final field exclusive Lspace/kscience/plotly/models/QuartileMethod;
+ public static final field inclusive Lspace/kscience/plotly/models/QuartileMethod;
+ public static final field linear Lspace/kscience/plotly/models/QuartileMethod;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/QuartileMethod;
+ public static fun values ()[Lspace/kscience/plotly/models/QuartileMethod;
+}
+
+public final class space/kscience/plotly/models/Ref : java/lang/Enum {
+ public static final field container Lspace/kscience/plotly/models/Ref;
+ public static final field paper Lspace/kscience/plotly/models/Ref;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Ref;
+ public static fun values ()[Lspace/kscience/plotly/models/Ref;
+}
+
+public class space/kscience/plotly/models/Scatter : space/kscience/plotly/models/Trace, space/kscience/plotly/models/SelectedPoints {
+ public static final field Companion Lspace/kscience/plotly/models/Scatter$Companion;
+ public fun ()V
+ public final fun getFill ()Lspace/kscience/plotly/models/FillType;
+ public final fun getGroupnorm ()Lspace/kscience/plotly/models/GroupNorm;
+ public final fun getHoveron ()Lspace/kscience/plotly/models/ScatterHoveron;
+ public final fun getMode ()Lspace/kscience/plotly/models/ScatterMode;
+ public fun getSelected ()Lspace/kscience/plotly/models/SelectPoints;
+ public fun getSelectedpoints ()Ljava/util/List;
+ public final fun getStackgaps ()Lspace/kscience/plotly/models/StackGaps;
+ public final fun getStackgroup ()Ljava/lang/String;
+ public fun getUnselected ()Lspace/kscience/plotly/models/SelectPoints;
+ public final fun getYaxis ()Ljava/lang/String;
+ public final fun selected (Lkotlin/jvm/functions/Function1;)V
+ public final fun setFill (Lspace/kscience/plotly/models/FillType;)V
+ public final fun setGroupnorm (Lspace/kscience/plotly/models/GroupNorm;)V
+ public final fun setHoveron (Lspace/kscience/plotly/models/ScatterHoveron;)V
+ public final fun setMode (Lspace/kscience/plotly/models/ScatterMode;)V
+ public fun setSelected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public fun setSelectedpoints (Ljava/util/List;)V
+ public final fun setStackgaps (Lspace/kscience/plotly/models/StackGaps;)V
+ public final fun setStackgroup (Ljava/lang/String;)V
+ public fun setUnselected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public final fun setYaxis (Ljava/lang/String;)V
+ public final fun unselected (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/Scatter$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ScatterGL : space/kscience/plotly/models/Scatter {
+ public static final field Companion Lspace/kscience/plotly/models/ScatterGL$Companion;
+ public fun ()V
+}
+
+public final class space/kscience/plotly/models/ScatterGL$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ScatterHoveron : java/lang/Enum {
+ public static final field fills Lspace/kscience/plotly/models/ScatterHoveron;
+ public static final field points Lspace/kscience/plotly/models/ScatterHoveron;
+ public static final field points+fills Lspace/kscience/plotly/models/ScatterHoveron;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ScatterHoveron;
+ public static fun values ()[Lspace/kscience/plotly/models/ScatterHoveron;
+}
+
+public final class space/kscience/plotly/models/ScatterMode : java/lang/Enum {
+ public static final field lines Lspace/kscience/plotly/models/ScatterMode;
+ public static final field lines+markers Lspace/kscience/plotly/models/ScatterMode;
+ public static final field lines+markers+text Lspace/kscience/plotly/models/ScatterMode;
+ public static final field lines+text Lspace/kscience/plotly/models/ScatterMode;
+ public static final field markers Lspace/kscience/plotly/models/ScatterMode;
+ public static final field markers+text Lspace/kscience/plotly/models/ScatterMode;
+ public static final field none Lspace/kscience/plotly/models/ScatterMode;
+ public static final field text Lspace/kscience/plotly/models/ScatterMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ScatterMode;
+ public static fun values ()[Lspace/kscience/plotly/models/ScatterMode;
+}
+
+public final class space/kscience/plotly/models/SelectMarker : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/SelectMarker$Companion;
+ public fun ()V
+ public final fun getColor ()Lspace/kscience/plotly/models/Color;
+ public final fun getOpacity ()Ljava/lang/Number;
+ public final fun getSize ()Ljava/lang/Number;
+ public final fun setOpacity (Ljava/lang/Number;)V
+ public final fun setSize (Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/SelectMarker$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/SelectPoints : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/SelectPoints$Companion;
+ public fun ()V
+ public final fun getMarker ()Lspace/kscience/plotly/models/SelectMarker;
+ public final fun getTextfont ()Lspace/kscience/plotly/models/Font;
+ public final fun marker (Lkotlin/jvm/functions/Function1;)V
+ public final fun setMarker (Lspace/kscience/plotly/models/SelectMarker;)V
+ public final fun setTextfont (Lspace/kscience/plotly/models/Font;)V
+ public final fun textfont (Lkotlin/jvm/functions/Function1;)V
+}
+
+public final class space/kscience/plotly/models/SelectPoints$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public abstract interface class space/kscience/plotly/models/SelectedPoints {
+ public abstract fun getSelected ()Lspace/kscience/plotly/models/SelectPoints;
+ public abstract fun getSelectedpoints ()Ljava/util/List;
+ public abstract fun getUnselected ()Lspace/kscience/plotly/models/SelectPoints;
+ public abstract fun setSelected (Lspace/kscience/plotly/models/SelectPoints;)V
+ public abstract fun setSelectedpoints (Ljava/util/List;)V
+ public abstract fun setUnselected (Lspace/kscience/plotly/models/SelectPoints;)V
+}
+
+public final class space/kscience/plotly/models/Shape : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Shape$Companion;
+ public fun ()V
+ public final fun endXY (Ljava/lang/Number;Ljava/lang/Number;)V
+ public final fun getEditable ()Ljava/lang/Boolean;
+ public final fun getFillcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getFillrule ()Lspace/kscience/plotly/models/ShapeFillRule;
+ public final fun getLayer ()Lspace/kscience/plotly/models/ShapeLayer;
+ public final fun getLine ()Lspace/kscience/plotly/models/LayoutLine;
+ public final fun getName ()Ljava/lang/String;
+ public final fun getOpacity ()Ljava/lang/Number;
+ public final fun getPath ()Ljava/lang/String;
+ public final fun getTemplateitemname ()Ljava/lang/String;
+ public final fun getType ()Lspace/kscience/plotly/models/ShapeType;
+ public final fun getVisible ()Ljava/lang/Boolean;
+ public final fun getX0 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getX1 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getXanchor ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getXref ()Ljava/lang/String;
+ public final fun getXsizemode ()Lspace/kscience/plotly/models/ShapeSizeMode;
+ public final fun getY0 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getY1 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getYanchor ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getYref ()Ljava/lang/String;
+ public final fun getYsizemode ()Lspace/kscience/plotly/models/ShapeSizeMode;
+ public final fun line (Lkotlin/jvm/functions/Function1;)V
+ public final fun setEditable (Ljava/lang/Boolean;)V
+ public final fun setFillrule (Lspace/kscience/plotly/models/ShapeFillRule;)V
+ public final fun setLayer (Lspace/kscience/plotly/models/ShapeLayer;)V
+ public final fun setLine (Lspace/kscience/plotly/models/LayoutLine;)V
+ public final fun setName (Ljava/lang/String;)V
+ public final fun setOpacity (Ljava/lang/Number;)V
+ public final fun setPath (Ljava/lang/String;)V
+ public final fun setTemplateitemname (Ljava/lang/String;)V
+ public final fun setType (Lspace/kscience/plotly/models/ShapeType;)V
+ public final fun setVisible (Ljava/lang/Boolean;)V
+ public final fun setX0 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setX1 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setXanchor (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setXref (Ljava/lang/String;)V
+ public final fun setXsizemode (Lspace/kscience/plotly/models/ShapeSizeMode;)V
+ public final fun setY0 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setY1 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setYanchor (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setYref (Ljava/lang/String;)V
+ public final fun setYsizemode (Lspace/kscience/plotly/models/ShapeSizeMode;)V
+ public final fun startXY (Ljava/lang/Number;Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/Shape$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ShapeFillRule : java/lang/Enum {
+ public static final field evenodd Lspace/kscience/plotly/models/ShapeFillRule;
+ public static final field nonzero Lspace/kscience/plotly/models/ShapeFillRule;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ShapeFillRule;
+ public static fun values ()[Lspace/kscience/plotly/models/ShapeFillRule;
+}
+
+public final class space/kscience/plotly/models/ShapeLayer : java/lang/Enum {
+ public static final field above Lspace/kscience/plotly/models/ShapeLayer;
+ public static final field below Lspace/kscience/plotly/models/ShapeLayer;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ShapeLayer;
+ public static fun values ()[Lspace/kscience/plotly/models/ShapeLayer;
+}
+
+public final class space/kscience/plotly/models/ShapeSizeMode : java/lang/Enum {
+ public static final field pixel Lspace/kscience/plotly/models/ShapeSizeMode;
+ public static final field scaled Lspace/kscience/plotly/models/ShapeSizeMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ShapeSizeMode;
+ public static fun values ()[Lspace/kscience/plotly/models/ShapeSizeMode;
+}
+
+public final class space/kscience/plotly/models/ShapeType : java/lang/Enum {
+ public static final field circle Lspace/kscience/plotly/models/ShapeType;
+ public static final field line Lspace/kscience/plotly/models/ShapeType;
+ public static final field path Lspace/kscience/plotly/models/ShapeType;
+ public static final field rect Lspace/kscience/plotly/models/ShapeType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ShapeType;
+ public static fun values ()[Lspace/kscience/plotly/models/ShapeType;
+}
+
+public final class space/kscience/plotly/models/SizeMode : java/lang/Enum {
+ public static final field area Lspace/kscience/plotly/models/SizeMode;
+ public static final field diameter Lspace/kscience/plotly/models/SizeMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/SizeMode;
+ public static fun values ()[Lspace/kscience/plotly/models/SizeMode;
+}
+
+public final class space/kscience/plotly/models/SpanMode : java/lang/Enum {
+ public static final field hard Lspace/kscience/plotly/models/SpanMode;
+ public static final field manual Lspace/kscience/plotly/models/SpanMode;
+ public static final field soft Lspace/kscience/plotly/models/SpanMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/SpanMode;
+ public static fun values ()[Lspace/kscience/plotly/models/SpanMode;
+}
+
+public final class space/kscience/plotly/models/StackGaps : java/lang/Enum {
+ public static final field infer zero Lspace/kscience/plotly/models/StackGaps;
+ public static final field interpolate Lspace/kscience/plotly/models/StackGaps;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/StackGaps;
+ public static fun values ()[Lspace/kscience/plotly/models/StackGaps;
+}
+
+public final class space/kscience/plotly/models/Symbol : java/lang/Enum {
+ public static final field circle Lspace/kscience/plotly/models/Symbol;
+ public static final field cross Lspace/kscience/plotly/models/Symbol;
+ public static final field cross-thin Lspace/kscience/plotly/models/Symbol;
+ public static final field line-ns Lspace/kscience/plotly/models/Symbol;
+ public static final field square-cross Lspace/kscience/plotly/models/Symbol;
+ public static final field triangle-down Lspace/kscience/plotly/models/Symbol;
+ public static final field triangle-up Lspace/kscience/plotly/models/Symbol;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Symbol;
+ public static fun values ()[Lspace/kscience/plotly/models/Symbol;
+}
+
+public final class space/kscience/plotly/models/Table : space/kscience/plotly/models/Trace {
+ public static final field Companion Lspace/kscience/plotly/models/Table$Companion;
+ public fun ()V
+ public final fun cells (Lkotlin/jvm/functions/Function1;)V
+ public final fun getCells ()Lspace/kscience/plotly/models/Cells;
+ public final fun getColumnorder ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getColumnwidth ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getHeader ()Lspace/kscience/plotly/models/Header;
+ public final fun getIds ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun header (Lkotlin/jvm/functions/Function1;)V
+ public final fun setCells (Lspace/kscience/plotly/models/Cells;)V
+ public final fun setColumnorder (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun setColumnwidth (Lspace/kscience/plotly/models/TraceValues;)V
+ public final fun setHeader (Lspace/kscience/plotly/models/Header;)V
+ public final fun setIds (Lspace/kscience/plotly/models/TraceValues;)V
+}
+
+public final class space/kscience/plotly/models/Table$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public abstract interface class space/kscience/plotly/models/Table2D {
+ public abstract fun getXgap ()Ljava/lang/Number;
+ public abstract fun getYgap ()Ljava/lang/Number;
+ public abstract fun getZsmooth ()Lspace/kscience/plotly/models/ZsmoothType;
+ public abstract fun setXgap (Ljava/lang/Number;)V
+ public abstract fun setYgap (Ljava/lang/Number;)V
+ public abstract fun setZsmooth (Lspace/kscience/plotly/models/ZsmoothType;)V
+}
+
+public final class space/kscience/plotly/models/Text : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Text$Companion;
+ public fun ()V
+ public final fun font (Lkotlin/jvm/functions/Function1;)V
+ public final fun getAlign ()Lspace/kscience/plotly/models/HorizontalAlign;
+ public final fun getArrowcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getAx ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getAy ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getBgcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getBordercolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getFont ()Lspace/kscience/plotly/models/Font;
+ public final fun getHeight ()Ljava/lang/Number;
+ public final fun getOpacity ()Ljava/lang/Number;
+ public final fun getShowarrow ()Ljava/lang/Boolean;
+ public final fun getStandoff ()Ljava/lang/Number;
+ public final fun getText ()Ljava/lang/String;
+ public final fun getTextangle ()Ljava/lang/Number;
+ public final fun getValign ()Lspace/kscience/plotly/models/VerticalAlign;
+ public final fun getVisible ()Ljava/lang/Boolean;
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun getX ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getXanchor ()Lspace/kscience/plotly/models/XAnchor;
+ public final fun getXref ()Ljava/lang/String;
+ public final fun getY ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getYanchor ()Lspace/kscience/plotly/models/YAnchor;
+ public final fun getYref ()Ljava/lang/String;
+ public final fun position (Ljava/lang/Number;Ljava/lang/Number;)V
+ public final fun setAlign (Lspace/kscience/plotly/models/HorizontalAlign;)V
+ public final fun setAx (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setAy (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setFont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setHeight (Ljava/lang/Number;)V
+ public final fun setOpacity (Ljava/lang/Number;)V
+ public final fun setShowarrow (Ljava/lang/Boolean;)V
+ public final fun setStandoff (Ljava/lang/Number;)V
+ public final fun setText (Ljava/lang/String;)V
+ public final fun setTextangle (Ljava/lang/Number;)V
+ public final fun setValign (Lspace/kscience/plotly/models/VerticalAlign;)V
+ public final fun setVisible (Ljava/lang/Boolean;)V
+ public final fun setWidth (Ljava/lang/Number;)V
+ public final fun setX (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setXanchor (Lspace/kscience/plotly/models/XAnchor;)V
+ public final fun setXref (Ljava/lang/String;)V
+ public final fun setY (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setYanchor (Lspace/kscience/plotly/models/YAnchor;)V
+ public final fun setYref (Ljava/lang/String;)V
+}
+
+public final class space/kscience/plotly/models/Text$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/TextInfo : java/lang/Enum {
+ public static final field label Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+text Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+text+percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+text+value Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+text+value+percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+value Lspace/kscience/plotly/models/TextInfo;
+ public static final field label+value+percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field none Lspace/kscience/plotly/models/TextInfo;
+ public static final field percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field text Lspace/kscience/plotly/models/TextInfo;
+ public static final field text+percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field text+value Lspace/kscience/plotly/models/TextInfo;
+ public static final field text+value+percent Lspace/kscience/plotly/models/TextInfo;
+ public static final field value Lspace/kscience/plotly/models/TextInfo;
+ public static final field value+percent Lspace/kscience/plotly/models/TextInfo;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/TextInfo;
+ public static fun values ()[Lspace/kscience/plotly/models/TextInfo;
+}
+
+public final class space/kscience/plotly/models/TextPosition : java/lang/Enum {
+ public static final field auto Lspace/kscience/plotly/models/TextPosition;
+ public static final field bottom center Lspace/kscience/plotly/models/TextPosition;
+ public static final field bottom left Lspace/kscience/plotly/models/TextPosition;
+ public static final field bottom right Lspace/kscience/plotly/models/TextPosition;
+ public static final field inside Lspace/kscience/plotly/models/TextPosition;
+ public static final field middle center Lspace/kscience/plotly/models/TextPosition;
+ public static final field middle left Lspace/kscience/plotly/models/TextPosition;
+ public static final field middle right Lspace/kscience/plotly/models/TextPosition;
+ public static final field none Lspace/kscience/plotly/models/TextPosition;
+ public static final field outside Lspace/kscience/plotly/models/TextPosition;
+ public static final field top center Lspace/kscience/plotly/models/TextPosition;
+ public static final field top left Lspace/kscience/plotly/models/TextPosition;
+ public static final field top right Lspace/kscience/plotly/models/TextPosition;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/TextPosition;
+ public static fun values ()[Lspace/kscience/plotly/models/TextPosition;
+}
+
+public final class space/kscience/plotly/models/TickMode : java/lang/Enum {
+ public static final field array Lspace/kscience/plotly/models/TickMode;
+ public static final field auto Lspace/kscience/plotly/models/TickMode;
+ public static final field linear Lspace/kscience/plotly/models/TickMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/TickMode;
+ public static fun values ()[Lspace/kscience/plotly/models/TickMode;
+}
+
+public final class space/kscience/plotly/models/Ticks : java/lang/Enum {
+ public static final field "" Lspace/kscience/plotly/models/Ticks;
+ public static final field inside Lspace/kscience/plotly/models/Ticks;
+ public static final field outside Lspace/kscience/plotly/models/Ticks;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Ticks;
+ public static fun values ()[Lspace/kscience/plotly/models/Ticks;
+}
+
+public final class space/kscience/plotly/models/Title : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Title$Companion;
+ public fun ()V
+ public final fun font (Lkotlin/jvm/functions/Function1;)V
+ public final fun getFont ()Lspace/kscience/plotly/models/Font;
+ public final fun getPad ()Lspace/kscience/plotly/models/Margin;
+ public final fun getText ()Ljava/lang/String;
+ public final fun getX ()Ljava/lang/Number;
+ public final fun getXanchor ()Lspace/kscience/plotly/models/XAnchor;
+ public final fun getXref ()Lspace/kscience/plotly/models/Ref;
+ public final fun getY ()Ljava/lang/Number;
+ public final fun getYanchor ()Lspace/kscience/plotly/models/YAnchor;
+ public final fun getYref ()Lspace/kscience/plotly/models/Ref;
+ public final fun pad (Lkotlin/jvm/functions/Function1;)V
+ public final fun setFont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setPad (Lspace/kscience/plotly/models/Margin;)V
+ public final fun setText (Ljava/lang/String;)V
+ public final fun setX (Ljava/lang/Number;)V
+ public final fun setXanchor (Lspace/kscience/plotly/models/XAnchor;)V
+ public final fun setXref (Lspace/kscience/plotly/models/Ref;)V
+ public final fun setY (Ljava/lang/Number;)V
+ public final fun setYanchor (Lspace/kscience/plotly/models/YAnchor;)V
+ public final fun setYref (Lspace/kscience/plotly/models/Ref;)V
+}
+
+public final class space/kscience/plotly/models/Title$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public class space/kscience/plotly/models/Trace : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/Trace$Companion;
+ public static final field TEXT_AXIS Ljava/lang/String;
+ public static final field X_AXIS Ljava/lang/String;
+ public static final field Y_AXIS Ljava/lang/String;
+ public static final field Z_AXIS Ljava/lang/String;
+ public fun ()V
+ public final fun axis (Ljava/lang/String;)Lspace/kscience/plotly/models/TraceValues;
+ public final fun colorbar (Lkotlin/jvm/functions/Function1;)V
+ public final fun domain (Lkotlin/jvm/functions/Function1;)V
+ public final fun error_x (Lkotlin/jvm/functions/Function1;)V
+ public final fun error_y (Lkotlin/jvm/functions/Function1;)V
+ public final fun getAxis ()Lkotlin/properties/ReadOnlyProperty;
+ public final fun getCliponaxis ()Ljava/lang/Boolean;
+ public final fun getColorbar ()Lspace/kscience/plotly/models/ColorBar;
+ public final fun getColorscale ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getConnectgaps ()Ljava/lang/Boolean;
+ public final fun getDomain ()Lspace/kscience/plotly/models/Domain;
+ public final fun getDx ()Ljava/lang/Number;
+ public final fun getDy ()Ljava/lang/Number;
+ public final fun getError_x ()Lspace/kscience/plotly/models/Error;
+ public final fun getError_y ()Lspace/kscience/plotly/models/Error;
+ public final fun getFillcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getHoverinfo ()Ljava/lang/String;
+ public final fun getHoverlabel ()Lspace/kscience/plotly/models/Hoverlabel;
+ public final fun getHovertext ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getLabels ()Ljava/util/List;
+ public final fun getLegendgroup ()Ljava/lang/String;
+ public final fun getLine ()Lspace/kscience/plotly/models/LayoutLine;
+ public final fun getMarker ()Lspace/kscience/plotly/models/Marker;
+ public final fun getName ()Ljava/lang/String;
+ public final fun getOpacity ()Ljava/lang/Number;
+ public final fun getOrientation ()Lspace/kscience/plotly/models/Orientation;
+ public final fun getReversescale ()Ljava/lang/Boolean;
+ public final fun getScalegroup ()Ljava/lang/String;
+ public final fun getShowlegend ()Ljava/lang/Boolean;
+ public final fun getShowscale ()Ljava/lang/Boolean;
+ public final fun getText ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getTextfont ()Lspace/kscience/plotly/models/Font;
+ public final fun getTextposition ()Lspace/kscience/plotly/models/TextPosition;
+ public final fun getTextpositionsList ()Ljava/util/List;
+ public final fun getTranspose ()Ljava/lang/Boolean;
+ public final fun getType ()Lspace/kscience/plotly/models/TraceType;
+ public final fun getValues ()Ljava/util/List;
+ public final fun getVisible ()Lspace/kscience/plotly/models/Visible;
+ public final fun getX ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getX0 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getXcalendar ()Lspace/kscience/plotly/models/Calendar;
+ public final fun getY ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getY0 ()Lspace/kscience/dataforge/meta/Value;
+ public final fun getYcalendar ()Lspace/kscience/plotly/models/Calendar;
+ public final fun getZ ()Lspace/kscience/plotly/models/TraceValues;
+ public final fun getZauto ()Ljava/lang/Boolean;
+ public final fun getZmax ()Ljava/lang/Number;
+ public final fun getZmid ()Ljava/lang/Number;
+ public final fun getZmin ()Ljava/lang/Number;
+ public final fun hoverlabel (Lkotlin/jvm/functions/Function1;)V
+ public final fun labels (Ljava/lang/Iterable;)V
+ public final fun line (Lkotlin/jvm/functions/Function1;)V
+ public final fun marker (Lkotlin/jvm/functions/Function1;)V
+ public final fun setCliponaxis (Ljava/lang/Boolean;)V
+ public final fun setColorbar (Lspace/kscience/plotly/models/ColorBar;)V
+ public final fun setColorscale (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setConnectgaps (Ljava/lang/Boolean;)V
+ public final fun setDomain (Lspace/kscience/plotly/models/Domain;)V
+ public final fun setDx (Ljava/lang/Number;)V
+ public final fun setDy (Ljava/lang/Number;)V
+ public final fun setError_x (Lspace/kscience/plotly/models/Error;)V
+ public final fun setError_y (Lspace/kscience/plotly/models/Error;)V
+ public final fun setHoverinfo (Ljava/lang/String;)V
+ public final fun setHoverlabel (Lspace/kscience/plotly/models/Hoverlabel;)V
+ public final fun setLabels (Ljava/util/List;)V
+ public final fun setLegendgroup (Ljava/lang/String;)V
+ public final fun setLine (Lspace/kscience/plotly/models/LayoutLine;)V
+ public final fun setMarker (Lspace/kscience/plotly/models/Marker;)V
+ public final fun setName (Ljava/lang/String;)V
+ public final fun setOpacity (Ljava/lang/Number;)V
+ public final fun setOrientation (Lspace/kscience/plotly/models/Orientation;)V
+ public final fun setReversescale (Ljava/lang/Boolean;)V
+ public final fun setScalegroup (Ljava/lang/String;)V
+ public final fun setShowlegend (Ljava/lang/Boolean;)V
+ public final fun setShowscale (Ljava/lang/Boolean;)V
+ public final fun setTextfont (Lspace/kscience/plotly/models/Font;)V
+ public final fun setTextposition (Lspace/kscience/plotly/models/TextPosition;)V
+ public final fun setTextpositionsList (Ljava/util/List;)V
+ public final fun setTranspose (Ljava/lang/Boolean;)V
+ public final fun setType (Lspace/kscience/plotly/models/TraceType;)V
+ public final fun setValues (Ljava/util/List;)V
+ public final fun setVisible (Lspace/kscience/plotly/models/Visible;)V
+ public final fun setX0 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setXcalendar (Lspace/kscience/plotly/models/Calendar;)V
+ public final fun setY0 (Lspace/kscience/dataforge/meta/Value;)V
+ public final fun setYcalendar (Lspace/kscience/plotly/models/Calendar;)V
+ public final fun setZauto (Ljava/lang/Boolean;)V
+ public final fun setZmax (Ljava/lang/Number;)V
+ public final fun setZmid (Ljava/lang/Number;)V
+ public final fun setZmin (Ljava/lang/Number;)V
+ public final fun textfont (Lkotlin/jvm/functions/Function1;)V
+ public final fun values (Ljava/lang/Iterable;)V
+}
+
+public final class space/kscience/plotly/models/Trace$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/TraceKt {
+ public static final fun invoke (Lspace/kscience/dataforge/meta/SchemeSpec;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lspace/kscience/plotly/models/Trace;
+ public static synthetic fun invoke$default (Lspace/kscience/dataforge/meta/SchemeSpec;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lspace/kscience/plotly/models/Trace;
+}
+
+public final class space/kscience/plotly/models/TraceOrder : java/lang/Enum {
+ public static final field normal Lspace/kscience/plotly/models/TraceOrder;
+ public static final field reversed Lspace/kscience/plotly/models/TraceOrder;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/TraceOrder;
+ public static fun values ()[Lspace/kscience/plotly/models/TraceOrder;
+}
+
+public final class space/kscience/plotly/models/TraceType : java/lang/Enum {
+ public static final field bar Lspace/kscience/plotly/models/TraceType;
+ public static final field box Lspace/kscience/plotly/models/TraceType;
+ public static final field candlestick Lspace/kscience/plotly/models/TraceType;
+ public static final field choropleth Lspace/kscience/plotly/models/TraceType;
+ public static final field choroplethmapbox Lspace/kscience/plotly/models/TraceType;
+ public static final field cone Lspace/kscience/plotly/models/TraceType;
+ public static final field contour Lspace/kscience/plotly/models/TraceType;
+ public static final field heatmap Lspace/kscience/plotly/models/TraceType;
+ public static final field heatmapgl Lspace/kscience/plotly/models/TraceType;
+ public static final field histogram Lspace/kscience/plotly/models/TraceType;
+ public static final field histogram2d Lspace/kscience/plotly/models/TraceType;
+ public static final field histogram2dcontour Lspace/kscience/plotly/models/TraceType;
+ public static final field image Lspace/kscience/plotly/models/TraceType;
+ public static final field isosurface Lspace/kscience/plotly/models/TraceType;
+ public static final field mesh3d Lspace/kscience/plotly/models/TraceType;
+ public static final field ohlc Lspace/kscience/plotly/models/TraceType;
+ public static final field pie Lspace/kscience/plotly/models/TraceType;
+ public static final field scatter Lspace/kscience/plotly/models/TraceType;
+ public static final field scatter3d Lspace/kscience/plotly/models/TraceType;
+ public static final field scattergeo Lspace/kscience/plotly/models/TraceType;
+ public static final field scattergl Lspace/kscience/plotly/models/TraceType;
+ public static final field scattermapbox Lspace/kscience/plotly/models/TraceType;
+ public static final field streamtube Lspace/kscience/plotly/models/TraceType;
+ public static final field surface Lspace/kscience/plotly/models/TraceType;
+ public static final field table Lspace/kscience/plotly/models/TraceType;
+ public static final field violin Lspace/kscience/plotly/models/TraceType;
+ public static final field volume Lspace/kscience/plotly/models/TraceType;
+ public static final field waterfall Lspace/kscience/plotly/models/TraceType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/TraceType;
+ public static fun values ()[Lspace/kscience/plotly/models/TraceType;
+}
+
+public final class space/kscience/plotly/models/TraceValues {
+ public final fun getDoubles ()[D
+ public final fun getNumbers ()Ljava/lang/Iterable;
+ public final fun getOwner ()Lspace/kscience/dataforge/meta/Scheme;
+ public final fun getStrings ()Ljava/lang/Iterable;
+ public final fun getValue ()Lspace/kscience/dataforge/meta/Value;
+ public final fun invoke (Ljava/util/List;)V
+ public final fun invoke ([Ljava/lang/Number;)V
+ public final fun invoke ([Ljava/lang/String;)V
+ public final fun set (Ljava/lang/Object;)V
+ public final fun setDoubles ([D)V
+ public final fun setNumbers (Ljava/lang/Iterable;)V
+ public final fun setStrings (Ljava/lang/Iterable;)V
+ public final fun setValue (Lspace/kscience/dataforge/meta/Value;)V
+}
+
+public final class space/kscience/plotly/models/VerticalAlign : java/lang/Enum {
+ public static final field bottom Lspace/kscience/plotly/models/VerticalAlign;
+ public static final field middle Lspace/kscience/plotly/models/VerticalAlign;
+ public static final field top Lspace/kscience/plotly/models/VerticalAlign;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/VerticalAlign;
+ public static fun values ()[Lspace/kscience/plotly/models/VerticalAlign;
+}
+
+public final class space/kscience/plotly/models/Violin : space/kscience/plotly/models/Trace {
+ public static final field Companion Lspace/kscience/plotly/models/Violin$Companion;
+ public fun ()V
+ public final fun box (Lkotlin/jvm/functions/Function1;)V
+ public final fun getBox ()Lspace/kscience/plotly/models/ViolinBox;
+ public final fun getHoveron ()Lspace/kscience/plotly/models/ViolinHoveron;
+ public final fun getJitter ()Ljava/lang/Number;
+ public final fun getMeanline ()Lspace/kscience/plotly/models/MeanLine;
+ public final fun getPointpos ()Ljava/lang/Number;
+ public final fun getPoints ()Lspace/kscience/plotly/models/ViolinPoints;
+ public final fun getScalemode ()Lspace/kscience/plotly/models/ViolinScaleMode;
+ public final fun getSide ()Lspace/kscience/plotly/models/ViolinSide;
+ public final fun getSpan ()Ljava/util/List;
+ public final fun getSpanmode ()Lspace/kscience/plotly/models/SpanMode;
+ public final fun meanline (Lkotlin/jvm/functions/Function1;)V
+ public final fun setBox (Lspace/kscience/plotly/models/ViolinBox;)V
+ public final fun setHoveron (Lspace/kscience/plotly/models/ViolinHoveron;)V
+ public final fun setJitter (Ljava/lang/Number;)V
+ public final fun setMeanline (Lspace/kscience/plotly/models/MeanLine;)V
+ public final fun setPointpos (Ljava/lang/Number;)V
+ public final fun setPoints (Lspace/kscience/plotly/models/ViolinPoints;)V
+ public final fun setScalemode (Lspace/kscience/plotly/models/ViolinScaleMode;)V
+ public final fun setSide (Lspace/kscience/plotly/models/ViolinSide;)V
+ public final fun setSpan (Ljava/util/List;)V
+ public final fun setSpanmode (Lspace/kscience/plotly/models/SpanMode;)V
+ public final fun span (Ljava/lang/Iterable;)V
+}
+
+public final class space/kscience/plotly/models/Violin$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ViolinBox : space/kscience/dataforge/meta/Scheme {
+ public static final field Companion Lspace/kscience/plotly/models/ViolinBox$Companion;
+ public fun ()V
+ public final fun getFillcolor ()Lspace/kscience/plotly/models/Color;
+ public final fun getVisible ()Ljava/lang/Boolean;
+ public final fun getWidth ()Ljava/lang/Number;
+ public final fun setVisible (Ljava/lang/Boolean;)V
+ public final fun setWidth (Ljava/lang/Number;)V
+}
+
+public final class space/kscience/plotly/models/ViolinBox$Companion : space/kscience/dataforge/meta/SchemeSpec {
+}
+
+public final class space/kscience/plotly/models/ViolinHoveron : java/lang/Enum {
+ public static final field all Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field kde Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field points Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field points+kde Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field violins Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field violins+kde Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field violins+points Lspace/kscience/plotly/models/ViolinHoveron;
+ public static final field violins+points+kde Lspace/kscience/plotly/models/ViolinHoveron;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ViolinHoveron;
+ public static fun values ()[Lspace/kscience/plotly/models/ViolinHoveron;
+}
+
+public final class space/kscience/plotly/models/ViolinMode : java/lang/Enum {
+ public static final field group Lspace/kscience/plotly/models/ViolinMode;
+ public static final field overlay Lspace/kscience/plotly/models/ViolinMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ViolinMode;
+ public static fun values ()[Lspace/kscience/plotly/models/ViolinMode;
+}
+
+public final class space/kscience/plotly/models/ViolinPoints : java/lang/Enum {
+ public static final field all Lspace/kscience/plotly/models/ViolinPoints;
+ public static final field false Lspace/kscience/plotly/models/ViolinPoints;
+ public static final field outliers Lspace/kscience/plotly/models/ViolinPoints;
+ public static final field suspectedoutliers Lspace/kscience/plotly/models/ViolinPoints;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ViolinPoints;
+ public static fun values ()[Lspace/kscience/plotly/models/ViolinPoints;
+}
+
+public final class space/kscience/plotly/models/ViolinScaleMode : java/lang/Enum {
+ public static final field count Lspace/kscience/plotly/models/ViolinScaleMode;
+ public static final field width Lspace/kscience/plotly/models/ViolinScaleMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ViolinScaleMode;
+ public static fun values ()[Lspace/kscience/plotly/models/ViolinScaleMode;
+}
+
+public final class space/kscience/plotly/models/ViolinSide : java/lang/Enum {
+ public static final field both Lspace/kscience/plotly/models/ViolinSide;
+ public static final field negative Lspace/kscience/plotly/models/ViolinSide;
+ public static final field positive Lspace/kscience/plotly/models/ViolinSide;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ViolinSide;
+ public static fun values ()[Lspace/kscience/plotly/models/ViolinSide;
+}
+
+public final class space/kscience/plotly/models/Visible : java/lang/Enum {
+ public static final field false Lspace/kscience/plotly/models/Visible;
+ public static final field legendonly Lspace/kscience/plotly/models/Visible;
+ public static final field true Lspace/kscience/plotly/models/Visible;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/Visible;
+ public static fun values ()[Lspace/kscience/plotly/models/Visible;
+}
+
+public final class space/kscience/plotly/models/XAnchor : java/lang/Enum {
+ public static final field auto Lspace/kscience/plotly/models/XAnchor;
+ public static final field center Lspace/kscience/plotly/models/XAnchor;
+ public static final field left Lspace/kscience/plotly/models/XAnchor;
+ public static final field right Lspace/kscience/plotly/models/XAnchor;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/XAnchor;
+ public static fun values ()[Lspace/kscience/plotly/models/XAnchor;
+}
+
+public final class space/kscience/plotly/models/XPeriodAlignment : java/lang/Enum {
+ public static final field end Lspace/kscience/plotly/models/XPeriodAlignment;
+ public static final field middle Lspace/kscience/plotly/models/XPeriodAlignment;
+ public static final field start Lspace/kscience/plotly/models/XPeriodAlignment;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/XPeriodAlignment;
+ public static fun values ()[Lspace/kscience/plotly/models/XPeriodAlignment;
+}
+
+public final class space/kscience/plotly/models/YAnchor : java/lang/Enum {
+ public static final field auto Lspace/kscience/plotly/models/YAnchor;
+ public static final field bottom Lspace/kscience/plotly/models/YAnchor;
+ public static final field middle Lspace/kscience/plotly/models/YAnchor;
+ public static final field top Lspace/kscience/plotly/models/YAnchor;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/YAnchor;
+ public static fun values ()[Lspace/kscience/plotly/models/YAnchor;
+}
+
+public final class space/kscience/plotly/models/ZsmoothType : java/lang/Enum {
+ public static final field best Lspace/kscience/plotly/models/ZsmoothType;
+ public static final field false Lspace/kscience/plotly/models/ZsmoothType;
+ public static final field fast Lspace/kscience/plotly/models/ZsmoothType;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
+ public static fun valueOf (Ljava/lang/String;)Lspace/kscience/plotly/models/ZsmoothType;
+ public static fun values ()[Lspace/kscience/plotly/models/ZsmoothType;
+}
+
+public final class space/kscience/plotly/palettes/T10 {
+ public static final field BLUE Ljava/lang/String;
+ public static final field BROWN Ljava/lang/String;
+ public static final field CYAN Ljava/lang/String;
+ public static final field GRAY Ljava/lang/String;
+ public static final field GREEN Ljava/lang/String;
+ public static final field INSTANCE Lspace/kscience/plotly/palettes/T10;
+ public static final field OLIVE Ljava/lang/String;
+ public static final field ORANGE Ljava/lang/String;
+ public static final field PINK Ljava/lang/String;
+ public static final field PURPLE Ljava/lang/String;
+ public static final field RED Ljava/lang/String;
+}
+
+public final class space/kscience/plotly/palettes/Xkcd {
+ public static final field ACID_GREEN Ljava/lang/String;
+ public static final field ADOBE Ljava/lang/String;
+ public static final field ALGAE Ljava/lang/String;
+ public static final field ALGAE_GREEN Ljava/lang/String;
+ public static final field ALMOST_BLACK Ljava/lang/String;
+ public static final field AMBER Ljava/lang/String;
+ public static final field AMETHYST Ljava/lang/String;
+ public static final field APPLE Ljava/lang/String;
+ public static final field APPLE_GREEN Ljava/lang/String;
+ public static final field APRICOT Ljava/lang/String;
+ public static final field AQUA Ljava/lang/String;
+ public static final field AQUAMARINE Ljava/lang/String;
+ public static final field AQUA_BLUE Ljava/lang/String;
+ public static final field AQUA_GREEN Ljava/lang/String;
+ public static final field AQUA_MARINE Ljava/lang/String;
+ public static final field ARMY_GREEN Ljava/lang/String;
+ public static final field ASPARAGUS Ljava/lang/String;
+ public static final field AUBERGINE Ljava/lang/String;
+ public static final field AUBURN Ljava/lang/String;
+ public static final field AVOCADO Ljava/lang/String;
+ public static final field AVOCADO_GREEN Ljava/lang/String;
+ public static final field AZUL Ljava/lang/String;
+ public static final field AZURE Ljava/lang/String;
+ public static final field BABY_BLUE Ljava/lang/String;
+ public static final field BABY_GREEN Ljava/lang/String;
+ public static final field BABY_PINK Ljava/lang/String;
+ public static final field BABY_POO Ljava/lang/String;
+ public static final field BABY_POOP Ljava/lang/String;
+ public static final field BABY_POOP_GREEN Ljava/lang/String;
+ public static final field BABY_PUKE_GREEN Ljava/lang/String;
+ public static final field BABY_PURPLE Ljava/lang/String;
+ public static final field BABY_SHIT_BROWN Ljava/lang/String;
+ public static final field BABY_SHIT_GREEN Ljava/lang/String;
+ public static final field BANANA Ljava/lang/String;
+ public static final field BANANA_YELLOW Ljava/lang/String;
+ public static final field BARBIE_PINK Ljava/lang/String;
+ public static final field BARF_GREEN Ljava/lang/String;
+ public static final field BARNEY Ljava/lang/String;
+ public static final field BARNEY_PURPLE Ljava/lang/String;
+ public static final field BATTLESHIP_GREY Ljava/lang/String;
+ public static final field BEIGE Ljava/lang/String;
+ public static final field BERRY Ljava/lang/String;
+ public static final field BILE Ljava/lang/String;
+ public static final field BLACK Ljava/lang/String;
+ public static final field BLAND Ljava/lang/String;
+ public static final field BLOOD Ljava/lang/String;
+ public static final field BLOOD_ORANGE Ljava/lang/String;
+ public static final field BLOOD_RED Ljava/lang/String;
+ public static final field BLUE Ljava/lang/String;
+ public static final field BLUEBERRY Ljava/lang/String;
+ public static final field BLUEGREEN Ljava/lang/String;
+ public static final field BLUEGREY Ljava/lang/String;
+ public static final field BLUEY_GREEN Ljava/lang/String;
+ public static final field BLUEY_GREY Ljava/lang/String;
+ public static final field BLUEY_PURPLE Ljava/lang/String;
+ public static final field BLUE_BLUE Ljava/lang/String;
+ public static final field BLUE_GREEN Ljava/lang/String;
+ public static final field BLUE_GREY Ljava/lang/String;
+ public static final field BLUE_PURPLE Ljava/lang/String;
+ public static final field BLUE_VIOLET Ljava/lang/String;
+ public static final field BLUE_WITH_A_HINT_OF_PURPLE Ljava/lang/String;
+ public static final field BLUISH Ljava/lang/String;
+ public static final field BLUISH_GREEN Ljava/lang/String;
+ public static final field BLUISH_GREY Ljava/lang/String;
+ public static final field BLUISH_PURPLE Ljava/lang/String;
+ public static final field BLURPLE Ljava/lang/String;
+ public static final field BLUSH Ljava/lang/String;
+ public static final field BLUSH_PINK Ljava/lang/String;
+ public static final field BOOGER Ljava/lang/String;
+ public static final field BOOGER_GREEN Ljava/lang/String;
+ public static final field BORDEAUX Ljava/lang/String;
+ public static final field BORING_GREEN Ljava/lang/String;
+ public static final field BOTTLE_GREEN Ljava/lang/String;
+ public static final field BRICK Ljava/lang/String;
+ public static final field BRICK_ORANGE Ljava/lang/String;
+ public static final field BRICK_RED Ljava/lang/String;
+ public static final field BRIGHT_AQUA Ljava/lang/String;
+ public static final field BRIGHT_BLUE Ljava/lang/String;
+ public static final field BRIGHT_CYAN Ljava/lang/String;
+ public static final field BRIGHT_GREEN Ljava/lang/String;
+ public static final field BRIGHT_LAVENDER Ljava/lang/String;
+ public static final field BRIGHT_LIGHT_BLUE Ljava/lang/String;
+ public static final field BRIGHT_LIGHT_GREEN Ljava/lang/String;
+ public static final field BRIGHT_LILAC Ljava/lang/String;
+ public static final field BRIGHT_LIME Ljava/lang/String;
+ public static final field BRIGHT_LIME_GREEN Ljava/lang/String;
+ public static final field BRIGHT_MAGENTA Ljava/lang/String;
+ public static final field BRIGHT_OLIVE Ljava/lang/String;
+ public static final field BRIGHT_ORANGE Ljava/lang/String;
+ public static final field BRIGHT_PINK Ljava/lang/String;
+ public static final field BRIGHT_PURPLE Ljava/lang/String;
+ public static final field BRIGHT_RED Ljava/lang/String;
+ public static final field BRIGHT_SEA_GREEN Ljava/lang/String;
+ public static final field BRIGHT_SKY_BLUE Ljava/lang/String;
+ public static final field BRIGHT_TEAL Ljava/lang/String;
+ public static final field BRIGHT_TURQUOISE Ljava/lang/String;
+ public static final field BRIGHT_VIOLET Ljava/lang/String;
+ public static final field BRIGHT_YELLOW Ljava/lang/String;
+ public static final field BRIGHT_YELLOW_GREEN Ljava/lang/String;
+ public static final field BRITISH_RACING_GREEN Ljava/lang/String;
+ public static final field BRONZE Ljava/lang/String;
+ public static final field BROWN Ljava/lang/String;
+ public static final field BROWNISH Ljava/lang/String;
+ public static final field BROWNISH_GREEN Ljava/lang/String;
+ public static final field BROWNISH_GREY Ljava/lang/String;
+ public static final field BROWNISH_ORANGE Ljava/lang/String;
+ public static final field BROWNISH_PINK Ljava/lang/String;
+ public static final field BROWNISH_PURPLE Ljava/lang/String;
+ public static final field BROWNISH_RED Ljava/lang/String;
+ public static final field BROWNISH_YELLOW Ljava/lang/String;
+ public static final field BROWNY_GREEN Ljava/lang/String;
+ public static final field BROWNY_ORANGE Ljava/lang/String;
+ public static final field BROWN_GREEN Ljava/lang/String;
+ public static final field BROWN_GREY Ljava/lang/String;
+ public static final field BROWN_ORANGE Ljava/lang/String;
+ public static final field BROWN_RED Ljava/lang/String;
+ public static final field BROWN_YELLOW Ljava/lang/String;
+ public static final field BRUISE Ljava/lang/String;
+ public static final field BUBBLEGUM Ljava/lang/String;
+ public static final field BUBBLEGUM_PINK Ljava/lang/String;
+ public static final field BUBBLE_GUM_PINK Ljava/lang/String;
+ public static final field BUFF Ljava/lang/String;
+ public static final field BURGUNDY Ljava/lang/String;
+ public static final field BURNT_ORANGE Ljava/lang/String;
+ public static final field BURNT_RED Ljava/lang/String;
+ public static final field BURNT_SIENA Ljava/lang/String;
+ public static final field BURNT_SIENNA Ljava/lang/String;
+ public static final field BURNT_UMBER Ljava/lang/String;
+ public static final field BURNT_YELLOW Ljava/lang/String;
+ public static final field BURPLE Ljava/lang/String;
+ public static final field BUTTER Ljava/lang/String;
+ public static final field BUTTERSCOTCH Ljava/lang/String;
+ public static final field BUTTER_YELLOW Ljava/lang/String;
+ public static final field CADET_BLUE Ljava/lang/String;
+ public static final field CAMEL Ljava/lang/String;
+ public static final field CAMO Ljava/lang/String;
+ public static final field CAMOUFLAGE_GREEN Ljava/lang/String;
+ public static final field CAMO_GREEN Ljava/lang/String;
+ public static final field CANARY Ljava/lang/String;
+ public static final field CANARY_YELLOW Ljava/lang/String;
+ public static final field CANDY_PINK Ljava/lang/String;
+ public static final field CARAMEL Ljava/lang/String;
+ public static final field CARMINE Ljava/lang/String;
+ public static final field CARNATION Ljava/lang/String;
+ public static final field CARNATION_PINK Ljava/lang/String;
+ public static final field CAROLINA_BLUE Ljava/lang/String;
+ public static final field CELADON Ljava/lang/String;
+ public static final field CELERY Ljava/lang/String;
+ public static final field CEMENT Ljava/lang/String;
+ public static final field CERISE Ljava/lang/String;
+ public static final field CERULEAN Ljava/lang/String;
+ public static final field CERULEAN_BLUE Ljava/lang/String;
+ public static final field CHARCOAL Ljava/lang/String;
+ public static final field CHARCOAL_GREY Ljava/lang/String;
+ public static final field CHARTREUSE Ljava/lang/String;
+ public static final field CHERRY Ljava/lang/String;
+ public static final field CHERRY_RED Ljava/lang/String;
+ public static final field CHESTNUT Ljava/lang/String;
+ public static final field CHOCOLATE Ljava/lang/String;
+ public static final field CHOCOLATE_BROWN Ljava/lang/String;
+ public static final field CINNAMON Ljava/lang/String;
+ public static final field CLARET Ljava/lang/String;
+ public static final field CLAY Ljava/lang/String;
+ public static final field CLAY_BROWN Ljava/lang/String;
+ public static final field CLEAR_BLUE Ljava/lang/String;
+ public static final field CLOUDY_BLUE Ljava/lang/String;
+ public static final field COBALT Ljava/lang/String;
+ public static final field COBALT_BLUE Ljava/lang/String;
+ public static final field COCOA Ljava/lang/String;
+ public static final field COFFEE Ljava/lang/String;
+ public static final field COOL_BLUE Ljava/lang/String;
+ public static final field COOL_GREEN Ljava/lang/String;
+ public static final field COOL_GREY Ljava/lang/String;
+ public static final field COPPER Ljava/lang/String;
+ public static final field CORAL Ljava/lang/String;
+ public static final field CORAL_PINK Ljava/lang/String;
+ public static final field CORNFLOWER Ljava/lang/String;
+ public static final field CORNFLOWER_BLUE Ljava/lang/String;
+ public static final field CRANBERRY Ljava/lang/String;
+ public static final field CREAM Ljava/lang/String;
+ public static final field CREME Ljava/lang/String;
+ public static final field CRIMSON Ljava/lang/String;
+ public static final field CUSTARD Ljava/lang/String;
+ public static final field CYAN Ljava/lang/String;
+ public static final field DANDELION Ljava/lang/String;
+ public static final field DARK Ljava/lang/String;
+ public static final field DARKBLUE Ljava/lang/String;
+ public static final field DARKGREEN Ljava/lang/String;
+ public static final field DARKISH_BLUE Ljava/lang/String;
+ public static final field DARKISH_GREEN Ljava/lang/String;
+ public static final field DARKISH_PINK Ljava/lang/String;
+ public static final field DARKISH_PURPLE Ljava/lang/String;
+ public static final field DARKISH_RED Ljava/lang/String;
+ public static final field DARK_AQUA Ljava/lang/String;
+ public static final field DARK_AQUAMARINE Ljava/lang/String;
+ public static final field DARK_BEIGE Ljava/lang/String;
+ public static final field DARK_BLUE Ljava/lang/String;
+ public static final field DARK_BLUE_GREEN Ljava/lang/String;
+ public static final field DARK_BLUE_GREY Ljava/lang/String;
+ public static final field DARK_BROWN Ljava/lang/String;
+ public static final field DARK_CORAL Ljava/lang/String;
+ public static final field DARK_CREAM Ljava/lang/String;
+ public static final field DARK_CYAN Ljava/lang/String;
+ public static final field DARK_FOREST_GREEN Ljava/lang/String;
+ public static final field DARK_FUCHSIA Ljava/lang/String;
+ public static final field DARK_GOLD Ljava/lang/String;
+ public static final field DARK_GRASS_GREEN Ljava/lang/String;
+ public static final field DARK_GREEN Ljava/lang/String;
+ public static final field DARK_GREEN_BLUE Ljava/lang/String;
+ public static final field DARK_GREY Ljava/lang/String;
+ public static final field DARK_GREY_BLUE Ljava/lang/String;
+ public static final field DARK_HOT_PINK Ljava/lang/String;
+ public static final field DARK_INDIGO Ljava/lang/String;
+ public static final field DARK_KHAKI Ljava/lang/String;
+ public static final field DARK_LAVENDER Ljava/lang/String;
+ public static final field DARK_LILAC Ljava/lang/String;
+ public static final field DARK_LIME Ljava/lang/String;
+ public static final field DARK_LIME_GREEN Ljava/lang/String;
+ public static final field DARK_MAGENTA Ljava/lang/String;
+ public static final field DARK_MAROON Ljava/lang/String;
+ public static final field DARK_MAUVE Ljava/lang/String;
+ public static final field DARK_MINT Ljava/lang/String;
+ public static final field DARK_MINT_GREEN Ljava/lang/String;
+ public static final field DARK_MUSTARD Ljava/lang/String;
+ public static final field DARK_NAVY Ljava/lang/String;
+ public static final field DARK_NAVY_BLUE Ljava/lang/String;
+ public static final field DARK_OLIVE Ljava/lang/String;
+ public static final field DARK_OLIVE_GREEN Ljava/lang/String;
+ public static final field DARK_ORANGE Ljava/lang/String;
+ public static final field DARK_PASTEL_GREEN Ljava/lang/String;
+ public static final field DARK_PEACH Ljava/lang/String;
+ public static final field DARK_PERIWINKLE Ljava/lang/String;
+ public static final field DARK_PINK Ljava/lang/String;
+ public static final field DARK_PLUM Ljava/lang/String;
+ public static final field DARK_PURPLE Ljava/lang/String;
+ public static final field DARK_RED Ljava/lang/String;
+ public static final field DARK_ROSE Ljava/lang/String;
+ public static final field DARK_ROYAL_BLUE Ljava/lang/String;
+ public static final field DARK_SAGE Ljava/lang/String;
+ public static final field DARK_SALMON Ljava/lang/String;
+ public static final field DARK_SAND Ljava/lang/String;
+ public static final field DARK_SEAFOAM Ljava/lang/String;
+ public static final field DARK_SEAFOAM_GREEN Ljava/lang/String;
+ public static final field DARK_SEA_GREEN Ljava/lang/String;
+ public static final field DARK_SKY_BLUE Ljava/lang/String;
+ public static final field DARK_SLATE_BLUE Ljava/lang/String;
+ public static final field DARK_TAN Ljava/lang/String;
+ public static final field DARK_TAUPE Ljava/lang/String;
+ public static final field DARK_TEAL Ljava/lang/String;
+ public static final field DARK_TURQUOISE Ljava/lang/String;
+ public static final field DARK_VIOLET Ljava/lang/String;
+ public static final field DARK_YELLOW Ljava/lang/String;
+ public static final field DARK_YELLOW_GREEN Ljava/lang/String;
+ public static final field DEEP_AQUA Ljava/lang/String;
+ public static final field DEEP_BLUE Ljava/lang/String;
+ public static final field DEEP_BROWN Ljava/lang/String;
+ public static final field DEEP_GREEN Ljava/lang/String;
+ public static final field DEEP_LAVENDER Ljava/lang/String;
+ public static final field DEEP_LILAC Ljava/lang/String;
+ public static final field DEEP_MAGENTA Ljava/lang/String;
+ public static final field DEEP_ORANGE Ljava/lang/String;
+ public static final field DEEP_PINK Ljava/lang/String;
+ public static final field DEEP_PURPLE Ljava/lang/String;
+ public static final field DEEP_RED Ljava/lang/String;
+ public static final field DEEP_ROSE Ljava/lang/String;
+ public static final field DEEP_SEA_BLUE Ljava/lang/String;
+ public static final field DEEP_SKY_BLUE Ljava/lang/String;
+ public static final field DEEP_TEAL Ljava/lang/String;
+ public static final field DEEP_TURQUOISE Ljava/lang/String;
+ public static final field DEEP_VIOLET Ljava/lang/String;
+ public static final field DENIM Ljava/lang/String;
+ public static final field DENIM_BLUE Ljava/lang/String;
+ public static final field DESERT Ljava/lang/String;
+ public static final field DIARRHEA Ljava/lang/String;
+ public static final field DIRT Ljava/lang/String;
+ public static final field DIRTY_BLUE Ljava/lang/String;
+ public static final field DIRTY_GREEN Ljava/lang/String;
+ public static final field DIRTY_ORANGE Ljava/lang/String;
+ public static final field DIRTY_PINK Ljava/lang/String;
+ public static final field DIRTY_PURPLE Ljava/lang/String;
+ public static final field DIRTY_YELLOW Ljava/lang/String;
+ public static final field DIRT_BROWN Ljava/lang/String;
+ public static final field DODGER_BLUE Ljava/lang/String;
+ public static final field DRAB Ljava/lang/String;
+ public static final field DRAB_GREEN Ljava/lang/String;
+ public static final field DRIED_BLOOD Ljava/lang/String;
+ public static final field DUCK_EGG_BLUE Ljava/lang/String;
+ public static final field DULL_BLUE Ljava/lang/String;
+ public static final field DULL_BROWN Ljava/lang/String;
+ public static final field DULL_GREEN Ljava/lang/String;
+ public static final field DULL_ORANGE Ljava/lang/String;
+ public static final field DULL_PINK Ljava/lang/String;
+ public static final field DULL_PURPLE Ljava/lang/String;
+ public static final field DULL_RED Ljava/lang/String;
+ public static final field DULL_TEAL Ljava/lang/String;
+ public static final field DULL_YELLOW Ljava/lang/String;
+ public static final field DUSK Ljava/lang/String;
+ public static final field DUSKY_BLUE Ljava/lang/String;
+ public static final field DUSKY_PINK Ljava/lang/String;
+ public static final field DUSKY_PURPLE Ljava/lang/String;
+ public static final field DUSKY_ROSE Ljava/lang/String;
+ public static final field DUSK_BLUE Ljava/lang/String;
+ public static final field DUST Ljava/lang/String;
+ public static final field DUSTY_BLUE Ljava/lang/String;
+ public static final field DUSTY_GREEN Ljava/lang/String;
+ public static final field DUSTY_LAVENDER Ljava/lang/String;
+ public static final field DUSTY_ORANGE Ljava/lang/String;
+ public static final field DUSTY_PINK Ljava/lang/String;
+ public static final field DUSTY_PURPLE Ljava/lang/String;
+ public static final field DUSTY_RED Ljava/lang/String;
+ public static final field DUSTY_ROSE Ljava/lang/String;
+ public static final field DUSTY_TEAL Ljava/lang/String;
+ public static final field EARTH Ljava/lang/String;
+ public static final field EASTER_GREEN Ljava/lang/String;
+ public static final field EASTER_PURPLE Ljava/lang/String;
+ public static final field ECRU Ljava/lang/String;
+ public static final field EGGPLANT Ljava/lang/String;
+ public static final field EGGPLANT_PURPLE Ljava/lang/String;
+ public static final field EGGSHELL Ljava/lang/String;
+ public static final field EGGSHELL_BLUE Ljava/lang/String;
+ public static final field EGG_SHELL Ljava/lang/String;
+ public static final field ELECTRIC_BLUE Ljava/lang/String;
+ public static final field ELECTRIC_GREEN Ljava/lang/String;
+ public static final field ELECTRIC_LIME Ljava/lang/String;
+ public static final field ELECTRIC_PINK Ljava/lang/String;
+ public static final field ELECTRIC_PURPLE Ljava/lang/String;
+ public static final field EMERALD Ljava/lang/String;
+ public static final field EMERALD_GREEN Ljava/lang/String;
+ public static final field EVERGREEN Ljava/lang/String;
+ public static final field FADED_BLUE Ljava/lang/String;
+ public static final field FADED_GREEN Ljava/lang/String;
+ public static final field FADED_ORANGE Ljava/lang/String;
+ public static final field FADED_PINK Ljava/lang/String;
+ public static final field FADED_PURPLE Ljava/lang/String;
+ public static final field FADED_RED Ljava/lang/String;
+ public static final field FADED_YELLOW Ljava/lang/String;
+ public static final field FAWN Ljava/lang/String;
+ public static final field FERN Ljava/lang/String;
+ public static final field FERN_GREEN Ljava/lang/String;
+ public static final field FIRE_ENGINE_RED Ljava/lang/String;
+ public static final field FLAT_BLUE Ljava/lang/String;
+ public static final field FLAT_GREEN Ljava/lang/String;
+ public static final field FLUORESCENT_GREEN Ljava/lang/String;
+ public static final field FLURO_GREEN Ljava/lang/String;
+ public static final field FOAM_GREEN Ljava/lang/String;
+ public static final field FOREST Ljava/lang/String;
+ public static final field FOREST_GREEN Ljava/lang/String;
+ public static final field FORREST_GREEN Ljava/lang/String;
+ public static final field FRENCH_BLUE Ljava/lang/String;
+ public static final field FRESH_GREEN Ljava/lang/String;
+ public static final field FROG_GREEN Ljava/lang/String;
+ public static final field FUCHSIA Ljava/lang/String;
+ public static final field GOLD Ljava/lang/String;
+ public static final field GOLDEN Ljava/lang/String;
+ public static final field GOLDENROD Ljava/lang/String;
+ public static final field GOLDEN_BROWN Ljava/lang/String;
+ public static final field GOLDEN_ROD Ljava/lang/String;
+ public static final field GOLDEN_YELLOW Ljava/lang/String;
+ public static final field GRAPE Ljava/lang/String;
+ public static final field GRAPEFRUIT Ljava/lang/String;
+ public static final field GRAPE_PURPLE Ljava/lang/String;
+ public static final field GRASS Ljava/lang/String;
+ public static final field GRASSY_GREEN Ljava/lang/String;
+ public static final field GRASS_GREEN Ljava/lang/String;
+ public static final field GREEN Ljava/lang/String;
+ public static final field GREENBLUE Ljava/lang/String;
+ public static final field GREENISH Ljava/lang/String;
+ public static final field GREENISH_BEIGE Ljava/lang/String;
+ public static final field GREENISH_BLUE Ljava/lang/String;
+ public static final field GREENISH_BROWN Ljava/lang/String;
+ public static final field GREENISH_CYAN Ljava/lang/String;
+ public static final field GREENISH_GREY Ljava/lang/String;
+ public static final field GREENISH_TAN Ljava/lang/String;
+ public static final field GREENISH_TEAL Ljava/lang/String;
+ public static final field GREENISH_TURQUOISE Ljava/lang/String;
+ public static final field GREENISH_YELLOW Ljava/lang/String;
+ public static final field GREENY_BLUE Ljava/lang/String;
+ public static final field GREENY_BROWN Ljava/lang/String;
+ public static final field GREENY_GREY Ljava/lang/String;
+ public static final field GREENY_YELLOW Ljava/lang/String;
+ public static final field GREEN_APPLE Ljava/lang/String;
+ public static final field GREEN_BLUE Ljava/lang/String;
+ public static final field GREEN_BROWN Ljava/lang/String;
+ public static final field GREEN_GREY Ljava/lang/String;
+ public static final field GREEN_TEAL Ljava/lang/String;
+ public static final field GREEN_YELLOW Ljava/lang/String;
+ public static final field GREY Ljava/lang/String;
+ public static final field GREYBLUE Ljava/lang/String;
+ public static final field GREYISH Ljava/lang/String;
+ public static final field GREYISH_BLUE Ljava/lang/String;
+ public static final field GREYISH_BROWN Ljava/lang/String;
+ public static final field GREYISH_GREEN Ljava/lang/String;
+ public static final field GREYISH_PINK Ljava/lang/String;
+ public static final field GREYISH_PURPLE Ljava/lang/String;
+ public static final field GREYISH_TEAL Ljava/lang/String;
+ public static final field GREY_BLUE Ljava/lang/String;
+ public static final field GREY_BROWN Ljava/lang/String;
+ public static final field GREY_GREEN Ljava/lang/String;
+ public static final field GREY_PINK Ljava/lang/String;
+ public static final field GREY_PURPLE Ljava/lang/String;
+ public static final field GREY_TEAL Ljava/lang/String;
+ public static final field GROSS_GREEN Ljava/lang/String;
+ public static final field GUNMETAL Ljava/lang/String;
+ public static final field HAZEL Ljava/lang/String;
+ public static final field HEATHER Ljava/lang/String;
+ public static final field HELIOTROPE Ljava/lang/String;
+ public static final field HIGHLIGHTER_GREEN Ljava/lang/String;
+ public static final field HOSPITAL_GREEN Ljava/lang/String;
+ public static final field HOT_GREEN Ljava/lang/String;
+ public static final field HOT_MAGENTA Ljava/lang/String;
+ public static final field HOT_PINK Ljava/lang/String;
+ public static final field HOT_PURPLE Ljava/lang/String;
+ public static final field HUNTER_GREEN Ljava/lang/String;
+ public static final field ICE Ljava/lang/String;
+ public static final field ICE_BLUE Ljava/lang/String;
+ public static final field ICKY_GREEN Ljava/lang/String;
+ public static final field INDIAN_RED Ljava/lang/String;
+ public static final field INDIGO Ljava/lang/String;
+ public static final field INDIGO_BLUE Ljava/lang/String;
+ public static final field INSTANCE Lspace/kscience/plotly/palettes/Xkcd;
+ public static final field IRIS Ljava/lang/String;
+ public static final field IRISH_GREEN Ljava/lang/String;
+ public static final field IVORY Ljava/lang/String;
+ public static final field JADE Ljava/lang/String;
+ public static final field JADE_GREEN Ljava/lang/String;
+ public static final field JUNGLE_GREEN Ljava/lang/String;
+ public static final field KELLEY_GREEN Ljava/lang/String;
+ public static final field KELLY_GREEN Ljava/lang/String;
+ public static final field KERMIT_GREEN Ljava/lang/String;
+ public static final field KEY_LIME Ljava/lang/String;
+ public static final field KHAKI Ljava/lang/String;
+ public static final field KHAKI_GREEN Ljava/lang/String;
+ public static final field KIWI Ljava/lang/String;
+ public static final field KIWI_GREEN Ljava/lang/String;
+ public static final field LAVENDER Ljava/lang/String;
+ public static final field LAVENDER_BLUE Ljava/lang/String;
+ public static final field LAVENDER_PINK Ljava/lang/String;
+ public static final field LAWN_GREEN Ljava/lang/String;
+ public static final field LEAF Ljava/lang/String;
+ public static final field LEAFY_GREEN Ljava/lang/String;
+ public static final field LEAF_GREEN Ljava/lang/String;
+ public static final field LEATHER Ljava/lang/String;
+ public static final field LEMON Ljava/lang/String;
+ public static final field LEMON_GREEN Ljava/lang/String;
+ public static final field LEMON_LIME Ljava/lang/String;
+ public static final field LEMON_YELLOW Ljava/lang/String;
+ public static final field LICHEN Ljava/lang/String;
+ public static final field LIGHTBLUE Ljava/lang/String;
+ public static final field LIGHTER_GREEN Ljava/lang/String;
+ public static final field LIGHTER_PURPLE Ljava/lang/String;
+ public static final field LIGHTGREEN Ljava/lang/String;
+ public static final field LIGHTISH_BLUE Ljava/lang/String;
+ public static final field LIGHTISH_GREEN Ljava/lang/String;
+ public static final field LIGHTISH_PURPLE Ljava/lang/String;
+ public static final field LIGHTISH_RED Ljava/lang/String;
+ public static final field LIGHT_AQUA Ljava/lang/String;
+ public static final field LIGHT_AQUAMARINE Ljava/lang/String;
+ public static final field LIGHT_BEIGE Ljava/lang/String;
+ public static final field LIGHT_BLUE Ljava/lang/String;
+ public static final field LIGHT_BLUE_GREEN Ljava/lang/String;
+ public static final field LIGHT_BLUE_GREY Ljava/lang/String;
+ public static final field LIGHT_BLUISH_GREEN Ljava/lang/String;
+ public static final field LIGHT_BRIGHT_GREEN Ljava/lang/String;
+ public static final field LIGHT_BROWN Ljava/lang/String;
+ public static final field LIGHT_BURGUNDY Ljava/lang/String;
+ public static final field LIGHT_CYAN Ljava/lang/String;
+ public static final field LIGHT_EGGPLANT Ljava/lang/String;
+ public static final field LIGHT_FOREST_GREEN Ljava/lang/String;
+ public static final field LIGHT_GOLD Ljava/lang/String;
+ public static final field LIGHT_GRASS_GREEN Ljava/lang/String;
+ public static final field LIGHT_GREEN Ljava/lang/String;
+ public static final field LIGHT_GREENISH_BLUE Ljava/lang/String;
+ public static final field LIGHT_GREEN_BLUE Ljava/lang/String;
+ public static final field LIGHT_GREY Ljava/lang/String;
+ public static final field LIGHT_GREY_BLUE Ljava/lang/String;
+ public static final field LIGHT_GREY_GREEN Ljava/lang/String;
+ public static final field LIGHT_INDIGO Ljava/lang/String;
+ public static final field LIGHT_KHAKI Ljava/lang/String;
+ public static final field LIGHT_LAVENDAR Ljava/lang/String;
+ public static final field LIGHT_LAVENDER Ljava/lang/String;
+ public static final field LIGHT_LIGHT_BLUE Ljava/lang/String;
+ public static final field LIGHT_LIGHT_GREEN Ljava/lang/String;
+ public static final field LIGHT_LILAC Ljava/lang/String;
+ public static final field LIGHT_LIME Ljava/lang/String;
+ public static final field LIGHT_LIME_GREEN Ljava/lang/String;
+ public static final field LIGHT_MAGENTA Ljava/lang/String;
+ public static final field LIGHT_MAROON Ljava/lang/String;
+ public static final field LIGHT_MAUVE Ljava/lang/String;
+ public static final field LIGHT_MINT Ljava/lang/String;
+ public static final field LIGHT_MINT_GREEN Ljava/lang/String;
+ public static final field LIGHT_MOSS_GREEN Ljava/lang/String;
+ public static final field LIGHT_MUSTARD Ljava/lang/String;
+ public static final field LIGHT_NAVY Ljava/lang/String;
+ public static final field LIGHT_NAVY_BLUE Ljava/lang/String;
+ public static final field LIGHT_NEON_GREEN Ljava/lang/String;
+ public static final field LIGHT_OLIVE Ljava/lang/String;
+ public static final field LIGHT_OLIVE_GREEN Ljava/lang/String;
+ public static final field LIGHT_ORANGE Ljava/lang/String;
+ public static final field LIGHT_PASTEL_GREEN Ljava/lang/String;
+ public static final field LIGHT_PEACH Ljava/lang/String;
+ public static final field LIGHT_PEA_GREEN Ljava/lang/String;
+ public static final field LIGHT_PERIWINKLE Ljava/lang/String;
+ public static final field LIGHT_PINK Ljava/lang/String;
+ public static final field LIGHT_PLUM Ljava/lang/String;
+ public static final field LIGHT_PURPLE Ljava/lang/String;
+ public static final field LIGHT_RED Ljava/lang/String;
+ public static final field LIGHT_ROSE Ljava/lang/String;
+ public static final field LIGHT_ROYAL_BLUE Ljava/lang/String;
+ public static final field LIGHT_SAGE Ljava/lang/String;
+ public static final field LIGHT_SALMON Ljava/lang/String;
+ public static final field LIGHT_SEAFOAM Ljava/lang/String;
+ public static final field LIGHT_SEAFOAM_GREEN Ljava/lang/String;
+ public static final field LIGHT_SEA_GREEN Ljava/lang/String;
+ public static final field LIGHT_SKY_BLUE Ljava/lang/String;
+ public static final field LIGHT_TAN Ljava/lang/String;
+ public static final field LIGHT_TEAL Ljava/lang/String;
+ public static final field LIGHT_TURQUOISE Ljava/lang/String;
+ public static final field LIGHT_URPLE Ljava/lang/String;
+ public static final field LIGHT_VIOLET Ljava/lang/String;
+ public static final field LIGHT_YELLOW Ljava/lang/String;
+ public static final field LIGHT_YELLOWISH_GREEN Ljava/lang/String;
+ public static final field LIGHT_YELLOW_GREEN Ljava/lang/String;
+ public static final field LILAC Ljava/lang/String;
+ public static final field LILIAC Ljava/lang/String;
+ public static final field LIME Ljava/lang/String;
+ public static final field LIME_GREEN Ljava/lang/String;
+ public static final field LIME_YELLOW Ljava/lang/String;
+ public static final field LIPSTICK Ljava/lang/String;
+ public static final field LIPSTICK_RED Ljava/lang/String;
+ public static final field MACARONI_AND_CHEESE Ljava/lang/String;
+ public static final field MAGENTA Ljava/lang/String;
+ public static final field MAHOGANY Ljava/lang/String;
+ public static final field MAIZE Ljava/lang/String;
+ public static final field MANGO Ljava/lang/String;
+ public static final field MANILLA Ljava/lang/String;
+ public static final field MARIGOLD Ljava/lang/String;
+ public static final field MARINE Ljava/lang/String;
+ public static final field MARINE_BLUE Ljava/lang/String;
+ public static final field MAROON Ljava/lang/String;
+ public static final field MAUVE Ljava/lang/String;
+ public static final field MEDIUM_BLUE Ljava/lang/String;
+ public static final field MEDIUM_BROWN Ljava/lang/String;
+ public static final field MEDIUM_GREEN Ljava/lang/String;
+ public static final field MEDIUM_GREY Ljava/lang/String;
+ public static final field MEDIUM_PINK Ljava/lang/String;
+ public static final field MEDIUM_PURPLE Ljava/lang/String;
+ public static final field MELON Ljava/lang/String;
+ public static final field MERLOT Ljava/lang/String;
+ public static final field METALLIC_BLUE Ljava/lang/String;
+ public static final field MIDNIGHT Ljava/lang/String;
+ public static final field MIDNIGHT_BLUE Ljava/lang/String;
+ public static final field MIDNIGHT_PURPLE Ljava/lang/String;
+ public static final field MID_BLUE Ljava/lang/String;
+ public static final field MID_GREEN Ljava/lang/String;
+ public static final field MILITARY_GREEN Ljava/lang/String;
+ public static final field MILK_CHOCOLATE Ljava/lang/String;
+ public static final field MINT Ljava/lang/String;
+ public static final field MINTY_GREEN Ljava/lang/String;
+ public static final field MINT_GREEN Ljava/lang/String;
+ public static final field MOCHA Ljava/lang/String;
+ public static final field MOSS Ljava/lang/String;
+ public static final field MOSSY_GREEN Ljava/lang/String;
+ public static final field MOSS_GREEN Ljava/lang/String;
+ public static final field MUD Ljava/lang/String;
+ public static final field MUDDY_BROWN Ljava/lang/String;
+ public static final field MUDDY_GREEN Ljava/lang/String;
+ public static final field MUDDY_YELLOW Ljava/lang/String;
+ public static final field MUD_BROWN Ljava/lang/String;
+ public static final field MUD_GREEN Ljava/lang/String;
+ public static final field MULBERRY Ljava/lang/String;
+ public static final field MURKY_GREEN Ljava/lang/String;
+ public static final field MUSHROOM Ljava/lang/String;
+ public static final field MUSTARD Ljava/lang/String;
+ public static final field MUSTARD_BROWN Ljava/lang/String;
+ public static final field MUSTARD_GREEN Ljava/lang/String;
+ public static final field MUSTARD_YELLOW Ljava/lang/String;
+ public static final field MUTED_BLUE Ljava/lang/String;
+ public static final field MUTED_GREEN Ljava/lang/String;
+ public static final field MUTED_PINK Ljava/lang/String;
+ public static final field MUTED_PURPLE Ljava/lang/String;
+ public static final field NASTY_GREEN Ljava/lang/String;
+ public static final field NAVY Ljava/lang/String;
+ public static final field NAVY_BLUE Ljava/lang/String;
+ public static final field NAVY_GREEN Ljava/lang/String;
+ public static final field NEON_BLUE Ljava/lang/String;
+ public static final field NEON_GREEN Ljava/lang/String;
+ public static final field NEON_PINK Ljava/lang/String;
+ public static final field NEON_PURPLE Ljava/lang/String;
+ public static final field NEON_RED Ljava/lang/String;
+ public static final field NEON_YELLOW Ljava/lang/String;
+ public static final field NICE_BLUE Ljava/lang/String;
+ public static final field NIGHT_BLUE Ljava/lang/String;
+ public static final field OCEAN Ljava/lang/String;
+ public static final field OCEAN_BLUE Ljava/lang/String;
+ public static final field OCEAN_GREEN Ljava/lang/String;
+ public static final field OCHER Ljava/lang/String;
+ public static final field OCHRE Ljava/lang/String;
+ public static final field OCRE Ljava/lang/String;
+ public static final field OFF_BLUE Ljava/lang/String;
+ public static final field OFF_GREEN Ljava/lang/String;
+ public static final field OFF_WHITE Ljava/lang/String;
+ public static final field OFF_YELLOW Ljava/lang/String;
+ public static final field OLD_PINK Ljava/lang/String;
+ public static final field OLD_ROSE Ljava/lang/String;
+ public static final field OLIVE Ljava/lang/String;
+ public static final field OLIVE_BROWN Ljava/lang/String;
+ public static final field OLIVE_DRAB Ljava/lang/String;
+ public static final field OLIVE_GREEN Ljava/lang/String;
+ public static final field OLIVE_YELLOW Ljava/lang/String;
+ public static final field ORANGE Ljava/lang/String;
+ public static final field ORANGEISH Ljava/lang/String;
+ public static final field ORANGERED Ljava/lang/String;
+ public static final field ORANGEY_BROWN Ljava/lang/String;
+ public static final field ORANGEY_RED Ljava/lang/String;
+ public static final field ORANGEY_YELLOW Ljava/lang/String;
+ public static final field ORANGE_BROWN Ljava/lang/String;
+ public static final field ORANGE_PINK Ljava/lang/String;
+ public static final field ORANGE_RED Ljava/lang/String;
+ public static final field ORANGE_YELLOW Ljava/lang/String;
+ public static final field ORANGISH Ljava/lang/String;
+ public static final field ORANGISH_BROWN Ljava/lang/String;
+ public static final field ORANGISH_RED Ljava/lang/String;
+ public static final field ORCHID Ljava/lang/String;
+ public static final field PALE Ljava/lang/String;
+ public static final field PALE_AQUA Ljava/lang/String;
+ public static final field PALE_BLUE Ljava/lang/String;
+ public static final field PALE_BROWN Ljava/lang/String;
+ public static final field PALE_CYAN Ljava/lang/String;
+ public static final field PALE_GOLD Ljava/lang/String;
+ public static final field PALE_GREEN Ljava/lang/String;
+ public static final field PALE_GREY Ljava/lang/String;
+ public static final field PALE_LAVENDER Ljava/lang/String;
+ public static final field PALE_LIGHT_GREEN Ljava/lang/String;
+ public static final field PALE_LILAC Ljava/lang/String;
+ public static final field PALE_LIME Ljava/lang/String;
+ public static final field PALE_LIME_GREEN Ljava/lang/String;
+ public static final field PALE_MAGENTA Ljava/lang/String;
+ public static final field PALE_MAUVE Ljava/lang/String;
+ public static final field PALE_OLIVE Ljava/lang/String;
+ public static final field PALE_OLIVE_GREEN Ljava/lang/String;
+ public static final field PALE_ORANGE Ljava/lang/String;
+ public static final field PALE_PEACH Ljava/lang/String;
+ public static final field PALE_PINK Ljava/lang/String;
+ public static final field PALE_PURPLE Ljava/lang/String;
+ public static final field PALE_RED Ljava/lang/String;
+ public static final field PALE_ROSE Ljava/lang/String;
+ public static final field PALE_SALMON Ljava/lang/String;
+ public static final field PALE_SKY_BLUE Ljava/lang/String;
+ public static final field PALE_TEAL Ljava/lang/String;
+ public static final field PALE_TURQUOISE Ljava/lang/String;
+ public static final field PALE_VIOLET Ljava/lang/String;
+ public static final field PALE_YELLOW Ljava/lang/String;
+ public static final field PARCHMENT Ljava/lang/String;
+ public static final field PASTEL_BLUE Ljava/lang/String;
+ public static final field PASTEL_GREEN Ljava/lang/String;
+ public static final field PASTEL_ORANGE Ljava/lang/String;
+ public static final field PASTEL_PINK Ljava/lang/String;
+ public static final field PASTEL_PURPLE Ljava/lang/String;
+ public static final field PASTEL_RED Ljava/lang/String;
+ public static final field PASTEL_YELLOW Ljava/lang/String;
+ public static final field PEA Ljava/lang/String;
+ public static final field PEACH Ljava/lang/String;
+ public static final field PEACHY_PINK Ljava/lang/String;
+ public static final field PEACOCK_BLUE Ljava/lang/String;
+ public static final field PEAR Ljava/lang/String;
+ public static final field PEA_GREEN Ljava/lang/String;
+ public static final field PEA_SOUP Ljava/lang/String;
+ public static final field PEA_SOUP_GREEN Ljava/lang/String;
+ public static final field PERIWINKLE Ljava/lang/String;
+ public static final field PERIWINKLE_BLUE Ljava/lang/String;
+ public static final field PERRYWINKLE Ljava/lang/String;
+ public static final field PETROL Ljava/lang/String;
+ public static final field PIG_PINK Ljava/lang/String;
+ public static final field PINE Ljava/lang/String;
+ public static final field PINE_GREEN Ljava/lang/String;
+ public static final field PINK Ljava/lang/String;
+ public static final field PINKISH Ljava/lang/String;
+ public static final field PINKISH_BROWN Ljava/lang/String;
+ public static final field PINKISH_GREY Ljava/lang/String;
+ public static final field PINKISH_ORANGE Ljava/lang/String;
+ public static final field PINKISH_PURPLE Ljava/lang/String;
+ public static final field PINKISH_RED Ljava/lang/String;
+ public static final field PINKISH_TAN Ljava/lang/String;
+ public static final field PINKY Ljava/lang/String;
+ public static final field PINKY_PURPLE Ljava/lang/String;
+ public static final field PINKY_RED Ljava/lang/String;
+ public static final field PINK_PURPLE Ljava/lang/String;
+ public static final field PINK_RED Ljava/lang/String;
+ public static final field PISS_YELLOW Ljava/lang/String;
+ public static final field PISTACHIO Ljava/lang/String;
+ public static final field PLUM Ljava/lang/String;
+ public static final field PLUM_PURPLE Ljava/lang/String;
+ public static final field POISON_GREEN Ljava/lang/String;
+ public static final field POO Ljava/lang/String;
+ public static final field POOP Ljava/lang/String;
+ public static final field POOP_BROWN Ljava/lang/String;
+ public static final field POOP_GREEN Ljava/lang/String;
+ public static final field POO_BROWN Ljava/lang/String;
+ public static final field POWDER_BLUE Ljava/lang/String;
+ public static final field POWDER_PINK Ljava/lang/String;
+ public static final field PRIMARY_BLUE Ljava/lang/String;
+ public static final field PRUSSIAN_BLUE Ljava/lang/String;
+ public static final field PUCE Ljava/lang/String;
+ public static final field PUKE Ljava/lang/String;
+ public static final field PUKE_BROWN Ljava/lang/String;
+ public static final field PUKE_GREEN Ljava/lang/String;
+ public static final field PUKE_YELLOW Ljava/lang/String;
+ public static final field PUMPKIN Ljava/lang/String;
+ public static final field PUMPKIN_ORANGE Ljava/lang/String;
+ public static final field PURE_BLUE Ljava/lang/String;
+ public static final field PURPLE Ljava/lang/String;
+ public static final field PURPLEISH Ljava/lang/String;
+ public static final field PURPLEISH_BLUE Ljava/lang/String;
+ public static final field PURPLEISH_PINK Ljava/lang/String;
+ public static final field PURPLEY Ljava/lang/String;
+ public static final field PURPLEY_BLUE Ljava/lang/String;
+ public static final field PURPLEY_GREY Ljava/lang/String;
+ public static final field PURPLEY_PINK Ljava/lang/String;
+ public static final field PURPLE_BLUE Ljava/lang/String;
+ public static final field PURPLE_BROWN Ljava/lang/String;
+ public static final field PURPLE_GREY Ljava/lang/String;
+ public static final field PURPLE_PINK Ljava/lang/String;
+ public static final field PURPLE_RED Ljava/lang/String;
+ public static final field PURPLISH Ljava/lang/String;
+ public static final field PURPLISH_BLUE Ljava/lang/String;
+ public static final field PURPLISH_BROWN Ljava/lang/String;
+ public static final field PURPLISH_GREY Ljava/lang/String;
+ public static final field PURPLISH_PINK Ljava/lang/String;
+ public static final field PURPLISH_RED Ljava/lang/String;
+ public static final field PURPLY Ljava/lang/String;
+ public static final field PURPLY_BLUE Ljava/lang/String;
+ public static final field PURPLY_PINK Ljava/lang/String;
+ public static final field PUTTY Ljava/lang/String;
+ public static final field RACING_GREEN Ljava/lang/String;
+ public static final field RADIOACTIVE_GREEN Ljava/lang/String;
+ public static final field RASPBERRY Ljava/lang/String;
+ public static final field RAW_SIENNA Ljava/lang/String;
+ public static final field RAW_UMBER Ljava/lang/String;
+ public static final field REALLY_LIGHT_BLUE Ljava/lang/String;
+ public static final field RED Ljava/lang/String;
+ public static final field REDDISH Ljava/lang/String;
+ public static final field REDDISH_BROWN Ljava/lang/String;
+ public static final field REDDISH_GREY Ljava/lang/String;
+ public static final field REDDISH_ORANGE Ljava/lang/String;
+ public static final field REDDISH_PINK Ljava/lang/String;
+ public static final field REDDISH_PURPLE Ljava/lang/String;
+ public static final field REDDY_BROWN Ljava/lang/String;
+ public static final field RED_BROWN Ljava/lang/String;
+ public static final field RED_ORANGE Ljava/lang/String;
+ public static final field RED_PINK Ljava/lang/String;
+ public static final field RED_PURPLE Ljava/lang/String;
+ public static final field RED_VIOLET Ljava/lang/String;
+ public static final field RED_WINE Ljava/lang/String;
+ public static final field RICH_BLUE Ljava/lang/String;
+ public static final field RICH_PURPLE Ljava/lang/String;
+ public static final field ROBIN_EGG_BLUE Ljava/lang/String;
+ public static final field ROSA Ljava/lang/String;
+ public static final field ROSE Ljava/lang/String;
+ public static final field ROSE_PINK Ljava/lang/String;
+ public static final field ROSE_RED Ljava/lang/String;
+ public static final field ROSY_PINK Ljava/lang/String;
+ public static final field ROUGE Ljava/lang/String;
+ public static final field ROYAL Ljava/lang/String;
+ public static final field ROYAL_BLUE Ljava/lang/String;
+ public static final field ROYAL_PURPLE Ljava/lang/String;
+ public static final field RUBY Ljava/lang/String;
+ public static final field RUSSET Ljava/lang/String;
+ public static final field RUST Ljava/lang/String;
+ public static final field RUSTY_ORANGE Ljava/lang/String;
+ public static final field RUSTY_RED Ljava/lang/String;
+ public static final field RUST_BROWN Ljava/lang/String;
+ public static final field RUST_ORANGE Ljava/lang/String;
+ public static final field RUST_RED Ljava/lang/String;
+ public static final field SAFFRON Ljava/lang/String;
+ public static final field SAGE Ljava/lang/String;
+ public static final field SAGE_GREEN Ljava/lang/String;
+ public static final field SALMON Ljava/lang/String;
+ public static final field SALMON_PINK Ljava/lang/String;
+ public static final field SAND Ljava/lang/String;
+ public static final field SANDSTONE Ljava/lang/String;
+ public static final field SANDY Ljava/lang/String;
+ public static final field SANDY_BROWN Ljava/lang/String;
+ public static final field SANDY_YELLOW Ljava/lang/String;
+ public static final field SAND_BROWN Ljava/lang/String;
+ public static final field SAND_YELLOW Ljava/lang/String;
+ public static final field SAPPHIRE Ljava/lang/String;
+ public static final field SAP_GREEN Ljava/lang/String;
+ public static final field SCARLET Ljava/lang/String;
+ public static final field SEA Ljava/lang/String;
+ public static final field SEAFOAM Ljava/lang/String;
+ public static final field SEAFOAM_BLUE Ljava/lang/String;
+ public static final field SEAFOAM_GREEN Ljava/lang/String;
+ public static final field SEAWEED Ljava/lang/String;
+ public static final field SEAWEED_GREEN Ljava/lang/String;
+ public static final field SEA_BLUE Ljava/lang/String;
+ public static final field SEA_GREEN Ljava/lang/String;
+ public static final field SEPIA Ljava/lang/String;
+ public static final field SHAMROCK Ljava/lang/String;
+ public static final field SHAMROCK_GREEN Ljava/lang/String;
+ public static final field SHIT Ljava/lang/String;
+ public static final field SHIT_BROWN Ljava/lang/String;
+ public static final field SHIT_GREEN Ljava/lang/String;
+ public static final field SHOCKING_PINK Ljava/lang/String;
+ public static final field SICKLY_GREEN Ljava/lang/String;
+ public static final field SICKLY_YELLOW Ljava/lang/String;
+ public static final field SICK_GREEN Ljava/lang/String;
+ public static final field SIENNA Ljava/lang/String;
+ public static final field SILVER Ljava/lang/String;
+ public static final field SKY Ljava/lang/String;
+ public static final field SKY_BLUE Ljava/lang/String;
+ public static final field SLATE Ljava/lang/String;
+ public static final field SLATE_BLUE Ljava/lang/String;
+ public static final field SLATE_GREEN Ljava/lang/String;
+ public static final field SLATE_GREY Ljava/lang/String;
+ public static final field SLIME_GREEN Ljava/lang/String;
+ public static final field SNOT Ljava/lang/String;
+ public static final field SNOT_GREEN Ljava/lang/String;
+ public static final field SOFT_BLUE Ljava/lang/String;
+ public static final field SOFT_GREEN Ljava/lang/String;
+ public static final field SOFT_PINK Ljava/lang/String;
+ public static final field SOFT_PURPLE Ljava/lang/String;
+ public static final field SPEARMINT Ljava/lang/String;
+ public static final field SPRING_GREEN Ljava/lang/String;
+ public static final field SPRUCE Ljava/lang/String;
+ public static final field SQUASH Ljava/lang/String;
+ public static final field STEEL Ljava/lang/String;
+ public static final field STEEL_BLUE Ljava/lang/String;
+ public static final field STEEL_GREY Ljava/lang/String;
+ public static final field STONE Ljava/lang/String;
+ public static final field STORMY_BLUE Ljava/lang/String;
+ public static final field STRAW Ljava/lang/String;
+ public static final field STRAWBERRY Ljava/lang/String;
+ public static final field STRONG_BLUE Ljava/lang/String;
+ public static final field STRONG_PINK Ljava/lang/String;
+ public static final field SUNFLOWER Ljava/lang/String;
+ public static final field SUNFLOWER_YELLOW Ljava/lang/String;
+ public static final field SUNNY_YELLOW Ljava/lang/String;
+ public static final field SUNSHINE_YELLOW Ljava/lang/String;
+ public static final field SUN_YELLOW Ljava/lang/String;
+ public static final field SWAMP Ljava/lang/String;
+ public static final field SWAMP_GREEN Ljava/lang/String;
+ public static final field TAN Ljava/lang/String;
+ public static final field TANGERINE Ljava/lang/String;
+ public static final field TAN_BROWN Ljava/lang/String;
+ public static final field TAN_GREEN Ljava/lang/String;
+ public static final field TAUPE Ljava/lang/String;
+ public static final field TEA Ljava/lang/String;
+ public static final field TEAL Ljava/lang/String;
+ public static final field TEALISH Ljava/lang/String;
+ public static final field TEALISH_GREEN Ljava/lang/String;
+ public static final field TEAL_BLUE Ljava/lang/String;
+ public static final field TEAL_GREEN Ljava/lang/String;
+ public static final field TEA_GREEN Ljava/lang/String;
+ public static final field TERRACOTA Ljava/lang/String;
+ public static final field TERRACOTTA Ljava/lang/String;
+ public static final field TERRA_COTTA Ljava/lang/String;
+ public static final field TIFFANY_BLUE Ljava/lang/String;
+ public static final field TOMATO Ljava/lang/String;
+ public static final field TOMATO_RED Ljava/lang/String;
+ public static final field TOPAZ Ljava/lang/String;
+ public static final field TOUPE Ljava/lang/String;
+ public static final field TOXIC_GREEN Ljava/lang/String;
+ public static final field TREE_GREEN Ljava/lang/String;
+ public static final field TRUE_BLUE Ljava/lang/String;
+ public static final field TRUE_GREEN Ljava/lang/String;
+ public static final field TURQUOISE Ljava/lang/String;
+ public static final field TURQUOISE_BLUE Ljava/lang/String;
+ public static final field TURQUOISE_GREEN Ljava/lang/String;
+ public static final field TURTLE_GREEN Ljava/lang/String;
+ public static final field TWILIGHT Ljava/lang/String;
+ public static final field TWILIGHT_BLUE Ljava/lang/String;
+ public static final field UGLY_BLUE Ljava/lang/String;
+ public static final field UGLY_BROWN Ljava/lang/String;
+ public static final field UGLY_GREEN Ljava/lang/String;
+ public static final field UGLY_PINK Ljava/lang/String;
+ public static final field UGLY_PURPLE Ljava/lang/String;
+ public static final field UGLY_YELLOW Ljava/lang/String;
+ public static final field ULTRAMARINE Ljava/lang/String;
+ public static final field ULTRAMARINE_BLUE Ljava/lang/String;
+ public static final field UMBER Ljava/lang/String;
+ public static final field VELVET Ljava/lang/String;
+ public static final field VERMILLION Ljava/lang/String;
+ public static final field VERY_DARK_BLUE Ljava/lang/String;
+ public static final field VERY_DARK_BROWN Ljava/lang/String;
+ public static final field VERY_DARK_GREEN Ljava/lang/String;
+ public static final field VERY_DARK_PURPLE Ljava/lang/String;
+ public static final field VERY_LIGHT_BLUE Ljava/lang/String;
+ public static final field VERY_LIGHT_BROWN Ljava/lang/String;
+ public static final field VERY_LIGHT_GREEN Ljava/lang/String;
+ public static final field VERY_LIGHT_PINK Ljava/lang/String;
+ public static final field VERY_LIGHT_PURPLE Ljava/lang/String;
+ public static final field VERY_PALE_BLUE Ljava/lang/String;
+ public static final field VERY_PALE_GREEN Ljava/lang/String;
+ public static final field VIBRANT_BLUE Ljava/lang/String;
+ public static final field VIBRANT_GREEN Ljava/lang/String;
+ public static final field VIBRANT_PURPLE Ljava/lang/String;
+ public static final field VIOLET Ljava/lang/String;
+ public static final field VIOLET_BLUE Ljava/lang/String;
+ public static final field VIOLET_PINK Ljava/lang/String;
+ public static final field VIOLET_RED Ljava/lang/String;
+ public static final field VIRIDIAN Ljava/lang/String;
+ public static final field VIVID_BLUE Ljava/lang/String;
+ public static final field VIVID_GREEN Ljava/lang/String;
+ public static final field VIVID_PURPLE Ljava/lang/String;
+ public static final field VOMIT Ljava/lang/String;
+ public static final field VOMIT_GREEN Ljava/lang/String;
+ public static final field VOMIT_YELLOW Ljava/lang/String;
+ public static final field WARM_BLUE Ljava/lang/String;
+ public static final field WARM_BROWN Ljava/lang/String;
+ public static final field WARM_GREY Ljava/lang/String;
+ public static final field WARM_PINK Ljava/lang/String;
+ public static final field WARM_PURPLE Ljava/lang/String;
+ public static final field WASHED_OUT_GREEN Ljava/lang/String;
+ public static final field WATERMELON Ljava/lang/String;
+ public static final field WATER_BLUE Ljava/lang/String;
+ public static final field WEIRD_GREEN Ljava/lang/String;
+ public static final field WHEAT Ljava/lang/String;
+ public static final field WHITE Ljava/lang/String;
+ public static final field WINDOWS_BLUE Ljava/lang/String;
+ public static final field WINE Ljava/lang/String;
+ public static final field WINE_RED Ljava/lang/String;
+ public static final field WINTERGREEN Ljava/lang/String;
+ public static final field WISTERIA Ljava/lang/String;
+ public static final field YELLOW Ljava/lang/String;
+ public static final field YELLOWGREEN Ljava/lang/String;
+ public static final field YELLOWISH Ljava/lang/String;
+ public static final field YELLOWISH_BROWN Ljava/lang/String;
+ public static final field YELLOWISH_GREEN Ljava/lang/String;
+ public static final field YELLOWISH_ORANGE Ljava/lang/String;
+ public static final field YELLOWISH_TAN Ljava/lang/String;
+ public static final field YELLOWY_BROWN Ljava/lang/String;
+ public static final field YELLOWY_GREEN Ljava/lang/String;
+ public static final field YELLOW_BROWN Ljava/lang/String;
+ public static final field YELLOW_GREEN Ljava/lang/String;
+ public static final field YELLOW_OCHRE Ljava/lang/String;
+ public static final field YELLOW_ORANGE Ljava/lang/String;
+ public static final field YELLOW_TAN Ljava/lang/String;
+}
+
diff --git a/plotly/plotlykt-core/build.gradle.kts b/plotly/plotlykt-core/build.gradle.kts
new file mode 100644
index 00000000..fb953ab5
--- /dev/null
+++ b/plotly/plotlykt-core/build.gradle.kts
@@ -0,0 +1,37 @@
+plugins {
+ id("space.kscience.gradle.mpp")
+ `maven-publish`
+}
+
+val dataforgeVersion: String by rootProject.extra
+val plotlyVersion: String by rootProject.extra
+
+
+kotlin{
+ applyDefaultHierarchyTemplate()
+}
+
+kscience {
+ fullStack(bundleName = "js/plotly-kt.js")
+ native()
+ wasm()
+
+ dependencies {
+ api("space.kscience:dataforge-meta:$dataforgeVersion")
+ api(spclibs.kotlinx.html)
+// api("org.jetbrains.kotlinx:kotlinx-html:0.11.0")
+ }
+
+ jsMain{
+ api(npm("plotly.js", plotlyVersion))
+ }
+
+ nativeMain {
+ implementation("com.squareup.okio:okio:3.3.0")
+ }
+}
+
+
+readme {
+ maturity = space.kscience.gradle.Maturity.DEVELOPMENT
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/Plot.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/Plot.kt
new file mode 100644
index 00000000..54ec6343
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/Plot.kt
@@ -0,0 +1,106 @@
+@file:OptIn(DFExperimental::class)
+
+package space.kscience.plotly
+
+import kotlinx.serialization.json.JsonObject
+import kotlinx.serialization.json.buildJsonArray
+import kotlinx.serialization.json.buildJsonObject
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.meta.descriptors.Described
+import space.kscience.dataforge.meta.descriptors.MetaDescriptor
+import space.kscience.dataforge.meta.descriptors.node
+import space.kscience.dataforge.misc.DFBuilder
+import space.kscience.dataforge.misc.DFExperimental
+import space.kscience.plotly.models.Layout
+import space.kscience.plotly.models.Trace
+
+/**
+ * The main plot class. The changes to plot could be observed by attaching listener to root [meta] property.
+ */
+@DFBuilder
+public class Plot(
+ override val meta: ObservableMutableMeta = ObservableMutableMeta(),
+) : Configurable, MetaRepr, Described{
+
+ /**
+ * Ordered list ot traces in the plot
+ */
+ public val data: List by meta.listOfScheme(Trace)
+
+ /**
+ * Layout specification for th plot
+ */
+ public val layout: Layout by meta.scheme(Layout)
+
+ public fun addTrace(trace: Trace) {
+ meta.appendAndAttach("data", trace.meta)
+ }
+
+ /**
+ * Append all traces from [traces] to the plot
+ */
+ public fun traces(traces: Collection) {
+ traces.forEach { addTrace(it) }
+ }
+
+ /**
+ * Append all [traces]
+ */
+ public fun traces(vararg traces: Trace) {
+ traces.forEach { addTrace(it) }
+ }
+
+ /**
+ * Remove a trace with a given [index] from the plot
+ */
+ @UnstablePlotlyAPI
+ internal fun removeTrace(index: Int) {
+ meta.remove("data[$index]")
+ }
+
+ override fun toMeta(): Meta = meta
+
+ override val descriptor: MetaDescriptor get() = Companion.descriptor
+
+ public companion object {
+ public val descriptor: MetaDescriptor = MetaDescriptor {
+ node(Plot::data.name, Trace) {
+ multiple = true
+ }
+
+ node(Plot::layout.name, Layout)
+ }
+ }
+}
+
+public fun Plot(meta: Meta): Plot = Plot(ObservableMutableMeta { update(meta) })
+
+internal fun Plot.toJson(): JsonObject = buildJsonObject {
+ put("layout", layout.meta.toJson())
+ put("data", buildJsonArray {
+ data.forEach { traceData ->
+ add(traceData.meta.toJson())
+ }
+ })
+}
+
+/**
+ * Convert a plot to Json representation specified by Plotly `newPlot` command.
+ */
+public fun Plot.toJsonString(): String = toJson().toString()
+
+/**
+ * Configure the layout
+ */
+public inline fun Plot.layout(block: Layout.() -> Unit) {
+ layout.invoke(block)
+}
+
+/**
+ * Add a generic trace
+ */
+public inline fun Plot.trace(block: Trace.() -> Unit): Trace {
+ val trace = Trace(block)
+ traces(trace)
+ return trace
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/Plotly.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/Plotly.kt
new file mode 100644
index 00000000..9578edb0
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/Plotly.kt
@@ -0,0 +1,66 @@
+package space.kscience.plotly
+
+import kotlinx.serialization.json.JsonArray
+import kotlinx.serialization.json.buildJsonArray
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.names.Name
+import kotlin.js.JsName
+
+/**
+ * A namespace for utility functions
+ */
+@JsName("PlotlyKt")
+public object Plotly {
+ public const val VERSION: String = "2.24.1"
+
+ public const val PLOTLY_CDN: String = "https://cdn.plot.ly/plotly-${VERSION}.min.js"
+ //"https://cdnjs.cloudflare.com/ajax/libs/plotly.js/${VERSION}/plotly.min.js"
+
+ public val coordinateNames: List = listOf(
+ "x", "y", "z", "text", "hovertext", "close", "high", "low", "open", "locations", "lon", "lat", "ids"
+ )
+
+ public inline fun plot(block: Plot.() -> Unit): Plot = Plot().apply(block)
+}
+
+/**
+ * Convert any type-safe configurator to json string
+ */
+public fun Scheme.toJsonString(): String = meta.toJson().toString()
+
+private fun List.toJson(): JsonArray = buildJsonArray {
+ forEach { add(it.meta.toJson()) }
+}
+
+/**
+ * Convert list of type-safe configurators to json array string
+ */
+public fun List.toJsonString(): String = toJson().toString()
+
+@RequiresOptIn("Unstable API subjected to change in future releases", RequiresOptIn.Level.WARNING)
+public annotation class UnstablePlotlyAPI
+
+@RequiresOptIn("This Plotly JS API is not fully supported. Use it at your own risk.", RequiresOptIn.Level.ERROR)
+public annotation class UnsupportedPlotlyAPI
+
+public class PlotlyConfig : Scheme() {
+ public var editable: Boolean? by boolean()
+ public var showEditInChartStudio: Boolean? by boolean()
+ public var plotlyServerURL: String? by string()
+ public var responsive: Boolean? by boolean()
+ public var imageFormat: String? by string(Name.parse("toImageButtonOptions.format"))
+
+ public fun withEditorButton() {
+ showEditInChartStudio = true
+ plotlyServerURL = "https://chart-studio.plotly.com"
+ }
+
+ public fun saveAsSvg() {
+ imageFormat = "svg"
+ }
+
+ override fun toString(): String = toJsonString()
+
+ public companion object : SchemeSpec(::PlotlyConfig)
+}
+
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/PlotlyPage.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/PlotlyPage.kt
new file mode 100644
index 00000000..d21ca62d
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/PlotlyPage.kt
@@ -0,0 +1,65 @@
+package space.kscience.plotly
+
+import kotlinx.html.*
+import kotlinx.html.stream.createHTML
+
+/**
+ * A custom HTML fragment including plotly container reference
+ */
+public class PlotlyFragment(public val render: FlowContent.(renderer: PlotlyRenderer) -> Unit)
+
+/**
+ * A complete page including headers and title
+ */
+public data class PlotlyPage(
+ val headers: Collection,
+ val fragment: PlotlyFragment,
+ val title: String = "Plotly.kt",
+ val renderer: PlotlyRenderer = StaticPlotlyRenderer
+) {
+ public fun render(): String = createHTML().html {
+ head {
+ meta {
+ charset = "utf-8"
+ }
+ title(this@PlotlyPage.title)
+ headers.distinct().forEach { it.visit(consumer) }
+ }
+ body {
+ fragment.render(this, renderer)
+ }
+ }
+}
+
+public fun Plotly.fragment(content: FlowContent.(renderer: PlotlyRenderer) -> Unit): PlotlyFragment = PlotlyFragment(content)
+
+/**
+ * Create a complete page including plots
+ */
+public fun Plotly.page(
+ vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader),
+ title: String = "Plotly.kt",
+ renderer: PlotlyRenderer = StaticPlotlyRenderer,
+ content: FlowContent.(renderer: PlotlyRenderer) -> Unit
+): PlotlyPage = PlotlyPage(headers.toList(), fragment(content), title, renderer)
+
+/**
+ * Convert an html plot fragment to page
+ */
+public fun PlotlyFragment.toPage(
+ vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader),
+ title: String = "Plotly.kt",
+ renderer: PlotlyRenderer = StaticPlotlyRenderer
+): PlotlyPage = PlotlyPage(headers.toList(), this, title, renderer)
+
+/**
+ * Convert a plot to the sigle-plot page
+ */
+public fun Plot.toPage(
+ vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader),
+ config: PlotlyConfig = PlotlyConfig.empty(),
+ title: String = "Plotly.kt",
+ renderer: PlotlyRenderer = StaticPlotlyRenderer
+): PlotlyPage = PlotlyFragment {
+ plot(this@toPage, config = config, renderer = renderer)
+}.toPage(*headers, title = title)
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/PlotlyRenderer.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/PlotlyRenderer.kt
new file mode 100644
index 00000000..1dc43ecb
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/PlotlyRenderer.kt
@@ -0,0 +1,54 @@
+package space.kscience.plotly
+
+import kotlinx.html.*
+
+public interface PlotlyRenderer {
+ public fun FlowContent.renderPlot(
+ plot: Plot,
+ plotId: String = plot.toString(),
+ config: PlotlyConfig = PlotlyConfig()
+ ): Plot
+}
+
+public object StaticPlotlyRenderer : PlotlyRenderer {
+ override fun FlowContent.renderPlot(plot: Plot, plotId: String, config: PlotlyConfig): Plot {
+ div {
+ id = plotId
+ script {
+ val tracesString = plot.data.toJsonString()
+ val layoutString = plot.layout.toJsonString()
+ unsafe {
+ //language=JavaScript
+ +"""
+ Plotly.react(
+ '$plotId',
+ $tracesString,
+ $layoutString,
+ $config
+ );
+ """.trimIndent()
+ }
+ }
+ }
+ return plot
+ }
+}
+
+public fun FlowContent.plot(
+ plot: Plot,
+ plotId: String = plot.toString(),
+ config: PlotlyConfig = PlotlyConfig(),
+ renderer: PlotlyRenderer = StaticPlotlyRenderer
+): Plot = with(renderer) {
+ renderPlot(plot, plotId, config)
+}
+
+public fun FlowContent.plot(
+ plotId: String? = null,
+ config: PlotlyConfig = PlotlyConfig(),
+ renderer: PlotlyRenderer = StaticPlotlyRenderer,
+ builder: Plot.() -> Unit
+): Plot {
+ val plot = Plot().apply(builder)
+ return plot(plot, plotId ?: plot.toString(), config, renderer)
+}
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/dfExt.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/dfExt.kt
new file mode 100644
index 00000000..fffde72e
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/dfExt.kt
@@ -0,0 +1,203 @@
+package space.kscience.plotly
+
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.misc.DFExperimental
+import space.kscience.dataforge.names.*
+import kotlin.properties.ReadWriteProperty
+import kotlin.reflect.KProperty
+import kotlin.time.Duration
+import kotlin.time.DurationUnit
+import kotlin.time.toDuration
+
+//extensions for DataForge
+
+
+/**
+ * List of values delegate
+ */
+internal fun Scheme.listOfValues(
+ key: Name? = null,
+): ReadWriteProperty> = object : ReadWriteProperty> {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): List {
+ val name = key ?: property.name.asName()
+ return meta[name]?.value?.list ?: emptyList()
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: List) {
+ val name = key ?: property.name.asName()
+ meta[name] = value.asValue()
+ }
+}
+
+/**
+ * A safe [Double] range
+ */
+internal fun Scheme.doubleInRange(
+ range: ClosedFloatingPointRange,
+ defaultValue: Double = Double.NaN,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Double {
+ val name = key ?: property.name.asName()
+ return meta[name].double ?: defaultValue
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Double) {
+ val name = key ?: property.name.asName()
+ if (value in range) {
+ meta[name] = value
+ } else {
+ error("$value not in range $range")
+ }
+ }
+}
+
+/**
+ * A safe [Double] ray
+ */
+internal fun Scheme.doubleGreaterThan(
+ minValue: Double,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Double {
+ val name = key ?: property.name.asName()
+ return meta[name].double ?: Double.NaN
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Double) {
+ val name = key ?: property.name.asName()
+ if (value >= minValue) {
+ meta[name] = value
+ } else {
+ error("$value less than $minValue")
+ }
+ }
+}
+
+
+/**
+ * A safe [Int] ray
+ */
+internal fun Scheme.intGreaterThan(
+ minValue: Int,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Int {
+ val name = key ?: property.name.asName()
+ return meta[name].int ?: minValue
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Int) {
+ val name = key ?: property.name.asName()
+ if (value >= minValue) {
+ meta[name] = value
+ } else {
+ error("$value less than $minValue")
+ }
+ }
+}
+
+/**
+ * A safe [Int] range
+ */
+internal fun Scheme.intInRange(
+ range: ClosedRange,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Int {
+ val name = key ?: property.name.asName()
+ return meta[name].int ?: 0
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Int) {
+ val name = key ?: property.name.asName()
+ if (value in range) {
+ meta[name] = value
+ } else {
+ error("$value not in range $range")
+ }
+ }
+}
+
+/**
+ * A safe [Number] ray
+ */
+public fun Scheme.numberGreaterThan(
+ minValue: Number,
+ default: Number = minValue,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Number {
+ val name = key ?: property.name.asName()
+ return meta[name].number ?: default
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Number) {
+ val name = key ?: property.name.asName()
+ if (value.toDouble() >= minValue.toDouble()) {
+ meta[name] = value
+ } else {
+ error("$value less than $minValue")
+ }
+ }
+}
+
+/**
+ * A safe [Number] range
+ */
+public fun Scheme.numberInRange(
+ range: ClosedRange,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Number {
+ val name = key ?: property.name.asName()
+ return meta[name].int ?: 0
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Number) {
+ val name = key ?: property.name.asName()
+ if (value.toDouble() in range) {
+ meta[name] = value
+ } else {
+ error("$value not in range $range")
+ }
+ }
+}
+
+internal fun Scheme.duration(
+ default: Duration? = null,
+ key: Name? = null,
+): ReadWriteProperty = object : ReadWriteProperty {
+ override fun getValue(thisRef: Any?, property: KProperty<*>): Duration? {
+ val name = key ?: property.name.asName()
+ val value = meta[name]?.value
+ val units = meta[name + "unit"]?.enum() ?: DurationUnit.MILLISECONDS
+ return value?.long?.toDuration(units) ?: default
+ }
+
+ override fun setValue(thisRef: Any?, property: KProperty<*>, value: Duration?) {
+ val name = key ?: property.name.asName()
+ if (value == null) {
+ meta.remove(name)
+ } else {
+ meta.value = value.toDouble(DurationUnit.MILLISECONDS).asValue()
+ meta[name + "unit"] = DurationUnit.MILLISECONDS.name
+ }
+ }
+}
+
+/**
+ * Append the observable note to same-name-siblings and observe its changes.
+ */
+@OptIn(DFExperimental::class)
+internal fun ObservableMutableMeta.appendAndAttach(key: String, meta: ObservableMutableMeta) {
+ val name = Name.parse(key)
+ require(!name.isEmpty()) { "Name could not be empty for append operation" }
+ val newIndex = name.lastOrNull()!!.index
+ if (newIndex != null) {
+ attach(name, meta)
+ } else {
+ val index = (getIndexed(name).keys.mapNotNull { it?.toIntOrNull() }.maxOrNull() ?: -1) + 1
+ attach(name.withIndex(index.toString()), meta)
+ }
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/events/PlotlyEvent.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/events/PlotlyEvent.kt
new file mode 100644
index 00000000..89d29be1
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/events/PlotlyEvent.kt
@@ -0,0 +1,28 @@
+package space.kscience.plotly.events
+
+import kotlinx.serialization.json.JsonElement
+import space.kscience.dataforge.meta.Value
+
+public enum class PlotlyEventListenerType(public val eventType: String){
+ CLICK("plotly_click"),
+ HOVER("plotly_hover"),
+ UNHOVER("plotly_unhover"),
+ SELECTING("plotly_selecting"),
+ SELECTED("plotly_selected")
+}
+
+public data class PlotlyEventPoint(
+ public val curveNumber: Int,
+ public val data: JsonElement,
+ public val pointNumber: Int? = null,
+ public val x: Value? = null,
+ public val y: Value? = null,
+//
+// public var data: Trace by scheme(Trace)
+// public var fullData: Trace by scheme(Trace)
+)
+
+
+public data class PlotlyEvent(public val points: List)
+
+
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/html.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/html.kt
new file mode 100644
index 00000000..82b9cbd9
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/html.kt
@@ -0,0 +1,64 @@
+package space.kscience.plotly
+
+import kotlinx.html.*
+import kotlinx.html.stream.createHTML
+
+
+public class PlotlyHtmlFragment(public val visit: TagConsumer<*>.() -> Unit) {
+ override fun toString(): String {
+ return createHTML().also(visit).finalize()
+ }
+}
+
+public operator fun PlotlyHtmlFragment.plus(other: PlotlyHtmlFragment): PlotlyHtmlFragment = PlotlyHtmlFragment {
+ this@plus.run { visit() }
+ other.run { visit() }
+}
+
+public val cdnPlotlyHeader: PlotlyHtmlFragment = PlotlyHtmlFragment {
+ script {
+ type = "text/javascript"
+ src = Plotly.PLOTLY_CDN
+ }
+}
+
+/**
+ * Create a html (including headers) string from plot
+ */
+public fun Plot.toHTML(
+ vararg headers: PlotlyHtmlFragment = arrayOf(cdnPlotlyHeader),
+ config: PlotlyConfig = PlotlyConfig(),
+): String = createHTML().html {
+ head {
+ meta {
+ charset = "utf-8"
+ }
+ title(layout.title ?: "Plotly.kt")
+ headers.forEach {
+ it.visit(consumer)
+ }
+ }
+ body {
+ StaticPlotlyRenderer.run {
+ renderPlot(this@toHTML, this@toHTML.toString(), config)
+ }
+ }
+}
+
+public val mathJaxHeader: PlotlyHtmlFragment = PlotlyHtmlFragment {
+ script {
+ type = "text/x-mathjax-config"
+ unsafe {
+ +"""
+ MathJax.Hub.Config({
+ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
+ });
+ """
+ }
+ }
+ script {
+ type = "text/javascript"
+ async = true
+ src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_SVG"
+ }
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Axis.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Axis.kt
new file mode 100644
index 00000000..6ec6ff9c
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Axis.kt
@@ -0,0 +1,299 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.plotly.listOfValues
+import space.kscience.plotly.numberGreaterThan
+import space.kscience.plotly.numberInRange
+import kotlin.js.JsName
+
+
+public enum class AxisType {
+ @JsName("default")
+ `-`,
+ linear,
+ log,
+ date,
+ category,
+ multicategory;
+}
+
+public enum class TickMode {
+ array,
+ auto,
+ linear
+}
+
+public enum class Ticks {
+ @Suppress("EnumEntryName", "DANGEROUS_CHARACTERS")
+ @JsName("empty")
+ `""`,
+ inside,
+ outside
+}
+
+public enum class AxisSide {
+ top, bottom, left, right
+}
+
+/**
+ * Axis scheme
+ */
+public class Axis : Scheme() {
+ /**
+ * Sets the title of this axis.
+ */
+ public var title: String?
+ get() = meta["title.text"].string ?: meta["title"].string
+ set(value) {
+ meta["title"] = value?.asValue()
+ }
+
+ /**
+ * Enumerated, one of ( "-" | "linear" | "log" | "date" | "category" | "multicategory" ) .
+ * Sets the axis type. By default, plotly attempts to determine
+ * the axis type by looking into the data of the traces
+ * that referenced the axis in question.
+ * Default: "-"
+ */
+ public var type: AxisType by enum(AxisType.`-`)
+
+ /**
+ * A single toggle to hide the axis while preserving interaction
+ * like dragging. Default is true when a cheater plot
+ * is present on the axis, otherwise false
+ */
+ public var visible: Boolean? by boolean()
+
+ /**
+ * Sets the tick length (in px).
+ * Default: 5.
+ */
+ public var ticklen: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the tick width (in px).
+ * Default: 1.
+ */
+ public var tickwidth: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the tick color.
+ * Default: #444.
+ */
+ public val tickcolor: Color by color()
+
+ /**
+ * Sets the angle of the tick labels with respect to the horizontal.
+ * For example, a `tickangle` of -90 draws the tick labels vertically.
+ */
+ public var tickangle: Number by numberInRange(-360.0..360.0)
+
+ /**
+ * Sets the tick font.
+ */
+ public var tickfont: Font by scheme(Font)
+
+ /**
+ * Determines whether ticks are drawn or not. If "", this axis' ticks are not drawn.
+ * If "outside" ("inside"), this axis' are drawn outside (inside) the axis lines.
+ */
+ public var ticks: Ticks by enum(Ticks.inside)
+
+ /**
+ * Sets the step in-between ticks on this axis. Use with `tick0`. Must be a positive number, or special strings
+ * available to "log" and "date" axes. If the axis `type` is "log", then ticks are set every 10^(n"dtick)
+ * where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1.
+ * To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ...
+ * set dtick to log_10(5), or 0.69897000433. "log" has several special values; "L", where `f`
+ * is a positive number, gives ticks linearly spaced in value (but not position). For example `tick0` = 0.1,
+ * `dtick` = "L0.5" will put ticks at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 plus small digits between,
+ * use "D1" (all digits) or "D2" (only 2 and 5). `tick0` is ignored for "D1" and "D2". If the axis `type` is "date",
+ * then you must convert the time to milliseconds. For example, to set the interval between ticks to one day,
+ * set `dtick` to 86400000.0. "date" also has special values "M" gives ticks spaced by a number of months.
+ * `n` must be a positive integer. To set ticks on the 15th of every third month, set `tick0` to "2000-01-15"
+ * and `dtick` to "M3". To set ticks every 4 years, set `dtick` to "M48"
+ */
+ public var dtick: Value? by value()
+
+ /**
+ * Determines whether or not the range of this axis is computed
+ * in relation to the input data. See `rangemode` for more info.
+ * If `range` is provided, then `autorange` is set to "false".
+ * Default: true.
+ */
+ public var autorange: Boolean by boolean(true)
+
+ /**
+ * Sets the range of this axis. If the axis `type` is "log",
+ * then you must take the log of your desired range
+ * (e.g. to set the range from 1 to 100, set the range from 0 to 2).
+ * If the axis `type` is "date", it should be date strings, like date data,
+ * though Date objects and unix milliseconds will be accepted and
+ * converted to strings. If the axis `type` is "category", it should be
+ * numbers, using the scale where each category is assigned
+ * a serial number from zero in the order it appears.
+ */
+ @Deprecated("Use range() instead")
+ public var range: ClosedFloatingPointRange?
+ get() = meta["range"]?.value?.doubleArray?.let { it[0]..it[1] }
+ set(value) {
+ meta["range"] = value?.let { ListValue(listOf(value.start.asValue(), value.endInclusive.asValue())) }
+ }
+
+ /**
+ * Set the range using arbitrary values
+ */
+ public fun range(from: Value, to: Value) {
+ meta["range"] = ListValue(listOf(from, to))
+ }
+
+ /**
+ * Set range using double kotlin range
+ */
+ public fun range(value: ClosedFloatingPointRange) {
+ range(value.start.asValue(), value.endInclusive.asValue())
+ }
+
+ /**
+ * Set range using kotlin string range
+ */
+ public fun range(value: ClosedRange) {
+ range(value.start.asValue(), value.endInclusive.asValue())
+ }
+
+
+ /**
+ * Sets default for all colors associated with this axis all at once:
+ * line, font, tick, and grid colors. Grid color is lightened
+ * by blending this with the plot background Individual pieces can override this.
+ * Default: #444.
+ */
+ public val color: Color by color()
+
+ /**
+ * Determines whether or not a line bounding this axis is drawn.
+ */
+ public var showline: Boolean? by boolean()
+
+ /**
+ * Sets the axis line color. Default: #444.
+ */
+ public val linecolor: Color by color()
+
+ /**
+ * Sets the width (in px) of the axis line. Default: 1.
+ */
+ public var linewidth: Number by numberGreaterThan(0)
+
+ /**
+ * Determines whether or not grid lines are drawn. If "true",
+ * the grid lines are drawn at every tick mark.
+ */
+ public var showgrid: Boolean? by boolean()
+
+ /**
+ * Sets the color of the grid lines. Default: #eee
+ */
+ public val gridcolor: Color by color()
+
+ /**
+ * Sets the width (in px) of the grid lines. Default: 1.
+ */
+ public var gridwidth: Number by numberGreaterThan(0)
+
+ /**
+ * Determines whether or not a line is drawn at along the 0 value of this axis.
+ * If "true", the zero line is drawn on top of the grid lines.
+ */
+ public var zeroline: Boolean? by boolean()
+
+ /**
+ * Sets the line color of the zero line. Default: #444
+ */
+ public val zerolinecolor: Color by color()
+
+ /**
+ * Sets the width (in px) of the zero line. Default: 1.
+ */
+ public var zerolinewidth: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the tick mode for this axis. If "auto", the number of ticks is set via `nticks`.
+ * If "linear", the placement of the ticks is determined by a starting position `tick0`
+ * and a tick step `dtick` ("linear" is the default value if `tick0` and `dtick` are provided).
+ * If "array", the placement of the ticks is set via `tickvals` and the tick text is `ticktext`.
+ * ("array" is the default value if `tickvals` is provided).
+ */
+ public var tickmode: TickMode by enum(TickMode.auto)
+
+ /**
+ * Sets the values at which ticks on this axis appear.
+ * Only has an effect if `tickmode` is set to "array". Used with `ticktext`.
+ */
+ public var tickvals: List by listOfValues()
+
+ /**
+ *Sets the text displayed at the ticks position via `tickvals`.
+ * Only has an effect if `tickmode` is set to "array". Used with `tickvals`.
+ */
+ public var ticktext: List by listOfValues()
+
+ /**
+ * Determines whether or not the tick labels are drawn.
+ */
+ public var showticklabels: Boolean? by boolean()
+
+ public var autotick: Boolean? by boolean()
+
+ /**
+ * Determines whether long tick labels automatically grow the figure margins.
+ */
+ public var automargin: Boolean? by boolean()
+
+ /**
+ * Enumerated, one of ( "free" | "/^x([2-9]|[1-9][0-9]+)?$/" | "/^y([2-9]|[1-9][0-9]+)?$/" )
+ * If set to an opposite-letter axis id (e.g. `x2`, `y`), this axis is bound to the corresponding
+ * opposite-letter axis. If set to "free", this axis' position is determined by `position`.
+ */
+ public var anchor: String? by string()
+
+ /**
+ * Sets the position of this axis in the plotting space (in normalized coordinates).
+ * Only has an effect if `anchor` is set to "free". Default: 0.
+ */
+ public var position: Number by numberInRange(0.0..1.0)
+
+ /**
+ * Determines whether a x (y) axis is positioned at the "bottom" ("left") or "top" ("right") of the plotting area.
+ */
+ public var side: AxisSide? by value(
+ writer = { it?.name?.asValue() },
+ reader = { value -> value?.string?.let { enumValueOf(it) } }
+ )
+
+ /**
+ * If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis,
+ * with traces and axes visible for both axes. If "false", this axis does not overlay any same-letter axes.
+ * In this case, for axes with overlapping domains only the highest-numbered axis will be visible.
+ */
+ public var overlaying: String? by string()
+
+ public fun title(block: Title.() -> Unit) {
+ val spec = Title.write(meta.getOrCreate("title"))
+ spec.apply(block)
+ }
+
+ public fun tickfont(block: Font.() -> Unit) {
+ tickfont = Font(block)
+ }
+
+ public fun tickvals(array: Iterable) {
+ tickvals = array.map { Value.of(it) }
+ }
+
+ public fun ticktext(array: Iterable) {
+ ticktext = array.map { Value.of(it) }
+ }
+
+ public companion object : SchemeSpec(::Axis)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Bar.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Bar.kt
new file mode 100644
index 00000000..9abf2779
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Bar.kt
@@ -0,0 +1,66 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.names.asName
+import space.kscience.plotly.numberGreaterThan
+
+public class Bar : Trace(), SelectedPoints {
+ init {
+ type = TraceType.bar
+ }
+
+ /**
+ * Array containing integer indices of selected points. Has an effect only for traces that support selections.
+ * Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas,
+ * any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.
+ */
+ override var selectedpoints: List by numberList()
+
+ override var selected: SelectPoints by scheme(SelectPoints)
+
+ override var unselected: SelectPoints by scheme(SelectPoints)
+
+ /**
+ * Sets where the bar base is drawn (in position axis units). In "stack" or "relative" barmode,
+ * traces that set "base" will be excluded and drawn in "overlay" mode instead.
+ */
+ public var base: List by numberList()
+
+ /**
+ * Sets the bar width (in position axis units).
+ */
+ public var width: Number by numberGreaterThan(0)
+
+ /**
+ * Array of numbers greater than or equal to 0. Sets the bar width (in position axis units).
+ */
+ public var widthList: List by numberList(key = "width".asName())
+
+ /**
+ * Shifts the position where the bar is drawn (in position axis units). In "group" barmode,
+ * traces that set "offset" will be excluded and drawn in "overlay" mode instead.
+ */
+ public var offset: Number? by number()
+
+ /**
+ * Shifts the position where the bar is drawn (in position axis units). In "group" barmode,
+ * traces that set "offset" will be excluded and drawn in "overlay" mode instead.
+ */
+ public var offsetsList: List by numberList(key = "offset".asName())
+
+
+ /**
+ * Constrain the size of text inside or outside a bar to be no larger than the bar itself.
+ */
+ public var constraintext: ConstrainText by enum(ConstrainText.both)
+
+ public fun selected(block: SelectPoints.() -> Unit) {
+ selected = SelectPoints(block)
+ }
+
+ public fun unselected(block: SelectPoints.() -> Unit) {
+ unselected = SelectPoints(block)
+ }
+
+ public companion object : SchemeSpec(::Bar)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Box.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Box.kt
new file mode 100644
index 00000000..46eec003
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Box.kt
@@ -0,0 +1,224 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.plotly.doubleInRange
+import space.kscience.plotly.listOfValues
+import space.kscience.plotly.numberGreaterThan
+import kotlin.js.JsName
+
+public enum class BoxMean {
+ `true`,
+ sd,
+ `false`
+}
+
+public enum class BoxPoints {
+ all,
+ outliers,
+ suspectedoutliers,
+ `false`
+}
+
+public enum class QuartileMethod {
+ linear,
+ exclusive,
+ inclusive
+}
+
+public enum class BoxHoveron {
+ boxes,
+ points,
+
+ @JsName("boxesAndPoints")
+ `boxes+points`
+}
+
+public class Box : Trace(), SelectedPoints {
+ init {
+ type = TraceType.box
+ }
+
+ /**
+ * Sets the width of the box in data coordinate If "0" (default value) the width is
+ * automatically selected based on the positions of other box traces in the same subplot.
+ */
+ public var width: Number by numberGreaterThan(0)
+
+ /**
+ * If "true", the mean of the box(es)' underlying distribution is drawn as a dashed line
+ * inside the box(es). If "sd" the standard deviation is also drawn. Defaults to "true"
+ * when `mean` is set. Defaults to "sd" when `sd` is set Otherwise defaults to "false".
+ */
+ public var boxmean: BoxMean by enum(BoxMean.`false`)
+
+ /**
+ * If "outliers", only the sample points lying outside the whiskers are shown
+ * If "suspectedoutliers", the outlier points are shown and points either less
+ * than 4"Q1-3"Q3 or greater than 4"Q3-3"Q1 are highlighted (see `outliercolor`)
+ * If "all", all sample points are shown If "false", only the box(es) are shown
+ * with no sample points Defaults to "suspectedoutliers" when `marker.outliercolor`
+ * or `marker.line.outliercolor` is set. Defaults to "all" under the q1/median/q3 signature.
+ * Otherwise defaults to "outliers".
+ */
+ public var boxpoints: BoxPoints by enum(BoxPoints.all)
+
+ /**
+ * Determines whether or not notches are drawn. Notches displays a confidence interval
+ * around the median. We compute the confidence interval as median +/- 1.57 " IQR / sqrt(N),
+ * where IQR is the interquartile range and N is the sample size. If two boxes' notches
+ * do not overlap there is 95% confidence their medians differ.
+ * See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info.
+ * Defaults to "false" unless `notchwidth` or `notchspan` is set.
+ */
+ public var notched: Boolean? by boolean()
+
+ /**
+ * Sets the width of the notches relative to the box' width.
+ * For example, with 0, the notches are as wide as the box(es).
+ * Default: 0.25.
+ */
+ public var notchwidth: Double by doubleInRange(0.0..0.5)
+
+ /**
+ * Sets the notch span from the boxes' `median` values. There should be as many items
+ * as the number of boxes desired. This attribute has effect only under the q1/median/q3 signature.
+ * If `notchspan` is not provided but a sample (in `y` or `x`) is set, we compute it
+ * as 1.57 " IQR / sqrt(N), where N is the sample size.
+ */
+ public var notchspan: List by listOfValues()
+
+ /**
+ * Sets the width of the whiskers relative to the box' width. For example, with 1,
+ * the whiskers are as wide as the box(es). Default: 0.5.
+ */
+ public var whiskerwidth: Double by doubleInRange(0.0..1.0)
+
+ /**
+ * Sets the Quartile 1 values. There should be as many items as the number of boxes desired.
+ */
+ public var q1: List by listOfValues()
+
+ /**
+ * Sets the Quartile 3 values. There should be as many items as the number of boxes desired.
+ */
+ public var q3: List by listOfValues()
+
+ /**
+ * Sets the median values. There should be as many items as the number of boxes desired.
+ */
+ public var median: List by listOfValues()
+
+ /**
+ * Sets the mean values. There should be as many items as the number of boxes desired.
+ * This attribute has effect only under the q1/median/q3 signature. If `mean` is not provided
+ * but a sample (in `y` or `x`) is set, we compute the mean for each box using the sample values.
+ */
+ public var mean: List by listOfValues()
+
+ /**
+ * Sets the standard deviation values. There should be as many items as the number of boxes desired.
+ * This attribute has effect only under the q1/median/q3 signature. If `sd` is not provided
+ * but a sample (in `y` or `x`) is set, we compute the standard deviation for each box using the sample values.
+ */
+ public var sd: List by listOfValues()
+
+ /**
+ * Sets the lower fence values. There should be as many items as the number of boxes desired.
+ * This attribute has effect only under the q1/median/q3 signature. If `lowerfence` is not provided
+ * but a sample (in `y` or `x`) is set, we compute the lower as the last sample point below 1.5 times the IQR.
+ */
+ public var lowerfence: List by listOfValues()
+
+ /**
+ * Sets the upper fence values. There should be as many items as the number of boxes desired.
+ * This attribute has effect only under the q1/median/q3 signature. If `upperfence` is not provided
+ * but a sample (in `y` or `x`) is set, we compute the lower as the last sample point above 1.5 times the IQR.
+ */
+ public var upperfence: List by listOfValues()
+
+ /**
+ * Sets the method used to compute the sample's Q1 and Q3 quartiles. The "linear" method uses
+ * the 25th percentile for Q1 and 75th percentile for Q3 as computed using method #10
+ * (listed on http://www.amstat.org/publications/jse/v14n3/langford.html). The "exclusive" method
+ * uses the median to divide the ordered dataset into two halves if the sample is odd,
+ * it does not include the median in either half - Q1 is then the median of the lower half and Q3
+ * the median of the upper half. The "inclusive" method also uses the median to divide the ordered dataset
+ * into two halves but if the sample is odd, it includes the median in both halves - Q1 is then the median
+ * of the lower half and Q3 the median of the upper half.
+ */
+ public var quartilemethod: QuartileMethod by enum(QuartileMethod.linear)
+
+ /**
+ * Array containing integer indices of selected points. Has an effect only for traces that support selections.
+ * Note that an empty array means an empty selection where the `unselected` are turned on for all points, whereas,
+ * any other non-array values means no selection all where the `selected` and `unselected` styles have no effect.
+ */
+ override var selectedpoints: List by numberList()
+
+ override var selected: SelectPoints by scheme(SelectPoints)
+
+ override var unselected: SelectPoints by scheme(SelectPoints)
+
+ /**
+ * Sets the amount of jitter in the sample points drawn.
+ * If "0", the sample points align along the distribution axis.
+ * If "1", the sample points are drawn in a random jitter
+ * of width equal to the width of the violins.
+ */
+ public var jitter: Double by doubleInRange(0.0..1.0)
+
+ /**
+ * Sets the position of the sample points in relation to the violins.
+ * If "0", the sample points are places over the center of the violins.
+ * Positive (negative) values correspond to positions to the right (left)
+ * for vertical violins and above (below) for horizontal violins.
+ */
+ public var pointpos: Double by doubleInRange(-2.0..2.0)
+
+ /**
+ * Do the hover effects highlight individual boxes or sample points or both?
+ */
+ public var hoveron: BoxHoveron by enum(BoxHoveron.`boxes+points`)
+
+ public fun q1(array: Iterable) {
+ q1 = array.map { Value.of(it) }
+ }
+
+ public fun q3(array: Iterable) {
+ q3 = array.map { Value.of(it) }
+ }
+
+ public fun median(array: Iterable) {
+ median = array.map { Value.of(it) }
+ }
+
+ public fun lowerfence(array: Iterable) {
+ lowerfence = array.map { Value.of(it) }
+ }
+
+ public fun upperfence(array: Iterable) {
+ upperfence = array.map { Value.of(it) }
+ }
+
+ public fun notchspan(array: Iterable) {
+ notchspan = array.map { Value.of(it) }
+ }
+
+ public fun mean(array: Iterable) {
+ mean = array.map { Value.of(it) }
+ }
+
+ public fun sd(array: Iterable) {
+ sd = array.map { Value.of(it) }
+ }
+
+ public fun selected(block: SelectPoints.() -> Unit) {
+ selected = SelectPoints(block)
+ }
+
+ public fun unselected(block: SelectPoints.() -> Unit) {
+ unselected = SelectPoints(block)
+ }
+
+ public companion object : SchemeSpec(::Box)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/CandleStick.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/CandleStick.kt
new file mode 100644
index 00000000..98f811e9
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/CandleStick.kt
@@ -0,0 +1,84 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.names.Name
+import space.kscience.dataforge.names.asName
+import space.kscience.plotly.doubleInRange
+
+
+public enum class XPeriodAlignment{
+ start,
+ middle,
+ end
+}
+
+public class CandleStickLine: Scheme(){
+ public val fillcolor: Color by color()
+ public val lineColor: Color by color(Name.parse("line.color"))
+ public var lineWidth: Double by double(2.0, key = Name.parse("line.width"))
+ public companion object: SchemeSpec(::CandleStickLine)
+}
+
+public class CandleStick : Trace() {
+ init {
+ type = TraceType.candlestick
+ }
+
+ /**
+ * Assigns id labels to each datum. These ids for object constancy of data points during animation.
+ * Should be an array of strings, not numbers or any other type.
+ */
+ public var ids: List? by stringList()
+
+ /**
+ * Only relevant when the axis `type` is "date". Sets the period positioning in milliseconds or "M" on the x axis.
+ * Special values in the form of "M" could be used to declare the number of months. In this case `n` must be a positive integer.
+ * Default 0
+ */
+ public var xperiod: Value by value { 0.asValue() }
+
+ public var xperiod0: Value? by value()
+
+ /**
+ * Only relevant when the axis `type` is "date". Sets the alignment of data points on the x axis.
+ */
+ public var xperiodalignment: XPeriodAlignment by enum(XPeriodAlignment.middle)
+
+ public val open: TraceValues by axis
+ public val high: TraceValues by axis
+ public val close: TraceValues by axis
+ public val low: TraceValues by axis
+
+
+ public var candleStickMeta: Value? by value("meta".asName())
+
+ /**
+ * Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value),
+ * the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on.
+ * Default "x"
+ */
+ public var xaxis: String by string("x")
+
+ /**
+ * Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value),
+ * the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on.
+ */
+ public var yaxis: String by string("y")
+
+
+ public var lineWidth: Double by double(2.0, Name.parse("line.width"))
+
+ public var increasing: CandleStickLine by scheme(CandleStickLine)
+ public var decreasing: CandleStickLine by scheme(CandleStickLine)
+
+ /**
+ * Number between 0 and 1.
+ *
+ * Selects the width of the whiskers relative to the box´s width.
+ * For example, with 1, the whiskers are as wide as the box(es).
+ * Default 0
+ */
+ public var whiskerwidth: Double by doubleInRange(0.0..1.0)
+
+ public companion object: SchemeSpec(::CandleStick)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Color.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Color.kt
new file mode 100644
index 00000000..7b242940
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Color.kt
@@ -0,0 +1,40 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.names.Name
+import space.kscience.dataforge.names.asName
+import kotlin.properties.ReadOnlyProperty
+
+/**
+ * A color value customizer
+ * TODO add a hook for descriptor generation
+ */
+public class Color internal constructor(parent: Scheme, key: Name) {
+ public var value: Value? by parent.value(key = key)
+
+ public var string: String?
+ get() = value?.string
+ set(value) {
+ this.value = value?.asValue()
+ }
+
+ public operator fun invoke(value: String): Unit {
+ this.value = value.asValue()
+ }
+
+ public operator fun invoke(value: Number): Unit {
+ this.value = value.asValue()
+ }
+
+ public operator fun invoke(red: Number, green: Number, blue: Number) {
+ invoke("rgb(${red.toFloat()},${green.toFloat()},${blue.toFloat()})")
+ }
+
+ public operator fun invoke(red: Number, green: Number, blue: Number, alpha: Number) {
+ invoke("rgba(${red.toFloat()},${green.toFloat()},${blue.toFloat()},${alpha.toFloat()})")
+ }
+}
+
+public fun Scheme.color(key: Name? = null): ReadOnlyProperty = ReadOnlyProperty { _, property ->
+ Color(this, key ?: property.name.asName())
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Contour.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Contour.kt
new file mode 100644
index 00000000..e46f9cfb
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Contour.kt
@@ -0,0 +1,48 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.SchemeSpec
+import space.kscience.dataforge.meta.boolean
+import space.kscience.dataforge.meta.enum
+import space.kscience.dataforge.meta.scheme
+import space.kscience.plotly.intGreaterThan
+
+public class Contour : Trace(), HeatmapContour, ContourSpec {
+ init {
+ type = TraceType.contour
+ }
+
+ /**
+ * If "array", the heatmap's x coordinates are given by "x" (the default behavior when `x` is provided).
+ * If "scaled", the heatmap's x coordinates are given by "x0" and "dx" (the default behavior when `x` is not provided).
+ */
+ override var xtype: DataType by enum(DataType.array)
+
+ /**
+ * If "array", the heatmap's y coordinates are given by "y" (the default behavior when `y` is provided)
+ * If "scaled", the heatmap's y coordinates are given by "y0" and "dy" (the default behavior when `y` is not provided)
+ */
+ override var ytype: DataType by enum(DataType.array)
+
+ /**
+ * Sets the maximum number of contour levels. The actual number of contours
+ * will be chosen automatically to be less than or equal to the value of `ncontours`.
+ * Has an effect only if `autocontour` is "true" or if `contours.size` is missing.
+ * Default: 15.
+ */
+ override var ncontours: Int by intGreaterThan(1)
+
+ override var contours: Contours by scheme(Contours)
+
+ /**
+ * Determines whether or not the contour level attributes are picked by an algorithm.
+ * If "true" (default), the number of contour levels can be set in `ncontours`.
+ * If "false", set the contour level attributes in `contours`.
+ */
+ override var autocontour: Boolean? by boolean()
+
+ public fun contours(block: Contours.() -> Unit) {
+ contours = Contours(block)
+ }
+
+ public companion object : SchemeSpec(::Contour)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/ContourSpec.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/ContourSpec.kt
new file mode 100644
index 00000000..adf7214b
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/ContourSpec.kt
@@ -0,0 +1,68 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.plotly.numberGreaterThan
+
+public class Contours : Scheme() {
+ /**
+ * If `levels`, the data is represented as a contour plot with multiple
+ * levels displayed. If `constraint`, the data is represented as constraints
+ * with the invalid region shaded as specified by the `operation` and `value` parameters.
+ */
+ public var type: ContoursType by enum(ContoursType.levels)
+
+ /**
+ * Sets the starting contour level value. Must be less than `contours.end`
+ */
+ public var start: Number? by number()
+
+ /**
+ * Sets the end contour level value. Must be more than `contours.start`
+ */
+ public var end: Number? by number()
+
+ /**
+ * Sets the step between each contour level. Must be positive.
+ */
+ public var size: Number by numberGreaterThan(0)
+
+ /**
+ * Determines the coloring method showing the contour values.
+ * If "fill" (default), coloring is done evenly between each contour level
+ * If "heatmap", a heatmap gradient coloring is applied between each contour level.
+ * If "lines", coloring is done on the contour lines. If "none",
+ * no coloring is applied on this trace.
+ */
+ public var coloring: ContoursColoring by enum(ContoursColoring.fill)
+
+ /**
+ * Determines whether or not the contour lines are drawn.
+ * Has an effect only if `contours.coloring` is set to "fill".
+ */
+ public var showlines: Boolean? by boolean()
+
+ /**
+ * Determines whether to label the contour lines with their values.
+ */
+ public var showlabels: Boolean? by boolean()
+
+ /**
+ * Sets the font used for labeling the contour levels. The default color
+ * comes from the lines, if shown. The default family and size come from `layout.font`.
+ */
+ public var labelfont: Font by scheme(Font)
+
+ public fun labelfont(block: Font.() -> Unit) {
+ labelfont = Font(block)
+ }
+
+ public companion object : SchemeSpec(::Contours)
+}
+
+public interface ContourSpec {
+ public var ncontours: Int
+
+ public var contours: Contours
+
+ public var autocontour: Boolean?
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Heatmap.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Heatmap.kt
new file mode 100644
index 00000000..e3c7e378
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Heatmap.kt
@@ -0,0 +1,48 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.SchemeSpec
+import space.kscience.dataforge.meta.enum
+import space.kscience.plotly.numberGreaterThan
+
+public open class Heatmap : Trace(), Table2D, HeatmapContour {
+ init {
+ type = TraceType.heatmap
+ }
+
+ /**
+ * Sets the horizontal gap (in pixels) between bricks.
+ */
+ override var xgap: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the vertical gap (in pixels) between bricks.
+ */
+ override var ygap: Number by numberGreaterThan(0)
+
+ /**
+ * Picks a smoothing algorithm use to smooth `z` data.
+ */
+ override var zsmooth: ZsmoothType by enum(ZsmoothType.best)
+
+ /**
+ * If "array", the heatmap's x coordinates are given by "x" (the default behavior when `x` is provided).
+ * If "scaled", the heatmap's x coordinates are given by "x0" and "dx" (the default behavior when `x` is not provided).
+ */
+ override var xtype: DataType by enum(DataType.array)
+
+ /**
+ * If "array", the heatmap's y coordinates are given by "y" (the default behavior when `y` is provided)
+ * If "scaled", the heatmap's y coordinates are given by "y0" and "dy" (the default behavior when `y` is not provided)
+ */
+ override var ytype: DataType by enum(DataType.array)
+
+ public companion object : SchemeSpec(::Heatmap)
+}
+
+public class HeatmapGL : Heatmap() {
+ init {
+ type = TraceType.heatmapgl
+ }
+
+ public companion object : SchemeSpec(::HeatmapGL)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/HeatmapContour.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/HeatmapContour.kt
new file mode 100644
index 00000000..41d468c6
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/HeatmapContour.kt
@@ -0,0 +1,12 @@
+package space.kscience.plotly.models
+
+public enum class DataType {
+ array,
+ scaled
+}
+
+public interface HeatmapContour {
+ public var xtype: DataType
+
+ public var ytype: DataType
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Histogram.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Histogram.kt
new file mode 100644
index 00000000..75163070
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Histogram.kt
@@ -0,0 +1,265 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.plotly.intGreaterThan
+import space.kscience.plotly.numberGreaterThan
+import kotlin.js.JsName
+
+
+public enum class HistFunc {
+ count,
+ sum,
+
+ @JsName("avg")
+ average,
+ min,
+ max
+}
+
+public enum class HistNorm {
+ empty,
+ percent,
+ probability,
+ density,
+
+ @JsName("probabilityDensity")
+ `probability density`
+}
+
+public class Bins : Scheme() {
+ //FIXME("add categorical coordinate string")
+
+ /**
+ * Sets the starting value for the x axis bins.
+ * Defaults to the minimum data value, shifted down
+ * if necessary to make nice round values and to remove
+ * ambiguous bin edges. For example, if most of the data
+ * is integers we shift the bin edges 0.5 down, so a `size`
+ * of 5 would have a default `start` of -0.5, so it is clear
+ * that 0-4 are in the first bin, 5-9 in the second, but
+ * continuous data gets a start of 0 and bins [0,5), [5,10) etc.
+ * Dates behave similarly, and `start` should be a date string.
+ * For category data, `start` is based on the category
+ * serial numbers, and defaults to -0.5.
+ */
+ public var start: Number? by number()
+
+ /**
+ * Sets the end value for the x axis bins. The last bin may
+ * not end exactly at this value, we increment the bin edge
+ * by `size` from `start` until we reach or exceed `end`.
+ * Defaults to the maximum data value. Like `start`, for
+ * dates use a date string, and for category data `end`
+ * is based on the category serial numbers.
+ */
+ public var end: Number? by number()
+
+ /**
+ * Sets the size of each x axis bin. Default behavior:
+ * If `nbinsx` is 0 or omitted, we choose a nice round
+ * bin size such that the number of bins is about
+ * the same as the typical number of samples in each bin.
+ * If `nbinsx` is provided, we choose a nice round bin size
+ * giving no more than that many bins. For date data,
+ * use milliseconds or "M" for months, as in `axis.dtick`.
+ * For category data, the number of categories to bin together
+ * (always defaults to 1).
+ */
+ public var size: Number by numberGreaterThan(0)
+
+ public companion object : SchemeSpec(::Bins)
+}
+
+public enum class HistogramDirection {
+ increasing,
+ decreasing
+}
+
+public enum class CurrentBin {
+ include,
+ exclude,
+ half
+}
+
+public class Cumulative : Scheme() {
+ /**
+ * If true, display the cumulative distribution by summing
+ * the binned values. Use the `direction` and `centralbin`
+ * attributes to tune the accumulation method. Note: in this mode,
+ * the "density" `histnorm` settings behave the same
+ * as their equivalents without "density": "" and "density"
+ * both rise to the number of data points, and "probability"
+ * and "probability density" both rise to the number of sample points.
+ */
+ public var enabled: Boolean? by boolean()
+
+ /**
+ * Enumerated , one of ( "include" | "exclude" | "half" )
+ * Only applies if cumulative is enabled. Sets whether the current bin
+ * is included, excluded, or has half of its value included in
+ * the current cumulative value. "include" is the default for
+ * compatibility with various other tools, however it introduces
+ * a half-bin bias to the results. "exclude" makes the opposite
+ * half-bin bias, and "half" removes it.
+ * Default: include.
+ */
+ public var currentbin: CurrentBin by enum(CurrentBin.include)
+
+ public companion object : SchemeSpec(::Cumulative)
+}
+
+
+public open class Histogram : Trace() {
+ init {
+ type = TraceType.histogram
+ }
+
+ /**
+ * Enumerated, one of ( "empty" | "percent" | "probability" | "density" | "probability density" )
+ * Specifies the type of normalization used for this histogram trace.
+ * If "empty", the span of each bar corresponds to the number of occurrences
+ * (i.e. the number of data points lying inside the bins). If "percent" / "probability",
+ * the span of each bar corresponds to the percentage / fraction of occurrences
+ * with respect to the total number of sample points (here, the sum of all
+ * bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds
+ * to the number of occurrences in a bin divided by the size of the bin interval
+ * (here, the sum of all bin AREAS equals the total number of sample points).
+ * If "probability density", the area of each bar corresponds to the probability
+ * that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).
+ * Default: "empty".
+ */
+ public var histnorm: HistNorm by enum(HistNorm.empty)
+
+ /**
+ * Enumerated , one of ( "count" | "sum" | "avg" | "min" | "max" )
+ * Specifies the binning function used for this histogram trace.
+ * If "count", the histogram values are computed by counting the
+ * number of values lying inside each bin. If "sum", "avg", "min", "max",
+ * the histogram values are computed using the sum, the average,
+ * the minimum or the maximum of the values lying inside each bin respectively.
+ * Default: "count"
+ */
+ public var histfunc: HistFunc by enum(HistFunc.count)
+
+ /**
+ * Enumerated , one of ( "increasing" | "decreasing" )
+ * Only applies if cumulative is enabled. If "increasing" (default)
+ * we sum all prior bins, so the result increases from left to right.
+ * If "decreasing" we sum later bins so the result decreases from left to right.
+ * Default: increasing.
+ */
+ public var direction: HistogramDirection by enum(HistogramDirection.increasing)
+
+ public var cumulative: Cumulative by scheme(Cumulative)
+
+ public var xbins: Bins by scheme(Bins)
+
+ public var ybins: Bins by scheme(Bins)
+
+ /**
+ * Specifies the maximum number of desired bins. This value will be used in an algorithm
+ * that will decide the optimal bin size such that the histogram best visualizes the
+ * distribution of the data. Ignored if `xbins.size` is provided.
+ */
+ public var nbinsx: Int by intGreaterThan(0)
+
+ /**
+ * Specifies the maximum number of desired bins. This value will be used in an algorithm
+ * that will decide the optimal bin size such that the histogram best visualizes the
+ * distribution of the data. Ignored if `ybins.size` is provided.
+ */
+ public var nbinsy: Int by intGreaterThan(0)
+
+ /**
+ * Set a group of histogram traces which will have compatible bin settings.
+ * Note that traces on the same subplot and with the same "orientation" under
+ * `barmode` "stack", "relative" and "group" are forced into the same bingroup,
+ * Using `bingroup`, traces under `barmode` "overlay" and on different axes
+ * (of the same axis type) can have compatible bin settings. Note that histogram
+ * and histogram2d" trace can share the same `bingroup`.
+ * Default: "".
+ */
+ public var bingroup: String? by string()
+
+ /**
+ * Set a group of histogram traces which will have compatible x-bin settings.
+ * Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type)
+ * can have compatible x-bin settings. Note that the same `xbingroup` value
+ * can be used to set (1D) histogram `bingroup`
+ */
+ public var xbingroup: String? by string()
+
+ /**
+ * Set a group of histogram traces which will have compatible x-bin settings.
+ * Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type)
+ * can have compatible x-bin settings. Note that the same `ybingroup` value
+ * can be used to set (1D) histogram `bingroup`
+ */
+ public var ybingroup: String? by string()
+
+ public fun cumulative(block: Cumulative.() -> Unit) {
+ cumulative = Cumulative(block)
+ }
+
+ public fun xbins(block: Bins.() -> Unit) {
+ xbins = Bins(block)
+ }
+
+ public fun ybins(block: Bins.() -> Unit) {
+ ybins = Bins(block)
+ }
+
+ public companion object : SchemeSpec(::Histogram)
+}
+
+public class Histogram2D : Histogram(), Table2D {
+ init {
+ type = TraceType.histogram2d
+ }
+
+ /**
+ * Sets the horizontal gap (in pixels) between bricks.
+ */
+ override var xgap: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the vertical gap (in pixels) between bricks.
+ */
+ override var ygap: Number by numberGreaterThan(0)
+
+ /**
+ * Picks a smoothing algorithm use to smooth `z` data.
+ */
+ override var zsmooth: ZsmoothType by enum(ZsmoothType.best)
+
+ public companion object : SchemeSpec(::Histogram2D)
+}
+
+public class Histogram2DContour : Histogram(), ContourSpec {
+ init {
+ type = TraceType.histogram2dcontour
+ }
+
+ /**
+ * Sets the maximum number of contour levels. The actual number of contours
+ * will be chosen automatically to be less than or equal to the value of `ncontours`.
+ * Has an effect only if `autocontour` is "true" or if `contours.size` is missing.
+ * Default: 15.
+ */
+ override var ncontours: Int by intGreaterThan(1)
+
+ override var contours: Contours by scheme(Contours)
+
+ /**
+ * Determines whether or not the contour level attributes are picked by an algorithm.
+ * If "true" (default), the number of contour levels can be set in `ncontours`.
+ * If "false", set the contour level attributes in `contours`.
+ */
+ override var autocontour: Boolean? by boolean()
+
+ public fun contours(block: Contours.() -> Unit) {
+ contours = Contours(block)
+ }
+
+ public companion object : SchemeSpec(::Histogram2DContour)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Images.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Images.kt
new file mode 100644
index 00000000..26a8343b
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Images.kt
@@ -0,0 +1,130 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.plotly.doubleInRange
+
+
+public enum class ImageLayer {
+ below, above
+}
+
+public enum class ImageSizing {
+ fill, contain, stretch
+}
+
+public enum class ImageXAnchor {
+ left, center, right
+}
+
+public enum class ImageYAnchor {
+ top, middle, bottom
+}
+
+public class Image : Scheme() {
+ /**
+ * Specifies whether images are drawn below or above traces. When `xref` and `yref` are both set to `paper`,
+ * image is drawn below the entire plot area.
+ */
+ public var layer: ImageLayer by enum(ImageLayer.above)
+
+ /**
+ * When used in a template, named items are created in the output figure in addition to any items the figure
+ * already has in this array. You can modify these items in the output figure by making your own item with
+ * `templateitemname` matching this `name` alongside your modifications (including `visible: false` or
+ * `enabled: false` to hide it). Has no effect outside of a template.
+ */
+ public var name: String? by string()
+
+
+ /**
+ * Sets the opacity of the image.
+ */
+ public var opacity: Double by doubleInRange(0.0..1.0, 0.0)
+
+ /**
+ * Sets the image container size horizontally. The image will be sized based on the `position` value .
+ * When `xref` is set to `paper`, units are sized relative to the plot width. When `xref` ends with ` domain`,
+ * units are sized relative to the axis width.
+ */
+ public var sizex: Double by double(0.0)
+
+
+ /**
+ * Sets the image container size vertically. The image will be sized based on the `position` value .
+ * When `yref` is set to `paper`, units are sized relative to the plot height. When `yref` ends with ` domain`,
+ * units are sized relative to the axis height.
+ */
+ public var sizey: Double by double(0.0)
+
+
+ /**
+ * Specifies which dimension of the image to constrain.
+ */
+ public var sizing: ImageSizing by enum(ImageSizing.contain)
+
+ /**
+ * Specifies the URL of the image to be used. The URL must be accessible from the domain where the plot code is run,
+ * and can be either relative or absolute.
+ */
+ public var source: String? by string()
+
+ /**
+ * Used to refer to a named item in this array in the template. Named items from the template will be created even
+ * without a matching item in the input figure, but you can modify one by making an item with `templateitemname`
+ * matching its `name`, alongside your modifications (including `visible: false` or `enabled: false` to hide it).
+ * If there is no template or no matching item, this item will be hidden unless you explicitly show it with `visible: true`.
+ */
+ public var templateitemname: String? by string()
+
+ /**
+ * Determines whether this image is visible.
+ */
+ public var visible: Boolean by boolean(true)
+
+
+ /**
+ * Sets the image's x position. When `xref` is set to `paper`, units are sized relative to the plot height. See `xref` for more info
+ */
+ public var x: Double by double(0.0)
+
+
+ /**
+ * Sets the anchor for the x position
+ */
+ public var xanchor: ImageXAnchor by enum(ImageXAnchor.left)
+
+
+ /**
+ * Sets the images's x coordinate axis. If set to a x axis id (e.g. "x" or "x2"), the `x` position refers to
+ * a x coordinate. If set to "paper", the `x` position refers to the distance from the left of the plotting
+ * area in normalized coordinates where "0" ("1") corresponds to the left (right). If set to a x axis ID followed
+ * by "domain" (separated by a space), the position behaves like for "paper", but refers to the distance in fractions
+ * of the domain length from the left of the domain of that axis: e.g., "x2 domain" refers to the domain of the
+ * second x axis and a x position of 0.5 refers to the point between the left and the right of the domain of the second x axis.
+ */
+ public var xref: String by string("paper")
+
+ /**
+ * Sets the image's y position. When `yref` is set to `paper`, units are sized relative to the plot height. See `yref` for more info
+ */
+ public var y: Double by double(0.0)
+
+ /**
+ * Sets the anchor for the y position.
+ */
+ public var yanchor: ImageYAnchor by enum(ImageYAnchor.top)
+
+ /**
+ * Sets the images's y coordinate axis. If set to a y axis id (e.g. "y" or "y2"), the `y` position refers to a y
+ * coordinate. If set to "paper", the `y` position refers to the distance from the bottom of the plotting area in
+ * normalized coordinates where "0" ("1") corresponds to the bottom (top). If set to a y axis ID followed by "domain"
+ * (separated by a space), the position behaves like for "paper", but refers to the distance in fractions of the
+ * domain length from the bottom of the domain of that axis: e.g., "y2 domain" refers to the domain of the second
+ * y axis and a y position of 0.5 refers to the point between the bottom and the top of the domain of the second y axis.
+ */
+ public var yref: String by string("paper")
+
+ public companion object : SchemeSpec(::Image) {
+
+ }
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Layout.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Layout.kt
new file mode 100644
index 00000000..ae8e3145
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Layout.kt
@@ -0,0 +1,348 @@
+@file:Suppress("EnumEntryName")
+@file:OptIn(DFExperimental::class)
+
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.*
+import space.kscience.dataforge.meta.set
+import space.kscience.dataforge.misc.DFExperimental
+import space.kscience.dataforge.names.asName
+import space.kscience.plotly.appendAndAttach
+import space.kscience.plotly.numberGreaterThan
+import space.kscience.plotly.numberInRange
+import kotlin.js.JsName
+
+
+public enum class BarMode {
+ stack,
+ group,
+ overlay,
+ relative
+}
+
+public class Margin : Scheme() {
+ /**
+ * Turns on/off margin expansion computations. Legends, colorbars, updatemenus, sliders,
+ * axis rangeselector and rangeslider are allowed to push the margins by defaults.
+ */
+ public var autoexpand: Boolean? by boolean()
+
+ /**
+ * Sets the amount of padding (in px) between the plotting area and the axis lines
+ */
+ public var pad: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the left margin (in px). Default: 80.
+ */
+ public var l: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the right margin (in px). Default: 80.
+ */
+ public var r: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the top margin (in px). Default: 100.
+ */
+ public var t: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the bottom margin (in px). Default: 80.
+ */
+ public var b: Number by numberGreaterThan(0)
+
+ public companion object : SchemeSpec(::Margin)
+}
+
+public enum class BoxMode {
+ overlay,
+ group
+}
+
+public enum class HoverMode {
+ x,
+ y,
+ closest,
+ `false`,
+
+ @JsName("xUnified")
+ `x unified`,
+
+ @JsName("yUnified")
+ `y unified`
+}
+
+public enum class BarNorm {
+ fraction,
+ percent,
+
+ @Suppress("DANGEROUS_CHARACTERS")
+ @JsName("empty")
+ `""`
+}
+
+public enum class ViolinMode {
+ group,
+ overlay
+}
+
+public enum class DragMode {
+ zoom, pan, select, lasso, drawclosedpath, drawopenpath, drawline, drawrect, drawcircle, orbit, turntable, `false`
+}
+
+public class Layout : Scheme() {
+ /**
+ * Sets the plot's width (in px).
+ * Number greater than or equal to 10, default: 700.
+ */
+ public var width: Number by numberGreaterThan(10)
+
+ /**
+ * Sets the plot's height (in px).
+ * Number greater than or equal to 10, default: 450.
+ */
+ public var height: Number by numberGreaterThan(10)
+
+ /**
+ * Determines whether or not a layout width or height that has been left undefined
+ * by the user is initialized on each relayout. Note that, regardless of this attribute, an undefined layout
+ * width or height is always initialized on the first call to plot.
+ */
+ public var autosize: Boolean? by boolean()
+
+ /**
+ * Sets the plot's title.
+ */
+ public var title: String?
+ get() = meta["title.text"].string ?: meta["title"].string
+ set(value) {
+ meta["title.text"] = value?.asValue()
+ }
+
+ public var xaxis: Axis by scheme(Axis)
+
+ public var yaxis: Axis by scheme(Axis)
+
+ /**
+ * Enumerated, one of ( "stack" | "group" | "overlay" | "relative" )
+ * Determines how bars at the same location coordinate
+ * are displayed on the graph. With "stack", the bars
+ * are stacked on top of one another With "relative",
+ * the bars are stacked on top of one another, with negative values
+ * below the axis, positive values above With "group", the bars
+ * are plotted next to one another centered around the shared location.
+ * With "overlay", the bars are plotted over one another, you might
+ * need to an "opacity" to see multiple bars.
+ * Default: "group".
+ */
+ public var barmode: BarMode by enum(BarMode.group)
+
+ /**
+ * Sets the normalization for bar traces on the graph. With "fraction", the value of each bar
+ * is divided by the sum of all values at that location coordinate. "percent" is the same but multiplied
+ * by 100 to show percentages. Default: "".
+ */
+ public var barnorm: BarNorm by enum(BarNorm.`""`)
+
+ /**
+ * Sets the gap (in plot fraction) between bars
+ * of adjacent location coordinates.
+ */
+ public var bargap: Number by numberInRange(0.0..1.0)
+
+ /**
+ * Sets the gap (in plot fraction) between bars of the same location coordinate.
+ * Default: 0.
+ */
+ public var bargroupgap: Number by numberInRange(0.0..1.0)
+
+ /**
+ * Determines how violins at the same location coordinate are displayed on the graph. If "group",
+ * the violins are plotted next to one another centered around the shared location. If "overlay",
+ * the violins are plotted over one another, you might need to set "opacity" to see them multiple violins.
+ * Has no effect on traces that have "width" set.
+ */
+ public var violinmode: ViolinMode by enum(ViolinMode.overlay)
+
+ /**
+ * Sets the gap (in plot fraction) between violins of adjacent location coordinates.
+ * Has no effect on traces that have "width" set. Default: 0.3
+ */
+ public var violingap: Number by numberInRange(0.0..1.0)
+
+ /**
+ * Sets the gap (in plot fraction) between violins of the same location coordinate.
+ * Has no effect on traces that have "width" set. Default: 0.3
+ */
+ public var violingroupgap: Number by numberInRange(0.0..1.0)
+
+ public var legend: Legend by scheme(Legend)
+
+ /**
+ * An annotation is a text element that can be placed anywhere in the plot.
+ * It can be positioned with respect to relative coordinates in the plot
+ * or with respect to the actual data coordinates of the graph.
+ * Annotations can be shown with or without an arrow.
+ */
+ public var annotations: List by listOfScheme(Text)
+
+ public var shapes: List by listOfScheme(Shape)
+
+ /**
+ * Sets the background color of the paper where the graph is drawn.
+ * Default: #fff.
+ */
+ public val paper_bgcolor: Color by color()
+
+ /**
+ * Sets the background color of the plotting area in-between x and y axes.
+ * Default: #fff.
+ */
+ public val plot_bgcolor: Color by color()
+
+ public var margin: Margin by scheme(Margin)
+
+ /**
+ * Determines how boxes at the same location coordinate are displayed on the graph. If "group",
+ * the boxes are plotted next to one another centered around the shared location. If "overlay",
+ * the boxes are plotted over one another, you might need to set "opacity" to see them multiple boxes.
+ * Has no effect on traces that have "width" set.
+ */
+ public var boxmode: BoxMode by enum(BoxMode.overlay)
+
+ /**
+ * Sets the gap (in plot fraction) between boxes of adjacent location coordinates.
+ * Has no effect on traces that have "width" set. Default: 0.3
+ */
+ public var boxgap: Number by numberInRange(0.0..1.0)
+
+ /**
+ * Sets the gap (in plot fraction) between boxes of the same location coordinate.
+ * Has no effect on traces that have "width" set. Default: 0.3
+ */
+ public var boxgroupgap: Number by numberInRange(0.0..1.0)
+
+ /**
+ * Determines whether or not a legend is drawn. Default is `true` if there is a trace to show and any of these:
+ * a) Two or more traces would by default be shown in the legend.
+ * b) One pie trace is shown in the legend.
+ * c) One trace is explicitly given with `showlegend: true`.
+ */
+ public var showlegend: Boolean? by boolean()
+
+ /**
+ * Determines the mode of hover interactions. If "closest", a single hoverlabel will appear for the "closest"
+ * point within the `hoverdistance`. If "x" (or "y"), multiple hoverlabels will appear for multiple points
+ * at the "closest" x- (or y-) coordinate within the `hoverdistance`, with the caveat that no more than one
+ * hoverlabel will appear per trace. If "x unified" (or "y unified"), a single hoverlabel will appear
+ * multiple points at the closest x- (or y-) coordinate within the `hoverdistance` with the caveat that
+ * no more than one hoverlabel will appear per trace. In this mode, spikelines are enabled by
+ * default perpendicular to the specified axis. If false, hover interactions are disabled. If `clickmode` includes
+ * the "select" flag, `hovermode` defaults to "closest". If `clickmode` lacks the "select" flag, it defaults
+ * to "x" or "y" (depending on the trace's `orientation` value) for plots based on cartesian coordinates.
+ * For anything else the default value is "closest".
+ */
+ public var hovermode: HoverMode by enum(HoverMode.closest)
+
+ /**
+ * Sets the decimal and thousand separators. For example, ". " puts a '.' before decimals and a space
+ * between thousands. In English locales, dflt is ".," but other locales may alter this default.
+ */
+ public var separators: String? by string()
+
+ /**
+ * Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff,
+ * 0 means no looking for data). This is only a real distance for hovering on point-like objects, like
+ * scatter points. For area-like objects (bars, scatter fills, etc) hovering is on inside the area and off outside,
+ * but these objects will not supersede hover on point-like objects in case of conflict.
+ * Default: 20.
+ */
+ public var hoverdistance: Number by numberGreaterThan(-1)
+
+ /**
+ * Sets the default calendar system to use for interpreting and displaying dates throughout the plot.
+ */
+ public var calendar: Calendar by enum(Calendar.gregorian)
+
+ /**
+ * Determines the mode of drag interactions. "select" and "lasso" apply only to scatter traces with markers or text.
+ * "orbit" and "turntable" apply only to 3D scenes.
+ */
+ public var dragmode: DragMode by enum(DragMode.zoom)
+
+ public fun legend(block: Legend.() -> Unit) {
+ legend.apply(block)
+ }
+
+ public fun title(block: Title.() -> Unit) {
+ Title.write(meta.getOrCreate("title")).apply(block)
+ }
+
+ //TODO moe title to parameter block
+ public fun xaxis(block: Axis.() -> Unit) {
+ xaxis.apply(block)
+ }
+
+ public fun yaxis(block: Axis.() -> Unit) {
+ yaxis.apply(block)
+ }
+
+ /**
+ * Secondary y-axis. [index] must be 2 or more
+ */
+ public fun yaxis(index: Int, block: Axis.() -> Unit) {
+ require(index >= 2) { "Secondary axis index must be 2 or more" }
+ val axisSpec by scheme(Axis, "yaxis$index".asName())
+ axisSpec.apply(block)
+ }
+
+ /**
+ * Add a [Text] annotation to layout
+ */
+ public fun annotation(an: Text) {
+ meta.appendAndAttach("annotations", an.meta)
+ }
+
+ /**
+ * Add a [Text] annotation to layout
+ */
+ public fun annotation(anBuilder: Text.() -> Unit) {
+ annotation(Text(anBuilder))
+ }
+
+ /**
+ * Add a [Shape] to layout
+ */
+ public fun figure(sh: Shape) {
+ meta.appendAndAttach("shapes", sh.meta)
+ }
+
+ /**
+ * Add a [Shape] to layout
+ */
+ public fun figure(shBuilder: Shape.() -> Unit) {
+ figure(Shape(shBuilder))
+ }
+
+ /**
+ * Add an image to the layout
+ */
+ public fun image(image: Image) {
+ meta.appendAndAttach("images", image.meta)
+ }
+
+ /**
+ * Add an image to the layout
+ */
+ public fun image(block: Image.() -> Unit) {
+ image(Image(block))
+ }
+
+ public fun margin(block: Margin.() -> Unit) {
+ margin = Margin(block)
+ }
+
+ public companion object : SchemeSpec(::Layout)
+}
+
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/LayoutLine.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/LayoutLine.kt
new file mode 100644
index 00000000..7181b4fc
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/LayoutLine.kt
@@ -0,0 +1,65 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.Scheme
+import space.kscience.dataforge.meta.SchemeSpec
+import space.kscience.dataforge.meta.enum
+import space.kscience.dataforge.meta.numberList
+import space.kscience.dataforge.names.asName
+import space.kscience.plotly.numberGreaterThan
+import space.kscience.plotly.numberInRange
+
+public enum class LineShape {
+ hv,
+ vh,
+ hvh,
+ vhv,
+ spline,
+ linear
+}
+
+public enum class Dash {
+ solid,
+ dot,
+ dash,
+ longdash,
+ dashdot,
+ longdashdot
+}
+
+public class LayoutLine : Scheme(), Line {
+ /**
+ * Sets the line color.
+ */
+ override val color: Color by color()
+
+ /**
+ * Sets the line width (in px). Default: 2.
+ */
+ override var width: Number by numberGreaterThan(0)
+
+ /**
+ * Sets the width (in px) of the lines bounding the marker points.
+ */
+ override var widthList: List by numberList(key = "width".asName())
+
+ /**
+ * Determines the line shape. With "spline" the lines
+ * are drawn using spline interpolation. The other
+ * available values correspond to step-wise line shapes.
+ * Default: "linear"
+ */
+ public var shape: LineShape by enum(LineShape.linear)
+
+ /**
+ * Sets the style of the lines.
+ */
+ public var dash: Dash by enum(Dash.solid)
+
+ /**
+ * Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing.
+ * Default: 1.
+ */
+ public var smoothing: Number by numberInRange(0.0..1.3)
+
+ public companion object : SchemeSpec(::LayoutLine)
+}
\ No newline at end of file
diff --git a/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Legend.kt b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Legend.kt
new file mode 100644
index 00000000..9742c8fa
--- /dev/null
+++ b/plotly/plotlykt-core/src/commonMain/kotlin/space/kscience/plotly/models/Legend.kt
@@ -0,0 +1,120 @@
+package space.kscience.plotly.models
+
+import space.kscience.dataforge.meta.Scheme
+import space.kscience.dataforge.meta.SchemeSpec
+import space.kscience.dataforge.meta.enum
+import space.kscience.dataforge.meta.scheme
+import space.kscience.plotly.numberGreaterThan
+import space.kscience.plotly.numberInRange
+import kotlin.js.JsName
+
+public enum class LegendOrientation {
+ @JsName("v")
+ vertical,
+
+ @JsName("h")
+ horizontal
+}
+
+public enum class XAnchor {
+ auto,
+ left,
+ center,
+ right
+}
+
+public enum class YAnchor {
+ auto,
+ top,
+ middle,
+ bottom
+}
+
+public enum class TraceOrder {
+ normal,
+ reversed
+}
+
+public class Legend : Scheme() {
+ /**
+ * Sets the legend background color. Defaults to `paper_bgcolor`.
+ */
+ public val bgcolor: Color by color()
+
+ /**
+ * Sets the color of the border enclosing the legend.
+ * Default: #444.
+ */
+ public val bordercolor: Color by color()
+
+ /**
+ * Sets the width (in px) of the border enclosing the legend.
+ * Default: 0.
+ */
+ public var borderwidth: Number by numberGreaterThan(0)
+
+ /**
+ * Number between or equal -2 and 3.
+ * Sets the x position (in normalized coordinates) of the legend.
+ * Defaults to "1.02" for vertical legends and
+ * defaults to "0" for horizontal legends.
+ */
+ public var x: Number by numberInRange(-2.0..3.0)
+
+ /**
+ * Sets the legend's horizontal position anchor.
+ * This anchor binds the `x` position to the "left",
+ * "center" or "right" of the legend. Value "auto"
+ * anchors legends to the right for `x` values
+ * greater than or equal to 2/3, anchors legends
+ * to the left for `x` values less than or equal to 1/3
+ * and anchors legends with respect to their center otherwise.
+ * Default: left.
+ */
+ public var xanchor: XAnchor by enum(XAnchor.left)
+
+ /**
+ * Number between or equal to -2 and 3.
+ * Sets the y position (in normalized coordinates) of the legend.
+ * Defaults to "1" for vertical legends, defaults to "-0.1"
+ * for horizontal legends on graphs w/o range sliders and
+ * defaults to "1.1" for horizontal legends on graph
+ * with one or multiple range sliders.
+ */
+ public var y: Number by numberInRange(-2.0..3.0)
+
+ /**
+ * Sets the legend's vertical position anchor.
+ * This anchor binds the `y` position to the "top", "middle"
+ * or "bottom" of the legend. Value "auto" anchors legends
+ * at their bottom for `y` values less than or equal to 1/3,
+ * anchors legends to at their top for `y` values
+ * greater than or equal to 2/3 and anchors legends
+ * with respect to their middle otherwise.
+ */
+ public var yanchor: YAnchor by enum(YAnchor.auto)
+
+ /**
+ * Sets the font used to text the legend items.
+ */
+ public var font: Font by scheme(Font)
+
+ /**
+ * Sets the orientation of the legend (vertical/horizontal).
+ * Default: vertical.
+ */
+ public var orientation: LegendOrientation by enum(LegendOrientation.vertical)
+
+ /**
+ * The order at which the legend items are displayed.
+ * "normal": top-to-bottom in the same order as the input data.
+ * "reversed": the items are displayed in the opposite order.
+ */
+ public var traceorder: TraceOrder by enum(TraceOrder.normal)
+
+ public fun font(block: Font.() -> Unit) {
+ font = Font(block)
+ }
+
+ public companion object : SchemeSpec