MatplotLibAPI 3.2.2__tar.gz → 3.2.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.
Files changed (19) hide show
  1. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Bubble.py +3 -3
  2. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Composite.py +10 -7
  3. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Network.py +2 -2
  4. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Table.py +3 -3
  5. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Timeserie.py +3 -3
  6. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Treemap.py +1 -1
  7. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/__init__.py +28 -30
  8. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3/MatplotLibAPI.egg-info}/PKG-INFO +1 -1
  9. {matplotlibapi-3.2.2/MatplotLibAPI.egg-info → matplotlibapi-3.2.3}/PKG-INFO +1 -1
  10. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/pyproject.toml +1 -1
  11. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/LICENSE +0 -0
  12. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/Pivot.py +0 -0
  13. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI/StyleTemplate.py +0 -0
  14. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI.egg-info/SOURCES.txt +0 -0
  15. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI.egg-info/dependency_links.txt +0 -0
  16. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI.egg-info/requires.txt +0 -0
  17. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/MatplotLibAPI.egg-info/top_level.txt +0 -0
  18. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/README.md +0 -0
  19. {matplotlibapi-3.2.2 → matplotlibapi-3.2.3}/setup.cfg +0 -0
@@ -19,7 +19,7 @@ BUBBLE_STYLE_TEMPLATE = StyleTemplate(
19
19
  )
20
20
 
21
21
 
22
- def plot_bubble_ax(
22
+ def aplot_bubble(
23
23
  pd_df: pd.DataFrame,
24
24
  label: str,
25
25
  x: str,
@@ -125,7 +125,7 @@ def plot_bubble_ax(
125
125
  return ax
126
126
 
127
127
 
128
- def plot_bubble_fig(
128
+ def fplot_bubble(
129
129
  pd_df: pd.DataFrame,
130
130
  label: str,
131
131
  x: str,
@@ -144,7 +144,7 @@ def plot_bubble_fig(
144
144
  fig = plt.figure(figsize=figsize)
145
145
  fig.patch.set_facecolor(style.background_color)
146
146
  ax = fig.add_subplot()
147
- ax = plot_bubble_ax(pd_df=pd_df,
147
+ ax = aplot_bubble(pd_df=pd_df,
148
148
  label=label,
149
149
  x=x,
150
150
  y=y,
@@ -1,12 +1,14 @@
1
1
  # Hint for Visual Code Python Interactive window
2
2
  # %%
3
- from typing import Optional, Tuple
3
+ from typing import Optional, Tuple,List,Union, Dict
4
4
  import pandas as pd
5
5
  import matplotlib.pyplot as plt
6
+ from matplotlib.pyplot import GridSpec
6
7
  from matplotlib.figure import Figure
8
+ from matplotlib.axes import Axes
7
9
 
8
- from .Bubble import plot_bubble_ax, BUBBLE_STYLE_TEMPLATE
9
- from .Table import plot_table_ax
10
+ from .Bubble import aplot_bubble, BUBBLE_STYLE_TEMPLATE
11
+ from .Table import aplot_table
10
12
  from .StyleTemplate import StyleTemplate, format_func, validate_dataframe
11
13
 
12
14
 
@@ -41,7 +43,7 @@ def plot_composite_bubble(
41
43
  fig.patch.set_facecolor(style.background_color)
42
44
  grid = plt.GridSpec(2, 2, height_ratios=[2, 1], width_ratios=[1, 1])
43
45
  ax = fig.add_subplot(grid[0, 0:])
44
- ax = plot_bubble_ax(pd_df=plot_df,
46
+ ax = aplot_bubble(pd_df=plot_df,
45
47
  label=label,
46
48
  x=x,
47
49
  y=y,
@@ -64,7 +66,7 @@ def plot_composite_bubble(
64
66
  style.format_funcs[z] = style.format_funcs["z"]
65
67
 
66
68
  ax2 = fig.add_subplot(grid[1, 0])
67
- ax2 = plot_table_ax(
69
+ ax2 = aplot_table(
68
70
  pd_df=plot_df,
69
71
  cols=[label, z, y, x],
70
72
  title=f"Top {table_rows}",
@@ -75,10 +77,10 @@ def plot_composite_bubble(
75
77
  style=style
76
78
  )
77
79
  ax3 = fig.add_subplot(grid[1, 1])
78
- ax3 = plot_table_ax(
80
+ ax3 = aplot_table(
79
81
  pd_df=plot_df,
80
82
  cols=[label, z, y, x],
81
- title=f"Worst {table_rows}",
83
+ title=f"Last {table_rows}",
82
84
  ax=ax3,
83
85
  sort_by=sort_by,
84
86
  ascending=True,
@@ -87,3 +89,4 @@ def plot_composite_bubble(
87
89
  )
88
90
  fig.tight_layout()
89
91
  return fig
92
+
@@ -327,7 +327,7 @@ class Graph(nx.Graph):
327
327
  return Graph(G)
328
328
 
329
329
 
330
- def plot_network(pd_df: pd.DataFrame,
330
+ def aplot_network(pd_df: pd.DataFrame,
331
331
  source: str = "source",
332
332
  target: str = "target",
333
333
  weight: str = "weight",
@@ -351,7 +351,7 @@ def plot_network(pd_df: pd.DataFrame,
351
351
  style=style,
352
352
  ax=ax)
353
353
 
354
- def plot_network_components(pd_df: pd.DataFrame,
354
+ def aplot_network_components(pd_df: pd.DataFrame,
355
355
  source: str = "source",
356
356
  target: str = "target",
357
357
  weight: str = "weight",
@@ -14,7 +14,7 @@ TABLE_STYLE_TEMPLATE = StyleTemplate(
14
14
  )
15
15
 
16
16
 
17
- def plot_table_ax(pd_df: pd.DataFrame,
17
+ def aplot_table(pd_df: pd.DataFrame,
18
18
  cols: List[str],
19
19
  title: Optional[str] = None,
20
20
  style: StyleTemplate = TABLE_STYLE_TEMPLATE,
@@ -67,7 +67,7 @@ def plot_table_ax(pd_df: pd.DataFrame,
67
67
  return ax
68
68
 
69
69
 
70
- def plot_table_fig(pd_df: pd.DataFrame,
70
+ def fplot_table(pd_df: pd.DataFrame,
71
71
  cols: List[str],
72
72
  title: Optional[str] = None,
73
73
  style: StyleTemplate = TABLE_STYLE_TEMPLATE,
@@ -79,7 +79,7 @@ def plot_table_fig(pd_df: pd.DataFrame,
79
79
  fig = plt.figure(figsize=figsize)
80
80
  fig.patch.set_facecolor(style.background_color)
81
81
  ax = fig.add_subplot()
82
- ax = plot_table_ax(pd_df,
82
+ ax = aplot_table(pd_df,
83
83
  cols,
84
84
  title,
85
85
  style,
@@ -18,7 +18,7 @@ TIMESERIE_STYLE_TEMPLATE = StyleTemplate(
18
18
  # region Line
19
19
 
20
20
 
21
- def plot_timeserie_ax(pd_df: pd.DataFrame,
21
+ def aplot_timeserie(pd_df: pd.DataFrame,
22
22
  label: str,
23
23
  x: str,
24
24
  y: str,
@@ -99,7 +99,7 @@ def plot_timeserie_ax(pd_df: pd.DataFrame,
99
99
  return ax
100
100
 
101
101
 
102
- def plot_timeserie_fig(pd_df: pd.DataFrame,
102
+ def fplot_timeserie(pd_df: pd.DataFrame,
103
103
  label: str,
104
104
  x: str,
105
105
  y: str,
@@ -113,7 +113,7 @@ def plot_timeserie_fig(pd_df: pd.DataFrame,
113
113
  fig = plt.figure(figsize=figsize)
114
114
  fig.patch.set_facecolor(style.background_color)
115
115
  ax = fig.add_subplot()
116
- ax = plot_timeserie_ax(pd_df=pd_df,
116
+ ax = aplot_timeserie(pd_df=pd_df,
117
117
  label=label,
118
118
  x=x,
119
119
  y=y,
@@ -19,7 +19,7 @@ TREEMAP_STYLE_TEMPLATE = StyleTemplate(
19
19
  )
20
20
 
21
21
 
22
- def plot_treemap(pd_df: pd.DataFrame,
22
+ def fplot_treemap(pd_df: pd.DataFrame,
23
23
  path: str,
24
24
  values: str,
25
25
  style: StyleTemplate = TREEMAP_STYLE_TEMPLATE,
@@ -1,11 +1,11 @@
1
1
 
2
2
  from .StyleTemplate import StyleTemplate
3
- from .Bubble import plot_bubble_ax, plot_bubble_fig, BUBBLE_STYLE_TEMPLATE
3
+ from .Bubble import aplot_bubble, fplot_bubble, BUBBLE_STYLE_TEMPLATE
4
4
  from .Composite import plot_composite_bubble
5
- from .Timeserie import plot_timeserie_ax, plot_timeserie_fig, TIMESERIE_STYLE_TEMPLATE
6
- from .Table import plot_table_ax, plot_table_fig, TABLE_STYLE_TEMPLATE
7
- from .Network import plot_network, plot_network_components, NETWORK_STYLE_TEMPLATE
8
- from .Treemap import plot_treemap, TREEMAP_STYLE_TEMPLATE
5
+ from .Timeserie import aplot_timeserie, fplot_timeserie, TIMESERIE_STYLE_TEMPLATE
6
+ from .Table import aplot_table, fplot_table, TABLE_STYLE_TEMPLATE
7
+ from .Network import aplot_network, aplot_network_components, NETWORK_STYLE_TEMPLATE
8
+ from .Treemap import fplot_treemap, TREEMAP_STYLE_TEMPLATE
9
9
  from typing import List, Optional, Tuple
10
10
  import pandas as pd
11
11
  from pandas.api.extensions import register_dataframe_accessor
@@ -21,7 +21,7 @@ class DataFrameAccessor:
21
21
  def __init__(self, pd_df: pd.DataFrame):
22
22
  self._obj = pd_df
23
23
 
24
- def plot_bubble_ax(self,
24
+ def aplot_bubble(self,
25
25
  label: str,
26
26
  x: str,
27
27
  y: str,
@@ -36,7 +36,7 @@ class DataFrameAccessor:
36
36
  vline: bool = False,
37
37
  ax: Optional[Axes] = None) -> Axes:
38
38
 
39
- return plot_bubble_ax(pd_df=self._obj,
39
+ return aplot_bubble(pd_df=self._obj,
40
40
  label=label,
41
41
  x=x,
42
42
  y=y,
@@ -51,7 +51,7 @@ class DataFrameAccessor:
51
51
  vline=vline,
52
52
  ax=ax)
53
53
 
54
- def plot_bubble_fig(self,
54
+ def fplot_bubble(self,
55
55
  label: str,
56
56
  x: str,
57
57
  y: str,
@@ -66,7 +66,7 @@ class DataFrameAccessor:
66
66
  vline: bool = False,
67
67
  figsize: Tuple[float, float] = (19.2, 10.8)) -> Figure:
68
68
 
69
- return plot_bubble_fig(pd_df=self._obj,
69
+ return fplot_bubble(pd_df=self._obj,
70
70
  label=label,
71
71
  x=x,
72
72
  y=y,
@@ -81,7 +81,7 @@ class DataFrameAccessor:
81
81
  vline=vline,
82
82
  figsize=figsize)
83
83
 
84
- def plot_composite_bubble(self,
84
+ def fplot_composite_bubble(self,
85
85
  label: str,
86
86
  x: str,
87
87
  y: str,
@@ -91,8 +91,7 @@ class DataFrameAccessor:
91
91
  max_values: int = 100,
92
92
  center_to_mean: bool = False,
93
93
  sort_by: Optional[str] = None,
94
- ascending: bool = False,
95
- ax: Optional[Axes] = None) -> Figure:
94
+ ascending: bool = False) -> Figure:
96
95
 
97
96
  return plot_composite_bubble(pd_df=self._obj,
98
97
  label=label,
@@ -104,10 +103,9 @@ class DataFrameAccessor:
104
103
  max_values=max_values,
105
104
  center_to_mean=center_to_mean,
106
105
  sort_by=sort_by,
107
- ascending=ascending,
108
- ax=ax)
106
+ ascending=ascending)
109
107
 
110
- def plot_table_ax(self,
108
+ def aplot_table_ax(self,
111
109
  cols: List[str],
112
110
  title: Optional[str] = None,
113
111
  style: StyleTemplate = TABLE_STYLE_TEMPLATE,
@@ -116,7 +114,7 @@ class DataFrameAccessor:
116
114
  ascending: bool = False,
117
115
  ax: Optional[Axes] = None) -> Axes:
118
116
 
119
- return plot_table_ax(pd_df=self._obj,
117
+ return aplot_table(pd_df=self._obj,
120
118
  cols=cols,
121
119
  title=title,
122
120
  style=style,
@@ -125,7 +123,7 @@ class DataFrameAccessor:
125
123
  ascending=ascending,
126
124
  ax=ax)
127
125
 
128
- def plot_table_fig(self,
126
+ def fplot_table(self,
129
127
  cols: List[str],
130
128
  title: Optional[str] = None,
131
129
  style: StyleTemplate = TABLE_STYLE_TEMPLATE,
@@ -134,7 +132,7 @@ class DataFrameAccessor:
134
132
  ascending: bool = False,
135
133
  figsize: Tuple[float, float] = (19.2, 10.8)) -> Axes:
136
134
 
137
- return plot_table_fig(pd_df=self._obj,
135
+ return fplot_table(pd_df=self._obj,
138
136
  cols=cols,
139
137
  title=title,
140
138
  style=style,
@@ -143,7 +141,7 @@ class DataFrameAccessor:
143
141
  ascending=ascending,
144
142
  figsize=figsize)
145
143
 
146
- def plot_timeserie_ax(self,
144
+ def aplot_timeserie(self,
147
145
  label: str,
148
146
  x: str,
149
147
  y: str,
@@ -155,7 +153,7 @@ class DataFrameAccessor:
155
153
  std: bool = False,
156
154
  ax: Optional[Axes] = None) -> Axes:
157
155
 
158
- return plot_timeserie_ax(pd_df=self._obj,
156
+ return aplot_timeserie(pd_df=self._obj,
159
157
  label=label,
160
158
  x=x,
161
159
  y=y,
@@ -167,7 +165,7 @@ class DataFrameAccessor:
167
165
  std=std,
168
166
  ax=ax)
169
167
 
170
- def plot_timeserie_fig(self,
168
+ def fplot_timeserie(self,
171
169
  label: str,
172
170
  x: str,
173
171
  y: str,
@@ -179,7 +177,7 @@ class DataFrameAccessor:
179
177
  std: bool = False,
180
178
  figsize: Tuple[float, float] = (19.2, 10.8)) -> Axes:
181
179
 
182
- return plot_timeserie_fig(pd_df=self._obj,
180
+ return fplot_timeserie(pd_df=self._obj,
183
181
  label=label,
184
182
  x=x,
185
183
  y=y,
@@ -191,7 +189,7 @@ class DataFrameAccessor:
191
189
  std=std,
192
190
  figsize=figsize)
193
191
 
194
- def plot_network(self,
192
+ def aplot_network(self,
195
193
  source: str = "source",
196
194
  target: str = "target",
197
195
  weight: str = "weight",
@@ -202,7 +200,7 @@ class DataFrameAccessor:
202
200
  node_list: Optional[List] = None,
203
201
  ax: Optional[Axes] = None) -> Axes:
204
202
 
205
- return plot_network(df=self._obj,
203
+ return aplot_network(df=self._obj,
206
204
  source=source,
207
205
  target=target,
208
206
  weight=weight,
@@ -213,7 +211,7 @@ class DataFrameAccessor:
213
211
  node_list=node_list,
214
212
  ax=ax)
215
213
 
216
- def plot_network_components(self,
214
+ def aplot_network_components(self,
217
215
  source: str = "source",
218
216
  target: str = "target",
219
217
  weight: str = "weight",
@@ -224,7 +222,7 @@ class DataFrameAccessor:
224
222
  node_list: Optional[List] = None,
225
223
  ax: Optional[Axes] = None) -> Axes:
226
224
 
227
- return plot_network_components(df=self._obj,
225
+ return aplot_network_components(df=self._obj,
228
226
  source=source,
229
227
  target=target,
230
228
  weight=weight,
@@ -235,7 +233,7 @@ class DataFrameAccessor:
235
233
  node_list=node_list,
236
234
  ax=ax)
237
235
 
238
- def plot_treemap(self,
236
+ def fplot_treemap(self,
239
237
  path: str,
240
238
  values: str,
241
239
  style: StyleTemplate = TREEMAP_STYLE_TEMPLATE,
@@ -244,7 +242,7 @@ class DataFrameAccessor:
244
242
  max_values: int = 100,
245
243
  sort_by: Optional[str] = None,
246
244
  ascending: bool = False) -> go.Figure:
247
- return plot_treemap(pd_df=self._obj,
245
+ return fplot_treemap(pd_df=self._obj,
248
246
  path=path,
249
247
  values=values,
250
248
  title=title,
@@ -255,5 +253,5 @@ class DataFrameAccessor:
255
253
  ascending=ascending)
256
254
 
257
255
 
258
- __all__ = ["validate_dataframe", "plot_bubble_ax", "plot_timeserie_ax", "plot_table_ax", "plot_network", "plot_network_components",
259
- "plot_pivotbar", "plot_treemap", "plot_composite_bubble", "StyleTemplate", "DataFrameAccessor"]
256
+ __all__ = ["validate_dataframe", "aplot_bubble", "aplot_timeserie", "aplot_table", "aplot_network", "aplot_network_components",
257
+ "plot_pivotbar", "fplot_treemap", "plot_composite_bubble", "StyleTemplate", "DataFrameAccessor"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MatplotLibAPI
3
- Version: 3.2.2
3
+ Version: 3.2.3
4
4
  Requires-Python: >=3.7
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MatplotLibAPI
3
- Version: 3.2.2
3
+ Version: 3.2.3
4
4
  Requires-Python: >=3.7
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
  build-backend = "setuptools.build_meta"
4
4
  [project]
5
5
  name = "MatplotLibAPI"
6
- version="v3.2.2"
6
+ version="v3.2.3"
7
7
  readme = "README.md"
8
8
  requires-python=">=3.7"
9
9
  dependencies = ["pandas","matplotlib","networkx","plotly","seaborn","scikit-learn","kaleido","nbformat"]
File without changes
File without changes
File without changes