Answers for "Matplotlib-Object oriented interface"

0

Matplotlib-Object oriented interface

ax = plt.axes()
ax.plot(x, np.sin(x))
ax.set(xlim=(0, 10), ylim=(-2, 2),
       xlabel='x', ylabel='sin(x)',
       title='A Simple Plot');
Posted by: Guest on June-16-2021
0

Matplotlib-Object oriented interface

plt.plot(x, np.sin(x), '-g', label='sin(x)')
plt.plot(x, np.cos(x), ':b', label='cos(x)')
plt.axis('equal')

plt.legend();
Posted by: Guest on June-16-2021

Code answers related to "Matplotlib-Object oriented interface"

Python Answers by Framework

Browse Popular Code Answers by Language