that’s my first post here !
Here’s the code I’m trying to get worked :
`
import plotly.graph_objects as go
from plotly.subplots import make_subplots
Prod=[450000, 500000, 420000,300000]
colors = [‘rgb(215,209,209)’,’rgb(170,170,170)’, ‘rgb(115,115,115)’,’rgb(67,67,67)’]
fig = make_subplots(rows=1, cols=2, column_widths=[0.85,0.15]
for i in range(4):
fig.add_trace(go.Scatter(x=[0,0,0,0],y=Prod, name=”Total Year”, marker=dict(
color=colors[i],
size=12)), row=1, col=2)
`
It only takes in consideration the last color of the colors list.
Can you help me please? I’ve seen some tutorial but it happens that the used trick is often too apply colors from a column of a dataframe which is not my case.
ps : As you can see, the plot is a simple vertical line, I did not see anywhere a dedicated plot.
Anthony Sieuw is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.