Open twhoekstra opened 2 years ago
This code works
%serialconnect --port="/dev/tty.usbmodem14101"
import numpy as np
import matplotlib.pyplot as plt
xx = np.linspace(-5, 5, 50)
f1 = np.sin(xx)
f2 = np.log(xx)
print("Printing something useful...")
plt.plot(xx, f1, label='f_1 = sin(x)')
plt.plot(xx, f2, label='f_2 = log(x)')
print("Printing more useful stuff...")
plt.xlabel('x')
plt.ylabel('y')
plt.title("Two functions plotted")
plt.grid()
plt.legend()
Any mathtext addition breaks the kernel:
%serialconnect --port="/dev/tty.usbmodem14101"
import numpy as np
import matplotlib.pyplot as plt
xx = np.linspace(-5, 5, 50)
f1 = np.sin(xx)
f2 = np.log(xx)
print("Printing something useful...")
plt.plot(xx, f1, label='f_1 = sin(x)')
plt.plot(xx, f2, label='f_2 = log(x)')
print("Printing more useful stuff...")
plt.xlabel('x')
plt.ylabel('$y$')
plt.title("Two functions plotted")
plt.grid()
plt.legend()
Using
freetype
does not resolve the issue