Dear All,
The current python code with plotly in the google colab results in Picture A.
What I want is Picture B (the frame as the x-axis and y-axis are black lines).
Here is the current code:
# x and y given as array_like objects
import plotly.express as px
df = df_final
df["Optimality"] = df["Optimality"].astype(str)
fig = px.scatter(df, x="P2", y="C2", color = "Optimality", width=800, height=800, color_discrete_sequence=["white", "green"], category_orders={"Optimality": ["0", "1"]})
fig.update_layout(
title={
'text': r'$\textit{Backward(0) Sequence}$', # Use LaTeX formatting for title
'y':0.95, # Adjust the y position of the title
'x':0.5, # Center the title horizontally
'xanchor': 'center',
'yanchor': 'top',
'font': dict(family='Times New Roman',size=30, color="Black") # Set the font size of the title
},
xaxis=dict(title=dict(text="Optimality", font=dict(family="Times New Roman", size=30))), # Set the font size of the x-axis label
xaxis_title=r'$p_2$', # Use LaTeX formatting for x-axis title
yaxis_title=r'$c_2$',
font=dict(family="Times New Roman", size=20, color="Black"),
legend=dict(itemsizing="constant", font=dict(size=20),title=dict(text='Optimality', font=dict(family='Times New Roman', size=18))))
fig.show()
What should I do? Thank you.