Iβm currently using google colab. And fig.add_vline seems to be not working.
fig = go.Figure()
plot_names = ['nan', 'Private', 'Funded Start-up', 'Other', 'Public', 'Early Start-up', 'NGO']
for types, names in zip_longest(unique_companies, plot_names):
try:
if types == 'Pvt Ltd':
fig.add_trace(go.Scatter(
y = company_type_cdi['{}'.format(types)].values,
x = company_type_cdi['{}'.format(types)].index,
mode = 'lines+markers',
marker_color = colors[0],
name = names
))
else:
fig.add_trace(go.Scatter(
y = company_type_cdi['{}'.format(types)].values,
x = company_type_cdi['{}'.format(types)].index,
mode = 'lines',
marker_color = 'gray',
name = names
))
except:
pass
fig.add_vline(x=0.86, line_width=3, line_dash="dash", line_color="yellow")
fig.update_traces(line_width = 0.5, marker_size = 3)
fig.update_yaxes(visible = False)
fig.update_layout(title = 'Company Type and City Development Index')
fig.show()
the error is :
AttributeError: βFigureβ object has no attribute βadd_vlineβ
Was it changed recently?