-1

I'd like to plot bigger figure. As recommended in previous post I started with <fig = plt.figure(figsize=(20,10))> - nothing changed

Could you advise where I am wrong..this my first unsuccessful try This is second option - doesn't work

yankov.plamen
  • 25
  • 1
  • 5

1 Answers1

0

If you don't supply an existing Axes object using the ax= kwarg when you use df.plot, pandas will create a new figure, and plot on there, which is why it is ignoring your larger existing figure.

So, you could create and Axes object and pass that in when you use df.plot.

Instead of fig = plt.figure(figsize=(20, 10)), try using:

fig, ax = plt.subplots(figsize=(20, 10))

...

df.plot(x='date', y='GVA', legend=True, color='g', ax=ax)

...
tmdavison
  • 64,360
  • 12
  • 187
  • 165
  • I'll mark this as accepted - it didn't resolve the plot but I will continue reading as the first suggestion and will try variation of your advise as well. – yankov.plamen Aug 18 '21 at 14:37