matplotlib.pyplot.grid — Matplotlib 3.5.1 documentation
matplotlib.org › matplotlibmatplotlib.pyplot.grid(b=None, which='major', axis='both', **kwargs) [source] ¶. Configure the grid lines. Parameters: bbool or None, optional. Whether to show the grid lines. If any kwargs are supplied, it is assumed you want the grid on and b will be set to True. If b is None and there are no kwargs, this toggles the visibility of the lines.