We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Other variants of Plotly (JS, Python) support plotting traces on multiple Y axes. It'd be great if that feature was ported to the Kotlin wrapper.
The text was updated successfully, but these errors were encountered:
I did not know about that feature. I will add it to new release. For now, you can use custom fields like this:
import space.kscience.dataforge.meta.set import space.kscience.dataforge.meta.spec import space.kscience.dataforge.names.asName import space.kscience.plotly.Plotly import space.kscience.plotly.layout import space.kscience.plotly.makeFile import space.kscience.plotly.models.Axis import space.kscience.plotly.models.Layout import space.kscience.plotly.scatter fun Layout.yaxis(index: Int, block: Axis.()->Unit){ require(index>=2){"Secondary axis index must be 2 or more"} val axisSpec by spec(Axis,"yaxis$index".asName()) axisSpec.apply(block) } 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" set("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)") } set("overlaying", "y") set("side","right") } } }.makeFile() }
Sorry, something went wrong.
No branches or pull requests
Other variants of Plotly (JS, Python) support plotting traces on multiple Y axes. It'd be great if that feature was ported to the Kotlin wrapper.
The text was updated successfully, but these errors were encountered: