0

I am using the code from a course to display a function with some parameters m, s and logN as interactive sliders. However, while they show on other machines, they don't on mine (MacMini m1) and I have no idea why, but given that I had lots of problems installing ipywidgets, I think it is more software-related.

enter image description here

Essentially, I can only not see the three sliders, but the plot looks the same.

This is the code:

def f1(m,s,logN):

    #mu, sigma, N = 0.5, 0.25, 10000 # mean and standard deviation

    x = np.random.normal(m, s, 10**logN)

    g=sns.distplot(x, hist_kws=dict(cumulative=True),
         kde_kws=dict(cumulative=True))   
    g.set(xlim=(-15,25))
    plt.show()

    np.mean(x), np.sqrt(np.var(x))

interactive_plot = interactive(f1, m=(0.0, 10, 1), s=(1,10.0,1), 
logN=(1,5,1))
output = interactive_plot.children[-1]
output.layout.width = '600px'

interactive_plot
Giacomo
  • 344
  • 3
  • 11
Vlad Ispas
  • 11
  • 2

1 Answers1

0

I found an answer in a related question (full credit to this post). Essentially run conda install -c conda-forge ipywidgets as an admin and the extension will de install and get validated.

gogognome
  • 727
  • 8
  • 24
Vlad Ispas
  • 11
  • 2