How do I change the default symbol sequence in Plotly? I am trying with the following MWE
import plotly.express as px
import plotly.io as pio
import plotly.graph_objects as go
my_template = pio.templates['ggplot2'] # Copy this template.
# Now modify some specific settings of the template.
my_template.data.scatter = [
go.Scatter(
marker = dict(size=22),
symbol_sequence = ['circle', 'square', 'diamond', 'cross', 'x', 'star'],
)
]
pio.templates.default = my_template # Set my template as default.
fig = px.line(
data_frame = px.data.gapminder(),
x = "year",
y = "lifeExp",
color = "country",
symbol = "continent",
)
fig.show()
This raises the error
ValueError: Invalid property specified for object of type plotly.graph_objs.Scatter: 'symbol'
I have plotly.__version__ == 5.3.1.
I have also noticed that in this MWE the default marker size is not working for some reason, the value I insert is ignored.


