I try to display 3 figures only one window.
So I have a function make_graph(x) that make a figure of 2 subplots:
%matplotlib
import matplotlib.pyplot as plt
import numpy as np
def make_graph(x):
fig = plt.figure()
ax = fig.add_subplot(2,1,1)
ax.scatter(x, [x ** 2], s = 50, color = 'blue')
ax = fig.add_subplot(2,1,2)
ax.scatter(x, [x ** 3], s = 50, color = 'red')
make_graph(np.arange(10)) #figure_1
make_graph(np.arange(20)) #figure_2
make_graph(np.arange(30)) #figure_3
I want to display this 3 figures in a only one window, but actually, I have 3 windows opening. I don't know how to code this.
Could you help?