Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Marginal subplots disappear when selecting another frame #159

Open
juanmah opened this issue Nov 13, 2019 · 1 comment
Open

Marginal subplots disappear when selecting another frame #159

juanmah opened this issue Nov 13, 2019 · 1 comment

Comments

@juanmah
Copy link

juanmah commented Nov 13, 2019

I have a plotly express graph with marginal subplots and animation frame:

fig = px.scatter(
    timeseries_heating,
    x="air_temperature",
    y="heating_degree_hours_",
    color="meter",
    animation_frame="base_temperature",    
    opacity=0.7,
    marginal_x="violin",
    marginal_y="violin",
    hover_name="building_id",
    category_orders=category_orders,
    color_discrete_map=color_discrete_map_meter,
)
fig.show()

It is displayed well:

newplot

When I play the animation or I change the frame, the subplots disappear:

Captura de pantalla de 2019-11-13 07-19-14

If I double click on the subplots, they reappear. When I export the image, the subplots are drawed.

You can see this behaviour in: https://www.kaggle.com/juanmah/ashrae-degree-hours

Plot.ly version : '4.2.1'

@jeslinmx
Copy link

+1 I am able to reproduce this error in plotly 5.5.0, using renderer "browser".

Before moving animation slider:

image

After moving:

image

Looking at fig.frames, I can see that all the marginal plots exist in the Figure object (5 * 24 = 120 box plots, and 120 histograms:

image

image

So this maybe an issue with the renderer. Indeed, when I check the javascript console, there are some warnings logged which may provide a hint:

127.0.0.1-1641876947892.log

The first two were logged upon moving the slider, and the next two were logged upon the resize event which triggered when I opened the console. Serendipitously, the resize also caused the missing marginal plots to reappear.

image

I'm not too sure if this issue should be reported to the plotly.js repo instead, as I don't have a deep enough understanding of plotly to tell if the problem lies in rendering or in plotly-express generating a graph object which violates some known expectations.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants