Issue
When I create an inline image in Ipython Notebook, it displays the image just fine. However, when I hover over the image, I cannot see the pixel values, that normally show up on the bottom right corner. How do I fix that? Thanks. (Below is some sample code).
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from IPython import display
%matplotlib inline
fig, ax = plt.subplots(nrows = 1, ncols = 1, figsize=(10, 10))
for ii in xrange(10):
im = np.random.randn(100,100)
ax.cla()
ax.imshow(im, interpolation='None')
ax.set_title(ii)
plt.show()
Solution
To see the coordinates when you hover over the plot you must NOT use inline backend for the plots. So remove the %matplotlib inline
line and restart IPython with some other backend.
You could use some other backend (it depends on what is available in your installation)
%matplotlib gtk
or%matplotlib qt
.
Here is an exhaustive list of supported backends. You may want to use those that are interactive instead of inline.
Answered By - user6764549
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.