Why are two graphs created? I would like that instead of being created two separate graphs, only one was created.
import matplotlib.pyplot as pl
x=1,2,3,4
y=3,6,1,9
pl.plot(x, y)
pl.figure(figsize=(7.5, 5), dpi=80)
pl.axis([0,29,0,21])
pl.xticks([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])
pl.yticks([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])
pl.xlabel("Giornate", fontweight="bold")
pl.ylabel("Ore", fontweight="bold")
pl.title("Febbraio 2019", fontsize=20, fontweight="bold")
pl.grid(b=True, color="gray")
pl.rcParams['axes.facecolor'] = "tan"
pl.show()
pl.figure(figsize=(7.5, 5), dpi=80)creates a new figure but you already called the plot command. Callpl.figurebefore you plot anything