HI,
the code :
import plotly.express as px
import pandas as pd
data = {'x': [1.5, 1.6, -1.2],
'y': [21, -16, 46],
'circle-size': [10, 5, 6],
'circle-color': ["red","red","green"],
'tttt': ["ggg","vvvv","rrrr"],
}
# Create DataFrame
df = pd.DataFrame(data)
fig = px.scatter(
df,
x="x",
y="y",
color="circle-color",
size='circle-size',
hover_name="tttt",
# text="tttt",
color_discrete_map={"red": "red", "green": "green"}
)
fig.update_layout(legend=dict(
orientation="h",
yanchor="bottom",
y=1.02,
xanchor="right",
x=0.39
))
# fig.add_shape(
# showlegend=True,
# type="circle",
# line=dict(
# color="gray",
# width=2,
# ),
# fillcolor="gray",
# x0=2,
# x1=4,
# y0=4.5,
# y1=5,
# )
fig
result :
now what Iβm trying to do is add an extra shape next to the menu above, and hereβs what I want to add :
is this possible please ?