Control over gridline appearance in boxplot? | styling a figure | corporate design

Many of us have to write reports or make presentations with visualizations. The challenge sometimes isn’t the underlying data or the visualization itself, but the corporate design. In my case, the corporate design of the organization is based on an excel template for diagrams, with all its disadvantages. My goal is to automate most of it with plotly and convince my academic organization to move to plotly to a certain extent. I simply love plotly and its capabilities!

Therefore I would like to share things I couldn’t find elsewhere and others also might search for in future. Or simply raise questions :slight_smile:

In a boxplot, is there a way to control that the gridlines (red in this example) so they are invisible on the boxplot itself?

Like the scatter points next to it, or any other typical barplot… like in this basic example. I myself couldn’t find a way…

df =

fig =, x="time", y="total_bill", points="all")

fig.update_yaxes(gridcolor='red', gridwidth=1,)

Would like to know whether there is a solution for this.

Thank you!

Hey @thanuja welcome to the forums.

Here some information concerning the gridline, zeroline and axis:

Thank you for your suggestion but this won’t hide the grid line within the box area.