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

26 lines
703 B
Kotlin
Raw Normal View History

2021-01-12 12:52:22 +03:00
package hep.dataforge.vision.examples
2021-02-16 14:49:15 +03:00
import hep.dataforge.misc.DFExperimental
2021-01-12 12:52:22 +03:00
import hep.dataforge.vision.VisionForge
import hep.dataforge.vision.html.ResourceLocation
2021-01-12 12:52:22 +03:00
import hep.dataforge.vision.html.fragment
2021-02-26 13:03:40 +03:00
import hep.dataforge.vision.invoke
2021-01-12 12:52:22 +03:00
import hep.dataforge.vision.plotly.plotly
2021-02-26 13:03:40 +03:00
import hep.dataforge.vision.plotly.usePlotly
2021-01-12 12:52:22 +03:00
import kscience.plotly.scatter
@DFExperimental
2021-02-26 13:03:40 +03:00
fun main() = VisionForge {
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
usePlotly()
makeVisionFile(fragment, resourceLocation = ResourceLocation.SYSTEM)
2021-01-12 12:52:22 +03:00
}