Skip to content

Instantly share code, notes, and snippets.

@moyocoyani
Created December 3, 2020 11:45
Show Gist options
  • Save moyocoyani/510f815b5d5fabe115f3a64789e84990 to your computer and use it in GitHub Desktop.
Save moyocoyani/510f815b5d5fabe115f3a64789e84990 to your computer and use it in GitHub Desktop.
Configuration of axis lines and grids for matplotlib
import matplotlib as mpl
#Remove all axis
mpl.rcParams["axes.spines.bottom"] = True
mpl.rcParams["axes.spines.left"] = False
mpl.rcParams["axes.spines.right"] = False
mpl.rcParams["axes.spines.top"] = False
#Grid format
mpl.rcParams["axes.grid"] = True
mpl.rcParams['grid.linestyle'] = '--'
mpl.rcParams['grid.linewidth'] = 1
mpl.rcParams["axes.grid.axis"] = 'y'
mpl.rcParams["grid.color"] = "#404040"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment