'Change color of y axis label in plotly
I draw a figure in plotly (python). To change the label color of y axis in the plot I used the code fig.update_yaxes(color='white') and fig.update_layout(font_color="white") but unfortunately both of them didn't work, what else can I do?
My code:
for index, i in enumerate(values):
fig_1.add_trace(go.Scatter(x=[today], y=[i], mode='markers', name=names[index], marker_symbol='star-triangle-up', marker_size=15))
fig_1.update_layout(
xaxis_title="",
)
fig_1.update_layout( height=450, width=700,xaxis_title="", plot_bgcolor='rgba(65, 104, 119, 0.8)', )
fig_1.update_layout(legend=dict(
yanchor="top",
y=0.99,
xanchor="left",
x=0.01,
)
)
fig_1.layout.yaxis.color = 'white'
fig_1.update_xaxes(color='white')
fig_1.update_yaxes(color='white')
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Phoenix |

