Answers for "how to plot the different size in python"

2

matplotlib multiple plots with different size

import numpy as np
import matplotlib.pyplot as plt 

# generate some data
x = np.arange(0, 10, 0.2)
y = np.sin(x)

# plot it
f, (a0, a1) = plt.subplots(1, 2, gridspec_kw={'width_ratios': [3, 1]})
a0.plot(x, y)
a1.plot(y, x)

f.tight_layout()
f.savefig('grid_figure.pdf')
Posted by: Guest on March-26-2020
3

change plot size matplotlib python

plt.figure(figsize=(14,7))
Posted by: Guest on June-21-2020

Code answers related to "how to plot the different size in python"

Python Answers by Framework

Browse Popular Code Answers by Language