Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ipython : get access to current figure()

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 ?

like image 997
sten Avatar asked Jul 16 '16 21:07

sten


People also ask

How do you get the current figure in Python?

To get the current figure number in Python's Matplotlib, we can use plt. gcf(). number.

What does PLT show () do?

plt. show() starts an event loop, looks for all currently active figure objects, and opens one or more interactive windows that display your figure or figures. The plt. show() command does a lot under the hood, as it must interact with your system's interactive graphical backend.

What is RcParams?

rcParams is a matplotlib. RcParams object, it is a dictionary-like variable which store some rc settings in matplotlib.


1 Answers

plt.gcf() to get current figure

plt.gca() to get current axis

like image 76
runDOSrun Avatar answered Sep 25 '22 02:09

runDOSrun