I have a script (not an IPython notebook) that produces a plot at the end (via a pandas DataFrame
). My problem is that such a plot is not showing.
Inspired by this I have tried
fig, ax = plt.subplots()
my_dataframe.plot(ax=ax)
ax.show()
which does not work. The only way I can show my plot is:
plt.figure()
my_dataframe.plot()
plt.show()
but this brings up also a empty figure that I don't want to have.
Did you try
fig, ax = plt.subplots()
my_dataframe.plot(ax=ax)
plt.show() # plt in place of ax
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With