Answers for "plt.figure change size"

18

plt figsize

plt.figure(figsize=(20,10))
Posted by: Guest on March-31-2020
0

plt.figure resize

import matplotlib.pyplot as plt
import numpy as np

f = plt.figure(figsize=(10,3))
ax = f.add_subplot(121)
ax2 = f.add_subplot(122)
x = np.linspace(0,4,1000)
ax.plot(x, np.sin(x))
ax2.plot(x, np.cos(x), 'r:')
Posted by: Guest on July-07-2021

Python Answers by Framework

Browse Popular Code Answers by Language