Add special tick to axis

I have a plotly figure with an xaxis that has an array of ticks of type datetime. Is it possible to have just one of those ticks with another colour?

Hi @ddavo, I don’t think there is a built in function for that but you could use html tags.

import plotly.graph_objects as go

fig = go.Figure(
    go.Scatter(
    x=[1 ,2, 3],
    y=[1 ,2, 3]
    )
)

fig.update_layout(
    xaxis={
        'tickmode': 'array', 
        'tickvals': [1, 2, 3],
        'ticktext': [
            'a',
            f"<span style='color:red'> b </span>",
            'c'
        ]
    }
)

creates:
newplot (4)
mrep ticks