Skip to content

relating the index of fig.data to row and col #3023

@ghost

Description

I am trying to plot a diagonal line per facet where each facet has its own axes scales.
fig.data can get me the proper range per facet via

for i, d in enumerate(fig.data):
    x0, x1= d.x.min(), d.x.max()

If I would had known the right row and col of each facet i, I would then use:
fig.add_shape(type='line',x0=x0, x1=x1, y0=x0, y1=x1, row=row, col=col)

However, to relate the index in data to the row and col needed to plot the new line is a kind of nightmare.
I tried a lot of stuff including fig._grid_ref but still no success.

help please !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions