__author__ = 'local' import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(111) x=[-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] y=[] for liczba in x: y+=[(np.cos(liczba)+3)/((liczba**2)+4)] fig.suptitle('Wykres funkcji', fontsize=14, fontweight='bold') ax.set_xlabel('oś x') ax.set_ylabel('oś y') plt.plot(x,y,'r') plt.show()