3

If I plot with ipython, I automatically see the x/y coordinates when I move with the mouse over the canvas (see bottom right in screenshot):

import matplotlib.pyplot as plt
import numpy as np

my_random = np.random.random(5)
plt.plot(my_random)
plt.show()

How can the same achieved with Pycharm (my plots appear in the SciView toolwindow)?

If not: is there perhaps an easy workaround for it? (and do I have more possibilities if the plot does not appear in the SciView toolwindow?)

x/y coordinates depicted at bottom right

3
  • matplotlib.org/2.0.1/examples/widgets/cursor.html ?? Commented Jan 15, 2018 at 4:18
  • unfortunately, this does not seem to help Commented Jan 15, 2018 at 16:31
  • Not sure what the "SciView toolwindow" is, but probably it shows the plots as png images, which do not have any interactivity, so no coordinates can be shown. Commented Jan 15, 2018 at 20:39

1 Answer 1

1

using TkAgg it works:

import matplotlib   
matplotlib.use('TkAgg')
import numpy as np
import matplotlib.pyplot as plt

my_random = np.random.random(5)
plt.plot(my_random)
plt.show()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.