Hello.
I have been working with a dataframe with some information gathered between the years 2000 up to 2016 and I want to show it in a scatter plot. I have successfully done that for the first year, but I would like to add buttons that allow me to select the year to be displayed. The dataframe is a .csv file loaded with Pandas containing the columns A, B, Radius and Year. This is how I am currently displaying it:
fig = px.scatter(df[(df.Year == 2000)], \
x='A', \
y='B', \
size='Radius', \
text='Radius', \
labels = {}
)
fig.show()
where px comes from import plotly.express as px
and df is a Dataframe object from Pandas.
Notice how I am only displaying information about the year 2000. How would I implement buttons that change the data being displayed on the graph to the data of a given year? In other words, how would I implement buttons that change the dataframe being shown?
Best regards,
Aaron.