You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create an image, mapping data in the range 0->1.0 through the colormap
import matplotlib as mpl
cmap = mpl.cm.get_cmap('jet')
img_rgba = cmap(dt, bytes=True)
The shape of the array is (2687,2456,4), then I scale the RGB values so that the array is then reduced to (2687,2456,3)
then:
fig = plt.figure(figsize(fw,fh)
ax1 - fig.add_axes([0.0,0.0,1. 0.95])
cax modest_image.imshow(ax1, img_rgba, interpolation=imode, vmin=0, vmax=255, cmap=cmap)
but at the end, when I call plt.show()
I get this error:
/Users/cw/anaconda3/lib/python3.5/site-packages/matplotlib/image.py:328: RuntimeWarning: divide by zero encountered in double_scalars
in_bbox.height / A.shape[0])
Floating point exception: 8
What could be the problem?
The text was updated successfully, but these errors were encountered:
The previous version of modest image, worked in my progam however nearest-neighbor interpolation (subsampling) was not working correctly while the matplotlib imshow was working correctly, just excruciatingly slow. The test program in the new modest_image package appears to work correctly. I tried using the updated modest_image on both python2 and 3.
I create an image, mapping data in the range 0->1.0 through the colormap
import matplotlib as mpl
cmap = mpl.cm.get_cmap('jet')
img_rgba = cmap(dt, bytes=True)
The shape of the array is (2687,2456,4), then I scale the RGB values so that the array is then reduced to (2687,2456,3)
then:
fig = plt.figure(figsize(fw,fh)
ax1 - fig.add_axes([0.0,0.0,1. 0.95])
cax modest_image.imshow(ax1, img_rgba, interpolation=imode, vmin=0, vmax=255, cmap=cmap)
but at the end, when I call plt.show()
I get this error:
/Users/cw/anaconda3/lib/python3.5/site-packages/matplotlib/image.py:328: RuntimeWarning: divide by zero encountered in double_scalars
in_bbox.height / A.shape[0])
Floating point exception: 8
What could be the problem?
The text was updated successfully, but these errors were encountered: