Answers for "matplotlib window size"

18

plt figsize

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

matplotlib set size

plt.figure(figsize=(20,8))
Posted by: Guest on April-02-2020
0

matplotlib window size

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(0, 10, 0.1)
y = np.sin(x)

plt.plot(x, y)
plt.show()
Posted by: Guest on November-11-2021
0

matplotlib window size

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(0, 10, 0.1)
y = np.sin(x)
z = np.cos(x)

fig = plt.figure(figsize=(8, 6))

# Adds subplot on position 1
ax = fig.add_subplot(121)
# Adds subplot on position 2
ax2 = fig.add_subplot(122)

ax.plot(x, y)
ax2.plot(x, z)
plt.show()
Posted by: Guest on November-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language