ipython : get access to current figure()

sten picture sten · Jul 16, 2016 · Viewed 40.6k times · Source

I want to add more fine grained grid on a plotted graph. The problem is all of the examples require access to the axis object. I want to add specific grid to already plotted graph (from inside ipython).

How do I gain access to the current figure and axis in ipython ?

Answer

runDOSrun picture runDOSrun · Jul 18, 2016

plt.gcf() to get current figure

plt.gca() to get current axis