In [1]:
import pylab as plt
from yoink.cmap_app import CmapExtractor
from mpl_toolkits.mplot3d import Axes3D

In [2]:
pix = plt.imread('/Users/terry10/Downloads/v1_gridfloat/obfuscated.png')
plt.imshow(pix)
plt.show()

In [3]:
thing = CmapExtractor(pix, 'test')
plt.show()


<class 'yoink.widgets.DragableColorLine'> draw
<class 'yoink.widgets.DragableColorLine'> draw
<class 'yoink.widgets.DragableColorLine'> draw
<class 'yoink.widgets.DragableColorLine'> draw
<class 'yoink.widgets.DragableColorLine'> draw
<class 'yoink.widgets.DragableColorLine'> draw
/Users/terry10/ana/envs/conda152/lib/python2.7/site-packages/matplotlib/image.py:628: UserWarning: The backend (matplotlib.backends.backend_macosx.RendererMac) does not support interpolation='none'. The image will be interpolated with 'nearest` mode.
  warnings.warn("The backend (%s) does not support interpolation='none'. The image will be interpolated with 'nearest` mode." % renderer.__class__)

In [4]:
data = thing.get_data()
print data.keys()


['y', 'x', 'rgb', 'z', 'l']

In [5]:
plt.pcolormesh(data['y'][::-1], data['x'][::-1], data['z'], cmap=plt.cm.gist_earth)
#plt.imshow(height, cmap=plt.cm.gist_earth)
plt.show()

In [6]:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
r, g, b, a = data['rgb'].T
ax.plot(r, g, b, 'ko-')
for x, y, z, a in data['rgb']:
    plt.plot([x], [y], [z], 'o', color=(x, y, z))
ax.set_xlabel('red')
ax.set_ylabel('green')
ax.set_zlabel('blue')
plt.show()

In [ ]:
s