| Download
Jupyter notebook python_runge_kutta.ipynb
Project: tinker
Path: python_runge_kutta.ipynb
Views: 133Kernel: Python 3 (Anaconda)
In [1]:
In [2]:
In [3]:
In [4]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-4-db226518434a> in <module>()
16 cbar = mpl.colorbar.ColorbarBase(plt.gca(),cmap=cmap, norm=norm)
17 plt.show()
---> 18 plt.colorbar(cbar)
19 plt.show()
20 print(cols)
/projects/anaconda3/lib/python3.5/site-packages/matplotlib/pyplot.py in colorbar(mappable, cax, ax, **kw)
2260 ax = gca()
2261
-> 2262 ret = gcf().colorbar(mappable, cax = cax, ax=ax, **kw)
2263 return ret
2264 colorbar.__doc__ = matplotlib.colorbar.colorbar_doc
/projects/anaconda3/lib/python3.5/site-packages/matplotlib/figure.py in colorbar(self, mappable, cax, ax, use_gridspec, **kw)
1600 cax, kw = cbar.make_axes(ax, **kw)
1601 cax._hold = True
-> 1602 cb = cbar.colorbar_factory(cax, mappable, **kw)
1603
1604 self.sca(current_ax)
/projects/anaconda3/lib/python3.5/site-packages/matplotlib/colorbar.py in colorbar_factory(cax, mappable, **kwargs)
1345 cb = ColorbarPatch(cax, mappable, **kwargs)
1346 else:
-> 1347 cb = Colorbar(cax, mappable, **kwargs)
1348
1349 cid = mappable.callbacksSM.connect('changed', cb.on_mappable_changed)
/projects/anaconda3/lib/python3.5/site-packages/matplotlib/colorbar.py in __init__(self, ax, mappable, **kw)
899 # Ensure the given mappable's norm has appropriate vmin and vmax set
900 # even if mappable.draw has not yet been called.
--> 901 mappable.autoscale_None()
902
903 self.mappable = mappable
/projects/anaconda3/lib/python3.5/site-packages/matplotlib/cm.py in autoscale_None(self)
345 """
346 if self._A is None:
--> 347 raise TypeError('You must first set_array for mappable')
348 self.norm.autoscale_None(self._A)
349 self.changed()
TypeError: You must first set_array for mappable
In [0]:
In [0]:
In [0]: