Я пытаюсь создать макет подграфика из 2 строк и 1 столбца, используя Gridspec в matplotlib, но продолжаю получать следующую ошибку:
Код: Выделить всё
ValueError: Number of rows must be a positive integer, not GridSpec(2, 1, height_ratios=[1, 3])[1:2, 0:1]
Код: Выделить всё
fig, ax = plt.subplots(figsize=(8, 6))
gs = gridspec.GridSpec(2, 1, height_ratios=[1, 3])