Skip to content

Instantly share code, notes, and snippets.

@hbshrestha
Last active May 24, 2021 03:54
Show Gist options
  • Save hbshrestha/2ae530e19d06eb3367a4e23b52ed6f3e to your computer and use it in GitHub Desktop.
Save hbshrestha/2ae530e19d06eb3367a4e23b52ed6f3e to your computer and use it in GitHub Desktop.
fig.update_layout(
updatemenus=[
dict(
#Specify direction in which you want the dropdown menu to pop up
direction="down",
#(1.18,1) refers to the top right corner of the plot
x = 1.18,
y = 1,
#the list of buttons we created earlier
buttons = dropdowns)],
#so the x axis increments once per year
xaxis = dict(dtick=1,title="Clubs"),
yaxis=dict(title="Values"),
title="La Liga 2020/21 Statistics",
title_x=0.5,
titlefont=dict(size=20))
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment