Matplotlib.pyplot.gci() in Python Last Updated : 10 May, 2020 Comments Improve Suggest changes Like Article Like Report Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. matplotlib.pyplot.gci() method The gci() method in pyplot module of matplotlib library is used to get the current colorable artist. Syntax: matplotlib.pyplot.gci() Parameters: This method does not accept any parameters. Returns: This method returns the current colorable artist. Below examples illustrate the matplotlib.pyplot.gci() function in matplotlib.pyplot: Example 1: Python3 1== # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np import matplotlib.gridspec as gridspec from mpl_toolkits.axes_grid1 import make_axes_locatable plt.close('all') arr = np.arange(100).reshape((10, 10)) fig = plt.figure(figsize =(4, 4)) im = plt.imshow(arr, interpolation ="none", cmap ="plasma") divider = make_axes_locatable(plt.gca()) cax = divider.append_axes("left", "15 %", pad ="30 %") plt.colorbar(im, cax = cax) print("The current colorable artist is :") print(plt.gci()) fig.suptitle('matplotlib.pyplot.gci() function \ Example\n\n', fontweight ="bold") plt.show() Output: The current colorable artist is : AxesImage(50, 44;310x308) Example 2: Python3 1== # Implementation of matplotlib function import matplotlib.pyplot as plt from scipy import sin, cos fig, ax = plt.subplots(2, 1) x = [1, 2, 3, 4, 5, 6, 7, 8, 9] y1 = sin(x) y2 = cos(x) plt.sca(ax[0]) plt.plot(x, y1) plt.sca(ax[1]) plt.plot(x, y2) print("The current colorable artist is :") print(plt.gci()) fig.suptitle('matplotlib.pyplot.gci() function \ Example\n\n', fontweight ="bold") plt.show() Output: The current colorable artist is : None Comment More infoAdvertise with us Next Article Matplotlib.pyplot.gci() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Matplotlib Pyplot-class Practice Tags : python Similar Reads Matplotlib.pyplot.gca() in Python Matplotlib is a library in Python and it is a numerical - mathematical extension for the NumPy library. Pyplot is a state-based interface to a Matplotlib module that provides a MATLAB-like interface.  matplotlib.pyplot.gca() Function The gca() function in pyplot module of matplotlib library is used 2 min read Matplotlib.pyplot.gcf() in Python Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.pyplot.gcf() matplotlib.pyplot.gcf() is primarily used to get the current fi 2 min read Matplotlib.pyplot.grid() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.grid() Function The grid() function in pyplot module of matplotlib library is used to c 2 min read Matplotlib.pyplot.clim() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read Matplotlib.pyplot.csd() in Python csd() method in Matplotlib is used to compute and plot the Cross Spectral Density (CSD) of two signals. It helps analyze the frequency domain relationship between two time series, revealing how the power of one signal is distributed relative to the other signal across frequencies. It's key features 4 min read Matplotlib.pyplot.cla() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 1 min read Matplotlib.pyplot.ginput() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read Matplotlib.pyplot.gray() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. Matplotlib.pyplot.gray() Function The gray() function in pyplot module of matplotlib library is used to s 2 min read Matplotlib.pyplot.cool() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.cool() Function The cool() function in pyplot module of matplotlib library is used to s 2 min read Matplotlib.pyplot.flag() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.flag() Function The flag() function in pyplot module of matplotlib library is used to s 2 min read Like