---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-3d47e557e182> in <module>()
----> 1 tools.prettyplotdf(pd.DataFrame(X), 'Curtis', 'Nicasia', 'hello world', s=100)
E:\Dropbox (MIT)\cgn\cgntools\tools.py in prettyplotdf(df, title, xlabel, ylabel, kind, figsize, legend, linewidth, c, s, cmap)
378 x will be first column, y will be next column
379 '''
--> 380 ax = df.plot(x = df.columns[0], y = df.columns[1], kind = kind, figsize = figsize, legend = legend, linewidth = linewidth, c = c, title = title, s = s, cmap=cmap)
381 ax.set_xlabel(xlabel)
382 ax.set_ylabel(ylabel)
C:\Anaconda2\lib\site-packages\pandas\tools\plotting.pyc in __call__(self, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, secondary_y, sort_columns, **kwds)
3669 fontsize=fontsize, colormap=colormap, table=table,
3670 yerr=yerr, xerr=xerr, secondary_y=secondary_y,
-> 3671 sort_columns=sort_columns, **kwds)
3672 __call__.__doc__ = plot_frame.__doc__
3673
C:\Anaconda2\lib\site-packages\pandas\tools\plotting.pyc in plot_frame(data, x, y, kind, ax, subplots, sharex, sharey, layout, figsize, use_index, title, grid, legend, style, logx, logy, loglog, xticks, yticks, xlim, ylim, rot, fontsize, colormap, table, yerr, xerr, secondary_y, sort_columns, **kwds)
2554 yerr=yerr, xerr=xerr,
2555 secondary_y=secondary_y, sort_columns=sort_columns,
-> 2556 **kwds)
2557
2558
C:\Anaconda2\lib\site-packages\pandas\tools\plotting.pyc in _plot(data, x, y, subplots, ax, kind, **kwds)
2382 plot_obj = klass(data, subplots=subplots, ax=ax, kind=kind, **kwds)
2383
-> 2384 plot_obj.generate()
2385 plot_obj.draw()
2386 return plot_obj.result
C:\Anaconda2\lib\site-packages\pandas\tools\plotting.pyc in generate(self)
985 self._compute_plot_data()
986 self._setup_subplots()
--> 987 self._make_plot()
988 self._add_table()
989 self._make_legend()
C:\Anaconda2\lib\site-packages\pandas\tools\plotting.pyc in _make_plot(self)
1563 if self.mpl_ge_1_3_1():
1564 kws['label'] = c if c_is_column else ''
-> 1565 self.fig.colorbar(img, **kws)
1566
1567 if label is not None:
C:\Anaconda2\lib\site-packages\matplotlib\figure.pyc in colorbar(self, mappable, cax, ax, use_gridspec, **kw)
1567 cax, kw = cbar.make_axes(ax, **kw)
1568 cax.hold(True)
-> 1569 cb = cbar.colorbar_factory(cax, mappable, **kw)
1570
1571 self.sca(current_ax)
C:\Anaconda2\lib\site-packages\matplotlib\colorbar.pyc in colorbar_factory(cax, mappable, **kwargs)
1328 cb = ColorbarPatch(cax, mappable, **kwargs)
1329 else:
-> 1330 cb = Colorbar(cax, mappable, **kwargs)
1331
1332 cid = mappable.callbacksSM.connect('changed', cb.on_mappable_changed)
C:\Anaconda2\lib\site-packages\matplotlib\colorbar.pyc in __init__(self, ax, mappable, **kw)
878 # Ensure the given mappable's norm has appropriate vmin and vmax set
879 # even if mappable.draw has not yet been called.
--> 880 mappable.autoscale_None()
881
882 self.mappable = mappable
C:\Anaconda2\lib\site-packages\matplotlib\cm.pyc in autoscale_None(self)
331 """
332 if self._A is None:
--> 333 raise TypeError('You must first set_array for mappable')
334 self.norm.autoscale_None(self._A)
335 self.changed()
TypeError: You must first set_array for mappable