plt fail "could not open display" with %python

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

plt fail "could not open display" with %python

mengmeng.meng@mathartsys.com
hi,
  With zeppelin0.6.0, (matplotlib)plt fail with %python would fail: RuntimeError: could not open display.

If in place of %pyspark, it's OK. How to fix it?


code:
%pythoh
import matplotlib
import io
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3,4])
plt.ylabel('some')
show(plt)

Thanks,


Treble Meng