From the course: Python for Time Series Forecasting

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Customize default Plotly theme

Customize default Plotly theme - Python Tutorial

From the course: Python for Time Series Forecasting

Customize default Plotly theme

- [Instructor] Customizing the plots. You learn how to change properties such as the title, the size, the legend, and many others. Let's start first with the title and size. You can see that the plot is very wide and maybe we like to put the legends on the title. So how do we first add the title? If I have the plot here, we can simply use the title and use the inflation, for example. Now if we want to shorten the width and height, we can use the width to be 1000 and the height to be 500. Now to turn off the legends, we must save it into a variable. And from the variable, we can plot it here, but we will update the layout. And you showlegends equals False. We execute. And here we can see the plots without the legend. Now instead of having the default white theme, we could update it to be dark. To do so, we use the same plot as before. And here, we will put the templates to be plotly_dark. We execute, and then we get the dark theme on the plot. Now to automate the customization of the…

Contents