io.github.danielTucano.matplotlib.pyplot.grid.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of matplotlib4k Show documentation
Show all versions of matplotlib4k Show documentation
Matplotlib for kotlin: A simple graph plot library for kotlin with powerful python matplotlib
The newest version!
package io.github.danielTucano.matplotlib.pyplot
import io.github.danielTucano.extensions.toPythonBooleanOrNone
import io.github.danielTucano.extensions.toPythonStringQuotedOrEmpty
import io.github.danielTucano.python.PythonScriptBuilder
fun grid(
visible: Boolean? = null,
which: GridWhichOptions = GridWhichOptions.major,
axis: GridAxisOptions = GridAxisOptions.both
) {
PythonScriptBuilder.addCommand("plt.grid(visible=${visible.toPythonBooleanOrNone()},which=${which.toPythonStringQuotedOrEmpty()},axis=${axis.toPythonStringQuotedOrEmpty()})")
}
enum class GridWhichOptions { major, minor, both }
enum class GridAxisOptions { both, x, y }