All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.danielTucano.matplotlib.pyplot.ylabel.kt Maven / Gradle / Ivy

Go to download

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.emptyIfNullOrComma
import io.github.danielTucano.extensions.toPythonStringOrNone
import io.github.danielTucano.extensions.toPythonStringQuotedOrEmpty
import io.github.danielTucano.extensions.toPythonStringQuotedOrNone
import io.github.danielTucano.matplotlib.AxesBase
import io.github.danielTucano.matplotlib.KwargValue
import io.github.danielTucano.matplotlib.Text
import io.github.danielTucano.matplotlib.toKwargPythonStringOrEmpty
import io.github.danielTucano.python.PythonScriptBuilder

fun ylabel(
    ylabel: String,
    labelpad: Double = 4.0,
    loc: AxesBase.LabelLocOptions = AxesBase.LabelLocOptions.center,
    kwargs: Map? = null
) {
    PythonScriptBuilder.addCommand(
        "plt.ylabel(" +
                "ylabel=${ylabel.toPythonStringQuotedOrEmpty()}," +
                "labelpad=${labelpad.toPythonStringOrNone()}," +
                "loc=${loc.toPythonStringQuotedOrNone()}${kwargs.emptyIfNullOrComma()}" +
                kwargs.toKwargPythonStringOrEmpty() +
                ")"
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy