How can I reduce the separation/spacing between legend entries in Plotly? Making the legend font smaller only has so much impact. I want to do this because my real case has a lot of entries and I need to compact them.
Here is a Python Plotly Express example, but doubt the frontend language matters. Note the huge amount of space between "Female, No", "Female, Yes", etc. in the legend:
import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x="total_bill", y="tip", color="sex", symbol="smoker", facet_col="time",
labels={"sex": "Gender", "smoker": "Smokes"})
fig.update_layout(
legend=dict(
font=dict(
size=6,
),
)
)
fig.show()
