Hi there, I am plotting 2d categorical data as a px.scatter graph, and am using scattergap=0.75
to add some separation between overlapping data points, however this gap is only applied to the x-axis. Is there a way to add the separation in both x and y dimensions?
Example code:
import random
import plotly.express as px
x_categories = ['A', 'B', 'C', 'D', 'E']
y_categories = ['X', 'Y', 'Z']
plot_data = []
for i in range(30):
plot_data.append(dict(
x=random.sample(x_categories, 1)[0],
y=random.sample(y_categories, 1)[0],
i=str(i),
))
fig = px.scatter(plot_data, x='x', y='y', color='i')
fig.update_layout(scattermode='group', scattergap=0.75)