You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some problems with the widget package. When we try to include a dropdown into a figure we only get the dropdown, but the values does not change. In the file attached/code below we have the code and output and hopefully you will be able to help :)
Hi Jeppe,
We have some problems with the widget package. When we try to include a dropdown into a figure we only get the dropdown, but the values does not change. In the file attached/code below we have the code and output and hopefully you will be able to help :)
Best regards
def Educ():
Creating a figure
fig = plt.figure()
Adding the size of our figure
ax = fig.add_subplot(1,1,1)
Defining our variables
income = status14_1['income_parents']
Shares_co = status14_1['shares completed']
Shares_ig = status14_1['shares undergoing']
Shares_no = status14_1['shares none']
Creating our curves
plt.scatter(Shares_co, income, label ='Completed')
plt.scatter(Shares_ig, income, label = 'Undergoing')
plt.scatter(Shares_no, income, label = 'None')
hej = widgets.Dropdown(
options=['Completed', 'Undergoing', 'None'],
value=('Undergoing'),
description='Education:',
disabled=False,
)
display(hej)
Naming axis, title, curves, and give us grids.
ax.set_ylabel('Income level')
ax.set_xlabel('Shares')
ax.set_title('Figure 4: Shares for each income level')
ax.legend()
ax.grid(True)
Printing our figure.
Educ()
Data-Issue.pdf
The text was updated successfully, but these errors were encountered: