Skip to content

Images only show on first facet #58

@tlyon3

Description

@tlyon3

When using facet_col, images added to the layout only are put in the first facet:

using PlotlyJS, CSV, DataFrames

df = dataset(DataFrame, "iris")
sources = [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Iris_setosa_var._setosa_%282595031014%29.jpg/360px-Iris_setosa_var._setosa_%282595031014%29.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Iris_versicolor_quebec_1.jpg/320px-Iris_versicolor_quebec_1.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Iris_virginica_2.jpg/480px-Iris_virginica_2.jpg",
]
layout = Layout(
    images = [
        attr(
            row=1,
            col=col + 1,
            source=src,
            xref="x domain",
            yref="y domain",
            x=1,
            y=1,
            xanchor="right",
            yanchor="top",
            sizex=0.2,
            sizey=0.2,
        )
    for (col, src) in enumerate(sources)]
)
plot(
    df,
    kind="scatter",
    mode="markers",
    x=:sepal_length,
    y=:sepal_width,
    facet_col=:species,
    layout
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions