frenchplotlib 0.5.0__py3-none-any.whl → 1.0.0__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.
- frenchplotlib/__init__.py +2 -6
- frenchplotlib/converter.py +0 -45
- {frenchplotlib-0.5.0.dist-info → frenchplotlib-1.0.0.dist-info}/METADATA +9 -9
- {frenchplotlib-0.5.0.dist-info → frenchplotlib-1.0.0.dist-info}/RECORD +7 -7
- /frenchplotlib/{baguetteplot.py → tapisseries.py} +0 -0
- {frenchplotlib-0.5.0.dist-info → frenchplotlib-1.0.0.dist-info}/WHEEL +0 -0
- {frenchplotlib-0.5.0.dist-info → frenchplotlib-1.0.0.dist-info}/top_level.txt +0 -0
frenchplotlib/__init__.py
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
__all__ = ['baguette', 'pain_de_mie', 'croissant', 'pain_au_chocolat', 'boule', 'brioche', 'bretzel', 'fougasse', 'pita', 'vin', 'fromage', 'eclair', 'macaron', 'camembert', 'madeleine', 'religieuse', 'escargot']"""
|
|
4
|
-
|
|
5
|
-
from . import baguetteplot
|
|
1
|
+
from . import tapisseries
|
|
6
2
|
from . import dorures
|
|
7
3
|
|
|
8
|
-
__all__ = ['
|
|
4
|
+
__all__ = ['tapisseries', 'dorures']
|
frenchplotlib/converter.py
CHANGED
|
@@ -78,48 +78,3 @@ if f'{name} = Path(' not in content:
|
|
|
78
78
|
if not content.endswith('\n'):
|
|
79
79
|
f.write('\n')
|
|
80
80
|
f.write(sample + '\n')
|
|
81
|
-
|
|
82
|
-
"""# ajouter dans __init__.py
|
|
83
|
-
init_path = os.path.join(current_dir, '__init__.py')
|
|
84
|
-
with open(init_path, 'r') as f:
|
|
85
|
-
content = f.read()
|
|
86
|
-
|
|
87
|
-
# Extraire tous les noms importés depuis breadplotlib
|
|
88
|
-
import_line_start = content.find('from .breadplotlib import')
|
|
89
|
-
if import_line_start != -1:
|
|
90
|
-
# Trouver la fin de toutes les lignes d'import
|
|
91
|
-
import_end = content.find('\n\n', import_line_start)
|
|
92
|
-
if import_end == -1:
|
|
93
|
-
import_end = content.find('__all__', import_line_start)
|
|
94
|
-
|
|
95
|
-
import_section = content[import_line_start:import_end]
|
|
96
|
-
|
|
97
|
-
# Extraire tous les noms importés
|
|
98
|
-
imported_names = []
|
|
99
|
-
for line in import_section.split('\n'):
|
|
100
|
-
if 'from .breadplotlib import' in line:
|
|
101
|
-
names = line.replace('from .breadplotlib import', '').strip()
|
|
102
|
-
imported_names.extend([n.strip() for n in names.split(',')])
|
|
103
|
-
|
|
104
|
-
# Ajouter le nouveau nom s'il n'existe pas
|
|
105
|
-
if name not in imported_names:
|
|
106
|
-
imported_names.append(name)
|
|
107
|
-
|
|
108
|
-
# Reconstruire la ligne d'import
|
|
109
|
-
new_import_line = f"from .breadplotlib import {', '.join(imported_names)}"
|
|
110
|
-
|
|
111
|
-
# Remplacer toute la section d'import par une seule ligne
|
|
112
|
-
new_content = content[:import_line_start] + new_import_line + '\n\n' + content[import_end:].lstrip('\n')
|
|
113
|
-
else:
|
|
114
|
-
# Si pas d'import existant, créer la première ligne
|
|
115
|
-
new_content = f"from .breadplotlib import {name}\n\n" + content
|
|
116
|
-
|
|
117
|
-
# Mettre à jour __all__
|
|
118
|
-
if f"'{name}'" not in new_content:
|
|
119
|
-
all_start = new_content.find("__all__ = [")
|
|
120
|
-
if all_start != -1:
|
|
121
|
-
all_end = new_content.find(']', all_start)
|
|
122
|
-
new_content = new_content[:all_end] + f", '{name}'" + new_content[all_end:]
|
|
123
|
-
|
|
124
|
-
with open(init_path, 'w') as f:
|
|
125
|
-
f.write(new_content)"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frenchplotlib
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: French-themed matplotlib markers and colormaps
|
|
5
5
|
Home-page: https://github.com/PhilZPhaZ/frenchplotlib
|
|
6
6
|
Author: philzphaz
|
|
@@ -42,7 +42,7 @@ pip install frenchplotlib
|
|
|
42
42
|
```python
|
|
43
43
|
import matplotlib.pyplot as plt
|
|
44
44
|
import numpy as np
|
|
45
|
-
from frenchplotlib import
|
|
45
|
+
from frenchplotlib import tapisseries
|
|
46
46
|
|
|
47
47
|
# Données d'exemple
|
|
48
48
|
x = np.linspace(-1, 1, 20)
|
|
@@ -50,7 +50,7 @@ y = np.sin(x)
|
|
|
50
50
|
|
|
51
51
|
# Utilisation d'un marqueur en forme de boule de pain
|
|
52
52
|
plt.figure(figsize=(10, 6))
|
|
53
|
-
plt.scatter(x, y, marker=
|
|
53
|
+
plt.scatter(x, y, marker=tapisseries.boule, s=500)
|
|
54
54
|
plt.title("Graphique avec marqueur français")
|
|
55
55
|
plt.show()
|
|
56
56
|
```
|
|
@@ -60,7 +60,7 @@ plt.show()
|
|
|
60
60
|
```python
|
|
61
61
|
import matplotlib.pyplot as plt
|
|
62
62
|
import numpy as np
|
|
63
|
-
from frenchplotlib import
|
|
63
|
+
from frenchplotlib import tapisseries, dorures
|
|
64
64
|
|
|
65
65
|
# Données d'exemple
|
|
66
66
|
x = np.linspace(-1, 1, 20)
|
|
@@ -68,13 +68,13 @@ y = np.sin(x)
|
|
|
68
68
|
|
|
69
69
|
# Combinaison marqueur + palette de couleurs
|
|
70
70
|
plt.figure(figsize=(12, 6))
|
|
71
|
-
plt.scatter(x, y, c=y, marker=
|
|
71
|
+
plt.scatter(x, y, c=y, marker=tapisseries.boule, s=1000, cmap=dorures.escargot_persil)
|
|
72
72
|
plt.colorbar(label='Valeurs')
|
|
73
73
|
plt.title("Visualisation à la française")
|
|
74
74
|
plt.show()
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
## 🥐 Marqueurs disponibles (
|
|
77
|
+
## 🥐 Marqueurs disponibles (tapisseries)
|
|
78
78
|
|
|
79
79
|
- `baguette` - Une baguette traditionnelle
|
|
80
80
|
- `pain_de_mie` - Pain de mie
|
|
@@ -131,12 +131,12 @@ plt.show()
|
|
|
131
131
|
```python
|
|
132
132
|
import matplotlib.pyplot as plt
|
|
133
133
|
import numpy as np
|
|
134
|
-
from frenchplotlib import
|
|
134
|
+
from frenchplotlib import tapisseries, dorures
|
|
135
135
|
|
|
136
136
|
fig, ax = plt.subplots(figsize=(12, 8))
|
|
137
137
|
|
|
138
138
|
# Différents marqueurs
|
|
139
|
-
marqueurs = [
|
|
139
|
+
marqueurs = [tapisseries.croissant, tapisseries.vin, tapisseries.fromage, tapisseries.macaron]
|
|
140
140
|
couleurs = ['#FFD700', '#8B0000', '#F5DEB3', '#FFB6C1']
|
|
141
141
|
labels = ['Croissant', 'Vin', 'Fromage', 'Macaron']
|
|
142
142
|
|
|
@@ -183,7 +183,7 @@ pip install -e .
|
|
|
183
183
|
frenchplotlib/
|
|
184
184
|
├── frenchplotlib/
|
|
185
185
|
│ ├── __init__.py
|
|
186
|
-
│ ├──
|
|
186
|
+
│ ├── tapisseries.py # Marqueurs personnalisés
|
|
187
187
|
│ └── dorures.py # Palettes de couleurs
|
|
188
188
|
├── main.py # Exemple d'utilisation
|
|
189
189
|
├── setup.py
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
frenchplotlib/__init__.py,sha256=
|
|
2
|
-
frenchplotlib/
|
|
3
|
-
frenchplotlib/converter.py,sha256=j3THVee5VrkVnYBCs4OKTe9crxsrpx7ffnmgo4FesP8,3864
|
|
1
|
+
frenchplotlib/__init__.py,sha256=LsmSTE3zNjl3VGk0h_QMDs_ZvxJkuzAUkBu88Lbzpfs,85
|
|
2
|
+
frenchplotlib/converter.py,sha256=KLGZd0ObnqpOXEnC7zmnBkmZCPBcfFjEqT1Vvm6-H4c,2150
|
|
4
3
|
frenchplotlib/dorures.py,sha256=CDUQC2eLRX5z2UAwKfTgSzKSrrvM0hoTFTJbbgtTy0Y,2586
|
|
4
|
+
frenchplotlib/tapisseries.py,sha256=J9yDVY2848_VnVBlIU66ktdbQ_FBRjkJTAbSBcB738c,1054212
|
|
5
5
|
frenchplotlib/assets/baguette.svg,sha256=Gz8UlVlZ-tEjXcrytc4GURBu6qjj9M5NBbd4_skSGr4,2178
|
|
6
6
|
frenchplotlib/assets/boule.svg,sha256=tq4376UcoDMZzFc9PIiJABMQ5a2FXz41wqskl4xhRQg,7304
|
|
7
7
|
frenchplotlib/assets/bretzel.svg,sha256=v3fZZ5jzni05ilOu47SUjAY34hFUz8Yi9vF2GXLNOXI,5566
|
|
@@ -21,7 +21,7 @@ frenchplotlib/assets/religieuse.svg,sha256=cUXtqA5610bz_8XT16BxPLiQEw3SYY09gKbCp
|
|
|
21
21
|
frenchplotlib/assets/vin.svg,sha256=3BibINXh2o_e_Aso6NUfyUe4Kicor_51igwIV10lv6w,6451
|
|
22
22
|
frenchplotlib/assets/nous/mathis.svg,sha256=kHfrZUAh3IP2gSu0NKHGnifjXMzgh5LJsMgGhhnoSMM,69048
|
|
23
23
|
frenchplotlib/assets/nous/moi.svg,sha256=IIALtyrJe4boi_9Yp9GKQv7dzkbk2YtDbxX1ef106dQ,345870
|
|
24
|
-
frenchplotlib-0.
|
|
25
|
-
frenchplotlib-0.
|
|
26
|
-
frenchplotlib-0.
|
|
27
|
-
frenchplotlib-0.
|
|
24
|
+
frenchplotlib-1.0.0.dist-info/METADATA,sha256=r5gY2AmWr5axKWUBZlFCCNz96U5C3IZWhfNsHKW_ba8,5374
|
|
25
|
+
frenchplotlib-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
26
|
+
frenchplotlib-1.0.0.dist-info/top_level.txt,sha256=oitgsanLokGFVInAGAje6_UuNo1zIm0vd-2_QsYwIp8,14
|
|
27
|
+
frenchplotlib-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|