INNER CODE UNIT · Python

create_plotly_colorscale

ssebastianmag/hydrogen-wavefunctions · interactive_plot/interactive_plot_util.py:79

def create_plotly_colorscale(name: str):
    """
    Create a Plotly-compatible colorscale from a seaborn color palette.

    Parameters
    ----------
    name : str, optional
        Name of the seaborn color palette to convert.

    Returns
    -------
    list
        Plotly colorscale list of the form
        [[pos, "rgb(r,g,b)"], ...] with 100 samples.

    Notes
    -----
    The colorscale is linearly sampled from the seaborn palette and

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…