BioLizardStylePython 2.0.0__py3-none-any.whl → 2.0.1__py3-none-any.whl

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.
@@ -7,26 +7,39 @@ except ModuleNotFoundError:
7
7
 
8
8
  # clear matplotlib cache to make sure lato font is recognized
9
9
  import matplotlib as mpl
10
- import os, glob
11
- for f in glob.glob(mpl.get_cachedir() + '/*'):
12
- os.remove(f)
10
+ # import os
11
+ # import glob
12
+ # import warnings
13
13
 
14
+ # for f in glob.glob(mpl.get_cachedir() + '/*'):
15
+ # try:
16
+ # os.remove(f)
17
+ # except PermissionError:
18
+ # warnings.warn(f"Permission denied: {f}", UserWarning)
19
+
20
+
21
+ # # # check if lato font installed and install if needed
22
+ # from matplotlib import font_manager
23
+ # fonts = font_manager.fontManager.ttflist
24
+ # font_names = [font.name for font in fonts if 'lato' in font.name.lower()]
25
+ # font_names = set(font_names)
26
+
27
+
28
+ # if len(font_names) == 0:
29
+ # from fonts.ttf import Lato, LatoBold
30
+ # font_manager.fontManager.addfont(Lato) # adds a custom font from a file without installing it into the operating system
31
+ # font_manager.fontManager.addfont(LatoBold)
32
+ # prop = font_manager.FontProperties(fname=Lato)
33
+ # lato_localname = prop.get_name()
34
+ # else:
35
+ # lato_localname = font_names.pop() #pick first one, usually there should only be one.. (?)
14
36
 
15
- # # check if lato font installed and install if needed
16
37
  from matplotlib import font_manager
17
- fonts = font_manager.fontManager.ttflist
18
- font_names = [font.name for font in fonts if 'lato' in font.name.lower()]
19
- font_names = set(font_names)
20
-
21
-
22
- if len(font_names) == 0:
23
- from fonts.ttf import Lato, LatoBold
24
- font_manager.fontManager.addfont(Lato) # adds a custom font from a file without installing it into the operating system
25
- font_manager.fontManager.addfont(LatoBold)
26
- prop = font_manager.FontProperties(fname=Lato)
27
- lato_localname = prop.get_name()
28
- else:
29
- lato_localname = font_names.pop() #pick first one, usually there should only be one.. (?)
38
+ from fonts.ttf import Lato, LatoBold
39
+ font_manager.fontManager.addfont(Lato) # adds a custom font from a file without installing it into the operating system
40
+ font_manager.fontManager.addfont(LatoBold)
41
+ # prop = font_manager.FontProperties(fname=Lato)
42
+ # lato_localname = prop.get_name()
30
43
 
31
44
  from .utils import *
32
45
  from .plotly_template import *
@@ -1,6 +1,7 @@
1
1
  import plotly.graph_objects as go
2
2
  import plotly.io as pio
3
3
  import matplotlib.colors
4
+ from fonts.ttf import Lato, LatoBold
4
5
  from .utils import biolizard_qualitative_pal, biolizard_divergent_pal, l_viridis_pal, blz_blue, blz_green
5
6
 
6
7
  lizard_style_template = go.layout.Template()
@@ -16,7 +17,7 @@ lizard_style_template.layout = {
16
17
  'sequential': [matplotlib.colors.rgb2hex(l_viridis_pal(i)) for i in range(255)],
17
18
  'sequentialminus': [matplotlib.colors.rgb2hex(l_viridis_pal.reversed()(i)) for i in range(255)]},
18
19
  'colorway': biolizard_qualitative_pal.colors,
19
- 'font': {'family': 'Lato', 'size': 12},
20
+ 'font': {'family': Lato, 'size': 12},
20
21
  'geo': {'bgcolor': blz_blue,
21
22
  'oceancolor': blz_blue,
22
23
  'lakecolor': blz_blue,
@@ -113,7 +114,7 @@ lizard_style_template.layout = {
113
114
  'showline': True,
114
115
  'ticks': 'outside',
115
116
  'exponentformat': 'power'}},
116
- 'title': {'x': 0.05, 'font': {'family': 'Lato Black', 'size': 16, 'color': '#222222'}},
117
+ 'title': {'x': 0.05, 'font': {'family': LatoBold, 'size': 16, 'color': '#222222'}},
117
118
  'violinmode' : 'group',
118
119
  'waterfallmode': 'group',
119
120
  'xaxis': {'automargin': True,
@@ -125,7 +126,7 @@ lizard_style_template.layout = {
125
126
  'showgrid': False,
126
127
  'showline': True,
127
128
  'ticks': 'outside',
128
- 'title': {'standoff': 15, 'font': {'family': 'Lato', 'size': 14, 'color': '#222222'}},
129
+ 'title': {'standoff': 15, 'font': {'family': Lato, 'size': 14, 'color': '#222222'}},
129
130
  'zeroline': False,
130
131
  'zerolinecolor': '#808080',
131
132
  'exponentformat': 'power'},
@@ -138,7 +139,7 @@ lizard_style_template.layout = {
138
139
  'showgrid': False,
139
140
  'showline': True,
140
141
  'ticks': 'outside',
141
- 'title': {'standoff': 15, 'font': {'family': 'Lato', 'size': 14, 'color': '#222222'}},
142
+ 'title': {'standoff': 15, 'font': {'family': Lato, 'size': 14, 'color': '#222222'}},
142
143
  'zeroline': False,
143
144
  'zerolinecolor': '#808080',
144
145
  'exponentformat': 'power'},
@@ -37,8 +37,8 @@ def lizard_style(plotly=False):
37
37
  """
38
38
  style_path = os.path.join(os.path.dirname(__file__), 'lizard_style.mplstyle')
39
39
  plt.style.use(style_path)
40
- from BioLizardStylePython import lato_localname
41
- plt.rcParams['font.sans-serif'] = [lato_localname]
40
+ # from BioLizardStylePython import lato_localname
41
+ # plt.rcParams['font.sans-serif'] = [lato_localname]
42
42
 
43
43
  if plotly:
44
44
  import plotly.io as pio
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BioLizardStylePython
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Enhance plots with the signature Biolizard aesthetic for matplotlib and seaborn.
5
5
  Project-URL: Homepage, https://github.com/lizard-bio/nature-grade-visualization-playground/tree/main
6
6
  Author: Robbe Neirynck
@@ -17,6 +17,11 @@ Requires-Dist: fonts>=0.0.3
17
17
  Requires-Dist: matplotlib>=3.7.1
18
18
  Requires-Dist: pillow>=9.4.0
19
19
  Requires-Dist: plotly>=5.20.0
20
+ Requires-Dist: seaborn>=0.13.2
21
+ Requires-Dist: setuptools>=78.1.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: numpy>=2.2.4; extra == 'dev'
24
+ Requires-Dist: pytest>=8.3.5; extra == 'dev'
20
25
  Description-Content-Type: text/markdown
21
26
 
22
27
  # BioLizardStylePython
@@ -0,0 +1,11 @@
1
+ BioLizardStylePython/__init__.py,sha256=XNIFQV3wiUKKB4-R8lpUnFM1xqd-nhdmboAkffsyzOM,1607
2
+ BioLizardStylePython/l_viridis.py,sha256=U9DiNJcbFeiAkmlqP9I1y064T3EvH3shermCE2R6THU,12207
3
+ BioLizardStylePython/l_viridis1.py,sha256=MeZE3_QTleoo22eZ46z-VoAkCXCaRfELH7f8yGqqXFA,12210
4
+ BioLizardStylePython/lizard_style.mplstyle,sha256=qZXFa566wCG25vgwknDgf3y2LYAyF2hqHkwzogu0_wY,2439
5
+ BioLizardStylePython/plotly_template.py,sha256=dF69wOns0n_kkYPQC3UmYvOKPsT3Y5kwxunOEAuBnUA,12281
6
+ BioLizardStylePython/utils.py,sha256=_efCS9VYN8FkHkdDh8Hw2xMAj0dfKFNNm5qUBzvg6Mk,15273
7
+ BioLizardStylePython/logo/BiolizardLogo.png,sha256=DzWR2GMShARwLflS6KG7iXfULPRtLFvD1TbiNpKvuy0,18462
8
+ biolizardstylepython-2.0.1.dist-info/METADATA,sha256=VKWg9_Artw7Xni6wOioH-3YXHZUUUdK5LxVHmLdxn58,3851
9
+ biolizardstylepython-2.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ biolizardstylepython-2.0.1.dist-info/licenses/LICENSE,sha256=37SFUF7Rozb7qKppNSQ8fQbC2DYq9TSX0EqpvQ1iQLg,1071
11
+ biolizardstylepython-2.0.1.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- BioLizardStylePython/__init__.py,sha256=zqOVY7bE-WLniObj4NEGvzNBt8WYPQ0Vbql4Ic5XABo,1116
2
- BioLizardStylePython/l_viridis.py,sha256=U9DiNJcbFeiAkmlqP9I1y064T3EvH3shermCE2R6THU,12207
3
- BioLizardStylePython/l_viridis1.py,sha256=MeZE3_QTleoo22eZ46z-VoAkCXCaRfELH7f8yGqqXFA,12210
4
- BioLizardStylePython/lizard_style.mplstyle,sha256=qZXFa566wCG25vgwknDgf3y2LYAyF2hqHkwzogu0_wY,2439
5
- BioLizardStylePython/plotly_template.py,sha256=JbpOCuPcHYNRUd6QqTbAg-HB95-0LuhJiNifJlNPmgo,12254
6
- BioLizardStylePython/utils.py,sha256=5Zlsw_Bbh9GjoSzaGoHSS8rN6BZwWxYSNC1bMdHEWl4,15269
7
- BioLizardStylePython/logo/BiolizardLogo.png,sha256=DzWR2GMShARwLflS6KG7iXfULPRtLFvD1TbiNpKvuy0,18462
8
- biolizardstylepython-2.0.0.dist-info/METADATA,sha256=5O9zY0UehdL1_qwuFz5jPRuYJVRwFT9wCWLLR1cySwg,3677
9
- biolizardstylepython-2.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- biolizardstylepython-2.0.0.dist-info/licenses/LICENSE,sha256=37SFUF7Rozb7qKppNSQ8fQbC2DYq9TSX0EqpvQ1iQLg,1071
11
- biolizardstylepython-2.0.0.dist-info/RECORD,,