I'm looking for a way to set all markers in a Plotly Express scatter plot to the same size.
I want to specify that fixed size myself.
I know you can use a variable to set as size of the markers (with px.scatter(size='column_name')
, but then they get all different sizes. They all need to have the same size.
Here's my sample code:
import pandas as pd
import plotly.express as px
df = pd.DataFrame({
'colA': np.random.rand(10),
'colB': np.random.rand(10),
})
fig = px.scatter(
df,
x='colA',
y='colB',
)
size_max
value for the largest value in the size-column down to the smallest I suppose. My tests look like that ... – Esmeraldaesmerelda