In [10]:
%matplotlib inline
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt
import numpy as np
In [7]:
a = np.load('color_quantization/quantized_counts.npy')
In [11]:
plt.hist(a)
plt.show()
---------------------------------------------------------------------------
TclError Traceback (most recent call last)
<ipython-input-11-11892850dbc6> in <module>()
----> 1 plt.hist(a)
2 plt.show()
/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in hist(x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, hold, **kwargs)
2814 rwidth=None, log=False, color=None, label=None, stacked=False,
2815 hold=None, **kwargs):
-> 2816 ax = gca()
2817 # allow callers to override the hold state by passing hold=True|False
2818 washold = ax.ishold()
/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in gca(**kwargs)
801 """
802
--> 803 ax = gcf().gca(**kwargs)
804 return ax
805
/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in gcf()
448 return figManager.canvas.figure
449 else:
--> 450 return figure()
451
452 fignum_exists = _pylab_helpers.Gcf.has_fignum
/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in figure(num, figsize, dpi, facecolor, edgecolor, frameon, FigureClass, **kwargs)
421 frameon=frameon,
422 FigureClass=FigureClass,
--> 423 **kwargs)
424
425 if figLabel:
/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.pyc in new_figure_manager(num, *args, **kwargs)
77 FigureClass = kwargs.pop('FigureClass', Figure)
78 figure = FigureClass(*args, **kwargs)
---> 79 return new_figure_manager_given_figure(num, figure)
80
81
/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.pyc in new_figure_manager_given_figure(num, figure)
85 """
86 _focus = windowing.FocusManager()
---> 87 window = Tk.Tk()
88 window.withdraw()
89
/usr/lib/python2.7/lib-tk/Tkinter.pyc in __init__(self, screenName, baseName, className, useTk, sync, use)
1765 baseName = baseName + ext
1766 interactive = 0
-> 1767 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
1768 if useTk:
1769 self._loadtk()
TclError: no display name and no $DISPLAY environment variable
In [ ]:
Content source: MIT-6819-team/TF_colorization
Similar notebooks: