Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a4d715

Browse files
committed
Dedupe seaborn styles.
1 parent 47d2d92 commit 6a4d715

12 files changed

+105
-151
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"figure.facecolor": "white",
3+
"text.color": "0.15",
4+
"axes.labelcolor": "0.15",
5+
"legend.frameon": False,
6+
"legend.numpoints": 1,
7+
"legend.scatterpoints": 1,
8+
"xtick.direction": "out",
9+
"ytick.direction": "out",
10+
"xtick.color": "0.15",
11+
"ytick.color": "0.15",
12+
"axes.axisbelow": True,
13+
"image.cmap": "Greys",
14+
"font.family": "sans-serif",
15+
"font.sans-serif": [
16+
"Arial", "Liberation Sans", "DejaVu Sans", "Bitstream Vera Sans",
17+
"sans-serif",
18+
],
19+
"grid.linestyle": "-",
20+
"lines.solid_capstyle": "round"
21+
}

lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-dark.mplstyle

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import ast
2+
from pathlib import Path
3+
4+
5+
__mpl_style__ = {
6+
**ast.literal_eval(Path(__file__).with_name("_seaborn-v0_8-common.py").read_text()),
7+
"axes.grid": False,
8+
"axes.facecolor": "#EAEAF2",
9+
"axes.edgecolor": "white",
10+
"axes.linewidth": 0,
11+
"grid.color": "white",
12+
"xtick.major.size": 0,
13+
"ytick.major.size": 0,
14+
"xtick.minor.size": 0,
15+
"ytick.minor.size": 0,
16+
}

lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-darkgrid.mplstyle

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import ast
2+
from pathlib import Path
3+
4+
5+
__mpl_style__ = {
6+
**ast.literal_eval(Path(__file__).with_name("_seaborn-v0_8-common.py").read_text()),
7+
"axes.grid": True,
8+
"axes.facecolor": "#EAEAF2",
9+
"axes.edgecolor": "white",
10+
"axes.linewidth": 0,
11+
"grid.color": "white",
12+
"xtick.major.size": 0,
13+
"ytick.major.size": 0,
14+
"xtick.minor.size": 0,
15+
"ytick.minor.size": 0,
16+
}

lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-ticks.mplstyle

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import ast
2+
from pathlib import Path
3+
4+
5+
__mpl_style__ = {
6+
**ast.literal_eval(Path(__file__).with_name("_seaborn-v0_8-common.py").read_text()),
7+
"axes.grid": False,
8+
"axes.facecolor": "white",
9+
"axes.edgecolor": ".15",
10+
"axes.linewidth": 1.25,
11+
"grid.color": ".8",
12+
"xtick.major.size": 6,
13+
"ytick.major.size": 6,
14+
"xtick.minor.size": 3,
15+
"ytick.minor.size": 3,
16+
}

lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-white.mplstyle

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
import ast
3+
from pathlib import Path
4+
5+
6+
__mpl_style__ = {
7+
**ast.literal_eval(Path(__file__).with_name("_seaborn-v0_8-common.py").read_text()),
8+
"axes.grid": False,
9+
"axes.facecolor": "white",
10+
"axes.edgecolor": ".15",
11+
"axes.linewidth": 1.25,
12+
"grid.color": ".8",
13+
"xtick.major.size": 0,
14+
"ytick.major.size": 0,
15+
"xtick.minor.size": 0,
16+
"ytick.minor.size": 0,
17+
}

lib/matplotlib/mpl-data/stylelib/seaborn-v0_8-whitegrid.mplstyle

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import ast
2+
from pathlib import Path
3+
4+
5+
__mpl_style__ = {
6+
**ast.literal_eval(Path(__file__).with_name("_seaborn-v0_8-common.py").read_text()),
7+
"axes.grid": True,
8+
"axes.facecolor": "white",
9+
"axes.edgecolor": ".8",
10+
"axes.linewidth": 1,
11+
"grid.color": ".8",
12+
"xtick.major.size": 0,
13+
"ytick.major.size": 0,
14+
"xtick.minor.size": 0,
15+
"ytick.minor.size": 0,
16+
}

lib/matplotlib/style/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,14 @@ def _read_pystyle_base_directory():
223223
used internally to load files provided by Matplotlib itself, not
224224
user-provided style files.
225225
226-
A Python style is a Python module that exports a dict named
226+
A Python style is a non-private Python module that exports a dict named
227227
``__mpl_style__``, from which a `RcParams` is constructed. This convention
228228
may be revisited if this feature ever becomes public.
229229
"""
230230
styles = {}
231231
for path in Path(BASE_LIBRARY_PATH).glob("*.py"):
232+
if path.name.startswith("_"):
233+
continue
232234
spec = importlib.util.spec_from_file_location(path.stem, path)
233235
module = importlib.util.module_from_spec(spec)
234236
spec.loader.exec_module(module)

0 commit comments

Comments
 (0)