0
votes

I'm trying to create a simple interactive plot with sliders and matplotlib in Jupyter, however, the icons are simply showing a blank square instead? Figure below:

Blank icons using notebook backend

Am I missing a dependency? I believe I'm using default settings for everything.

A simplified version of my code is shown below:

%matplotlib notebook
import matplotlib.pyplot as plt
from ipywidgets import FloatSlider, interact

fig = plt.figure(figsize=(10,3))
ax = fig.add_subplot(1, 1, 1)
ax.set_xlabel('time [s]')
ax.set_ylabel('displacement [cm]')
x1, = ax.plot(t,x)

def update(P_l = FloatSlider(min=0,max=4000,step=50,value=1500)):
    x1.set_ydata(x)

    fig.canvas.draw()

interact(update)

Thanks in advance!

1
I think this should only happen if jupyter notebook is not packaged correctly and does not include font-awesome for some reason. See e.g. here. - ImportanceOfBeingErnest
Thanks for you help. I'll have a look into this - strange how it's not installed by default - Robbie Sewell

1 Answers

0
votes

Jupyter Notebook tends to minimize heavy graphs and tables when it exceeds a specific size. Not sure about the accurate answer, But did you try double clicking the left edge of graph? It does the job in my windows PC.