I created a function that creates a plot, basically the function looks like this:
def draw_line(array): fig, ax = plt.subplots() ax.plot(array) I wanted to know if there is a way to call this function when wanting to do multiple plots in a figure. In particular, I wanted to do something like:
fig, axes = plt.subplots(nrows=2, ncols=3) for i in list: axes[i] = draw_line(*list[i]) However, what I get is an empty grid with the actual plots below.

