visionforge/demo/playground/src/jvmMain/kotlin/plotlyVision.kt

25 lines
763 B
Kotlin
Raw Normal View History

2021-03-07 16:19:43 +03:00
package space.kscience.visionforge.examples
2021-01-12 12:52:22 +03:00
2021-03-07 16:19:43 +03:00
import space.kscience.dataforge.misc.DFExperimental
import space.kscience.plotly.scatter
import space.kscience.visionforge.VisionForge
import space.kscience.visionforge.html.ResourceLocation
import space.kscience.visionforge.html.fragment
import space.kscience.visionforge.invoke
import space.kscience.visionforge.plotly.PlotlyPlugin
import space.kscience.visionforge.plotly.plotly
2021-01-12 12:52:22 +03:00
@DFExperimental
2021-02-27 21:40:58 +03:00
fun main() = VisionForge(PlotlyPlugin) {
2021-02-26 13:03:40 +03:00
val fragment = fragment {
2021-01-12 12:52:22 +03:00
vision {
plotly {
scatter {
2021-02-26 13:03:40 +03:00
x(1, 2, 3)
y(5, 8, 7)
2021-01-12 12:52:22 +03:00
}
}
}
}
2021-02-26 13:03:40 +03:00
makeVisionFile(fragment, resourceLocation = ResourceLocation.SYSTEM)
2021-01-12 12:52:22 +03:00
}