-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathutls.py
More file actions
26 lines (23 loc) · 953 Bytes
/
utls.py
File metadata and controls
26 lines (23 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import matplotlib.pyplot as plt
def set_axis_off():
"""
Set the default matplotlib settings to turn off axes and ticks.
This function modifies the global matplotlib configuration to hide axes and ticks
for all plots created after this function is called.
"""
# set axis off by default
plt.rcParams["axes.axisbelow"] = False
plt.rcParams["axes.axisbelow"] = False
plt.rcParams["axes.spines.left"] = False
plt.rcParams["axes.spines.right"] = False
plt.rcParams["axes.spines.top"] = False
plt.rcParams["axes.spines.bottom"] = False
# set tick params off by default
plt.rcParams["xtick.bottom"] = False
plt.rcParams["xtick.top"] = False
plt.rcParams["xtick.labelbottom"] = False
plt.rcParams["xtick.labeltop"] = False
plt.rcParams["ytick.left"] = False
plt.rcParams["ytick.right"] = False
plt.rcParams["ytick.labelleft"] = False
plt.rcParams["ytick.labelright"] = False