Matplotlib

Completed

In PyCharm Pro i tried to plot simple thing. 

 

import numpy as np
import matplotlib.pyplot as plt

x = np.array([1,2,3])
y = np.array([1,2,3])

plt.plot(x,y)

plt.show()

The problem is that plot doesnt show. I tried

import matplotlib
matplotlib.use('TkAgg')

It shows blank white window 'Figure 1' and doesnt work. I install matplotlib and numpy with pip. I ve got installed anaconda environment.

The code broke up after plt.show() with Process finished with exit code -1073741819 (0xC0000005). I can take plot into variable and it looks like everything is fine by that. But after plt.show() code stops. 

My laptop ASUS works in win10 and i think that it is problem with win but i dont know how to manage this.  

0
2 comments

Could you please check if it works from the terminal outside of the IDE, using the same interpreter?

0

Actually i reinstall all stuff and with python 3.9 (i was using python 3.10) everthing is fine. So i think that post can be close. Thanks for help :) 

0

Please sign in to leave a comment.