EasyPlotLib 0.2.1__tar.gz → 0.2.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.
Files changed (33) hide show
  1. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/figsizes_set.py +4 -1
  2. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib.egg-info/PKG-INFO +1 -1
  3. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib.egg-info/SOURCES.txt +2 -1
  4. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/PKG-INFO +1 -1
  5. easyplotlib-0.2.2/tests/test_subplot_labels.py +28 -0
  6. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/__init__.py +0 -0
  7. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/cartopy_helper.py +0 -0
  8. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/export.py +0 -0
  9. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreadventor-bold.ttf +0 -0
  10. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreadventor-bolditalic.ttf +0 -0
  11. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreadventor-italic.ttf +0 -0
  12. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreadventor-regular.ttf +0 -0
  13. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyrechorus-mediumitalic.ttf +0 -0
  14. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyrecursor-bold.ttf +0 -0
  15. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyrecursor-bolditalic.ttf +0 -0
  16. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyrecursor-italic.ttf +0 -0
  17. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyrecursor-regular.ttf +0 -0
  18. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreheros-bold.ttf +0 -0
  19. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreheros-bolditalic.ttf +0 -0
  20. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreheros-italic.ttf +0 -0
  21. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreheros-regular.ttf +0 -0
  22. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreschola-bold.ttf +0 -0
  23. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreschola-bolditalic.ttf +0 -0
  24. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreschola-italic.ttf +0 -0
  25. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/fonts/texgyreschola-regular.ttf +0 -0
  26. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/helpers.py +0 -0
  27. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/palettes.py +0 -0
  28. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib/styles/nature.mplstyle +0 -0
  29. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib.egg-info/dependency_links.txt +0 -0
  30. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/EasyPlotLib.egg-info/top_level.txt +0 -0
  31. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/README.md +0 -0
  32. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/setup.cfg +0 -0
  33. {easyplotlib-0.2.1 → easyplotlib-0.2.2}/setup.py +0 -0
@@ -87,7 +87,10 @@ def subplot_labels(
87
87
  xycoords: str = "axes fraction",
88
88
  xytext: Tuple[float, float] = (+0.5, +1),
89
89
  textcoords: str = "offset fontsize",
90
- fontsize: Union[str, int] = "medium",
90
+ # Journals (Nature/Science/Cell) set panel letters a, b, c to 8 pt bold —
91
+ # the one figure element allowed to exceed the 5-7 pt body text. Default to
92
+ # 8 pt rather than "medium" (= body size), which made labels too small.
93
+ fontsize: Union[str, int] = 8,
91
94
  verticalalignment: str = "top",
92
95
  family: str = "sans-serif",
93
96
  weight: str = "bold",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: EasyPlotLib
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A simple plotting library
5
5
  Home-page: https://github.com/yourusername/EasyPlotLib
6
6
  Author: HanYuyang
@@ -27,4 +27,5 @@ EasyPlotLib/fonts/texgyreschola-bold.ttf
27
27
  EasyPlotLib/fonts/texgyreschola-bolditalic.ttf
28
28
  EasyPlotLib/fonts/texgyreschola-italic.ttf
29
29
  EasyPlotLib/fonts/texgyreschola-regular.ttf
30
- EasyPlotLib/styles/nature.mplstyle
30
+ EasyPlotLib/styles/nature.mplstyle
31
+ tests/test_subplot_labels.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: EasyPlotLib
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A simple plotting library
5
5
  Home-page: https://github.com/yourusername/EasyPlotLib
6
6
  Author: HanYuyang
@@ -0,0 +1,28 @@
1
+ """Visual check that panel labels (a, b, c …) render at the 8 pt bold default."""
2
+
3
+ import os
4
+
5
+ import numpy as np
6
+ import matplotlib.pyplot as plt
7
+
8
+ import EasyPlotLib as epl
9
+
10
+ HERE = os.path.dirname(os.path.abspath(__file__))
11
+
12
+ epl.journal_style("nat2", palette="nature", nrows=2, ncols=2)
13
+
14
+ x = np.linspace(0, 10, 100)
15
+ fig, axs = plt.subplots(2, 2)
16
+ for n, ax in enumerate(axs.flatten()):
17
+ ax.plot(x, np.sin(x + n))
18
+ ax.set_xlabel("x axis (units)")
19
+ ax.set_ylabel("y axis (units)")
20
+ ax.annotate(**epl.subplot_labels(n, "a")) # 8 pt bold default
21
+
22
+ d = epl.subplot_labels(0, "a")
23
+ print("subplot_labels fontsize ->", d["fontsize"], "| weight ->", d["weight"])
24
+ print("base font.size (rc) ->", plt.rcParams["font.size"])
25
+
26
+ out = os.path.join(HERE, "test_subplot_labels.png")
27
+ fig.savefig(out, dpi=300)
28
+ print("saved", out)
File without changes
File without changes
File without changes