Created
March 2, 2022 09:56
-
-
Save techzeero/bedce551a689adeebfe3764c5677cdfa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.callback(Output(component_id='graph', component_property= 'figure'), | |
[Input(component_id='dropdown', component_property= 'value')]) | |
def graph_update(dropdown_value): | |
fig = px.scatter(df[df["species"]==dropdown_value], x="sepal_width", y="sepal_length") | |
fig.update_layout(title = 'Sapel Length and Width of Different Species', | |
xaxis_title = 'Sepal Width', | |
yaxis_title = 'Sepal Length') | |
return fig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment