When using the simple_white theme in jupyter notebook, I found that the first appearance of xaixs linewidth is different from that of yaxis linewidth, but the later appearance of the graph will have the same linewidth. But when you rerun the exact same code, the lineweights of both axes are the same. I donโt know why this phenomenon occurs.
Similarly, even if I donโt use the simple_white theme but just set the linewidth, the same problem will occur.
The code is:
import plotly.express as px
df = px.data.gapminder()
df_2007 = df.query("year==2007")
for template in ["simple_white","simple_white"]:
fig = px.scatter(df_2007,
x="gdpPercap", y="lifeExp", size="pop", color="continent",
log_x=True, size_max=60,
template=template, title="Gapminder 2007: '%s' theme" % template)
fig.show()
First:
Second:
As shown in the picture, the x-axis and y-axis line widths of the first figure are different, while the second figure is the same, even though the code is identical.