EasyPlotLib 0.0.1__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- easyplotlib-0.0.3/EasyPlotLib/__init__.py +24 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/EasyPlotLib.egg-info/PKG-INFO +1 -1
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/EasyPlotLib.egg-info/SOURCES.txt +0 -1
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/PKG-INFO +1 -1
- easyplotlib-0.0.1/EasyPlotLib/__init__.py +0 -7
- easyplotlib-0.0.1/EasyPlotLib/font_helper.py +0 -19
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/EasyPlotLib/cartopy_helper.py +0 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/EasyPlotLib/figsizes_set.py +0 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/EasyPlotLib.egg-info/dependency_links.txt +0 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/EasyPlotLib.egg-info/top_level.txt +0 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/README.md +0 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/setup.cfg +0 -0
- {easyplotlib-0.0.1 → easyplotlib-0.0.3}/setup.py +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
import matplotlib.font_manager as fm
|
|
4
|
+
import matplotlib.pyplot as plt
|
|
5
|
+
|
|
6
|
+
from .cartopy_helper import cartopy_plot_tickmarks
|
|
7
|
+
from .figsizes_set import figsizes, subplot_labels
|
|
8
|
+
|
|
9
|
+
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
+
|
|
11
|
+
font_dir = os.path.join(current_dir, "font")
|
|
12
|
+
font_files = fm.findSystemFonts(fontpaths=[font_dir])
|
|
13
|
+
for font_file in font_files:
|
|
14
|
+
fm.fontManager.addfont(font_file)
|
|
15
|
+
|
|
16
|
+
# register all mplstyle
|
|
17
|
+
style_dir = os.path.join(current_dir, "styles")
|
|
18
|
+
stylesheets = {}
|
|
19
|
+
for root, dirs, files in os.walk(style_dir):
|
|
20
|
+
new_stylesheets = plt.style.core.read_style_directory(root)
|
|
21
|
+
stylesheets.update(new_stylesheets)
|
|
22
|
+
|
|
23
|
+
plt.style.core.update_nested_dict(plt.style.library, stylesheets)
|
|
24
|
+
plt.style.core.available[:] = sorted(plt.style.library.keys())
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
import matplotlib.font_manager as fm
|
|
3
|
-
from matplotlib import rcParamsDefault as _rc_matplotlib_native
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def set_custom_fonts():
|
|
7
|
-
font_dir = os.path.join(os.path.dirname(__file__), "font")
|
|
8
|
-
|
|
9
|
-
# Add font files to the font manager
|
|
10
|
-
for font_file in os.listdir(font_dir):
|
|
11
|
-
if font_file.endswith(".ttf"):
|
|
12
|
-
fm.fontManager.addfont(os.path.join(font_dir, font_file))
|
|
13
|
-
|
|
14
|
-
# Set custom fonts
|
|
15
|
-
_rc_matplotlib_native["font.sans-serif"] = "TeX Gyre Heros"
|
|
16
|
-
_rc_matplotlib_native["font.serif"] = "TeX Gyre Schola"
|
|
17
|
-
_rc_matplotlib_native["font.cursive"] = "TeX Gyre Chorus"
|
|
18
|
-
_rc_matplotlib_native["font.fantasy"] = "TeX Gyre Adventor"
|
|
19
|
-
_rc_matplotlib_native["font.monospace"] = "TeX Gyre Cursor"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|