EasyPlotLib 0.0.1__tar.gz → 0.0.2__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.
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: EasyPlotLib
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A simple plotting library
5
5
  Home-page: https://github.com/yourusername/EasyPlotLib
6
6
  Author: HanYuyang
@@ -3,7 +3,6 @@ setup.py
3
3
  EasyPlotLib/__init__.py
4
4
  EasyPlotLib/cartopy_helper.py
5
5
  EasyPlotLib/figsizes_set.py
6
- EasyPlotLib/font_helper.py
7
6
  EasyPlotLib.egg-info/PKG-INFO
8
7
  EasyPlotLib.egg-info/SOURCES.txt
9
8
  EasyPlotLib.egg-info/dependency_links.txt
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: EasyPlotLib
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: A simple plotting library
5
5
  Home-page: https://github.com/yourusername/EasyPlotLib
6
6
  Author: HanYuyang
@@ -1,7 +0,0 @@
1
- from .figsizes_set import figsizes
2
- import scienceplots
3
- from .figsizes_set import subplot_labels
4
- from .cartopy_helper import cartopy_plot_tickmarks
5
- from .font_helper import set_custom_fonts
6
-
7
- set_custom_fonts()
@@ -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