Plotly graph title and labels are off white color

253 Views Asked by At

I have generated the below plotly graph using the code as below :

x=['a','b','c','d']

y=['1','2','3','4']

df = pd.DataFrame({'x':x, 'y':y})

fig=df.iplot(kind= 'scatter', size =9,mode='markers+text',opacity=0.8, colors=['blue'], yTitle= 'Count',xTitle = 'x', asFigure=True)

fig.update_layout(height=300, width=500, title_text="Plot X on Y",barmode='stack',template='plotly_dark',  plot_bgcolor='rgb(17,17,17)',
    legend = dict(bgcolor = 'rgb(17,17,17)', orientation="h",yanchor="bottom", x=1,y=1.02, xanchor='right'), paper_bgcolor ='rgb(12,12,12)', xaxis = {'showgrid': False, 'zeroline':True}, yaxis = {'showgrid': False})

The graph is coming as below with the title, xaxis, yaxis label titles are all appearing in suppressed color. I want them to be in a sharp white color.

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

There are several themes you can try out. If you use 'solar', you will get the color you want. The source of the theme can be found here for your reference.

fig=df.iplot(kind= 'scatter', size =9,
             mode='markers+text',
             opacity=0.8,
             colors=['blue'],
             yTitle= 'Count',
             xTitle = 'x',
             asFigure=True,
             theme='solar')

enter image description here