Slider tick marks seem to disappear when I apply plotly_dark template

Hi, I am using the plotly_dark template and when I plot an animated graph with a background colour the tick marks seem to disappear even when I attempt to force them as in the code below. Is there something else I need to do in order to get the tick marks to show up?

fig['layout']['sliders'][0]['minorticklen'] = 2
fig['layout']['sliders'][0]['ticklen'] = 5
fig['layout']['sliders'][0]['tickcolor'] = 'grey'
fig['layout']['sliders'][0]['font']['color'] = 'grey'

@doogra

Remove template="plotly_dark", set in layout paper_bgcolor="black",
and

fig[‘layout’][‘sliders’][0][‘tickcolor’] = ‘rgb(230,230,230’ #or ‘rgb(235,235,235)’
fig[‘layout’][‘sliders’][0][‘font’][‘color’] = ‘rgb(230,230,230’

Worked! Thanks. Is there a good reference for instances like this where we need to dig around “under the hood” a bit more than standard configurations allow for?

@doogra
I don’t think that such a reference can be found among Plotly tutorials, that explicitly tells you how to fix such an issue. It’s the long experience with plotly plots (7 years) that helped me find a solution.

I recently wrote this doc, which should go some ways toward giving you a way to bootstrap your understanding of the depths of the figure structure :slight_smile: Introspecting Figures | Python | Plotly … it’s an extension of this more high-level guide: The Figure Data Structure | Python | Plotly

2 Likes

I should add that all the slider-related reference has been collected into its own page also: layout.sliders | Python | Plotly

1 Like

Hey @nicolaskruchten

The Introspecting Figures doc is fantastic. Was there an announcement when this came out?

Even if there was, it might be worth promoting it again and give it top billing. :star2:

I’m so glad you find it useful! It was announced when we released Plotly.py 4.10 I think… If you want to make a new post explaining how it’s useful for you, I think that would be fantastic :slight_smile: