MatplotLibAPI 3.2.21__py3-none-any.whl → 4.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.
Files changed (51) hide show
  1. MatplotLibAPI/__init__.py +4 -86
  2. MatplotLibAPI/accessor.py +519 -196
  3. MatplotLibAPI/area.py +177 -0
  4. MatplotLibAPI/bar.py +185 -0
  5. MatplotLibAPI/base_plot.py +88 -0
  6. MatplotLibAPI/box_violin.py +180 -0
  7. MatplotLibAPI/bubble.py +568 -0
  8. MatplotLibAPI/{Composite.py → composite.py} +127 -106
  9. MatplotLibAPI/heatmap.py +223 -0
  10. MatplotLibAPI/histogram.py +170 -0
  11. MatplotLibAPI/mcp/__init__.py +17 -0
  12. MatplotLibAPI/mcp/metadata.py +90 -0
  13. MatplotLibAPI/mcp/renderers.py +45 -0
  14. MatplotLibAPI/mcp_server.py +626 -0
  15. MatplotLibAPI/network/__init__.py +28 -0
  16. MatplotLibAPI/network/constants.py +22 -0
  17. MatplotLibAPI/network/core.py +1360 -0
  18. MatplotLibAPI/network/plot.py +597 -0
  19. MatplotLibAPI/network/scaling.py +56 -0
  20. MatplotLibAPI/pie.py +154 -0
  21. MatplotLibAPI/pivot.py +274 -0
  22. MatplotLibAPI/sankey.py +99 -0
  23. MatplotLibAPI/{StyleTemplate.py → style_template.py} +27 -22
  24. MatplotLibAPI/sunburst.py +139 -0
  25. MatplotLibAPI/{Table.py → table.py} +112 -87
  26. MatplotLibAPI/{Timeserie.py → timeserie.py} +98 -42
  27. MatplotLibAPI/{Treemap.py → treemap.py} +43 -55
  28. MatplotLibAPI/typing.py +12 -0
  29. MatplotLibAPI/{_visualization_utils.py → utils.py} +7 -13
  30. MatplotLibAPI/waffle.py +173 -0
  31. MatplotLibAPI/word_cloud.py +489 -0
  32. {matplotlibapi-3.2.21.dist-info → matplotlibapi-4.0.0.dist-info}/METADATA +98 -9
  33. matplotlibapi-4.0.0.dist-info/RECORD +36 -0
  34. {matplotlibapi-3.2.21.dist-info → matplotlibapi-4.0.0.dist-info}/WHEEL +1 -1
  35. matplotlibapi-4.0.0.dist-info/entry_points.txt +2 -0
  36. MatplotLibAPI/Area.py +0 -80
  37. MatplotLibAPI/Bar.py +0 -83
  38. MatplotLibAPI/BoxViolin.py +0 -75
  39. MatplotLibAPI/Bubble.py +0 -458
  40. MatplotLibAPI/Heatmap.py +0 -121
  41. MatplotLibAPI/Histogram.py +0 -73
  42. MatplotLibAPI/Network.py +0 -989
  43. MatplotLibAPI/Pie.py +0 -70
  44. MatplotLibAPI/Pivot.py +0 -134
  45. MatplotLibAPI/Sankey.py +0 -46
  46. MatplotLibAPI/Sunburst.py +0 -89
  47. MatplotLibAPI/Waffle.py +0 -86
  48. MatplotLibAPI/Wordcloud.py +0 -373
  49. MatplotLibAPI/_typing.py +0 -17
  50. matplotlibapi-3.2.21.dist-info/RECORD +0 -26
  51. {matplotlibapi-3.2.21.dist-info → matplotlibapi-4.0.0.dist-info}/licenses/LICENSE +0 -0
MatplotLibAPI/area.py ADDED
@@ -0,0 +1,177 @@
1
+ """Area chart helpers."""
2
+
3
+ from typing import Any, Optional, Tuple
4
+
5
+ import pandas as pd
6
+ import matplotlib.pyplot as plt
7
+ from matplotlib.axes import Axes
8
+ from matplotlib.figure import Figure
9
+
10
+ from .base_plot import BasePlot
11
+
12
+ from .style_template import (
13
+ AREA_STYLE_TEMPLATE,
14
+ StyleTemplate,
15
+ string_formatter,
16
+ validate_dataframe,
17
+ )
18
+ from .utils import _get_axis
19
+
20
+ __all__ = ["AREA_STYLE_TEMPLATE", "aplot_area", "fplot_area"]
21
+
22
+
23
+ class AreaChart(BasePlot):
24
+ """Plot area charts from tabular data.
25
+
26
+ Methods
27
+ -------
28
+ aplot
29
+ Plot an area chart on an existing Matplotlib axes.
30
+ fplot
31
+ Plot an area chart on a new Matplotlib figure.
32
+ """
33
+
34
+ def __init__(
35
+ self,
36
+ pd_df: pd.DataFrame,
37
+ x: str,
38
+ y: str,
39
+ label: Optional[str] = None,
40
+ stacked: bool = True,
41
+ ):
42
+ super().__init__(pd_df=pd_df)
43
+ self.x = x
44
+ self.y = y
45
+ self.label = label
46
+ self.stacked = stacked
47
+
48
+ cols = [self.x, self.y]
49
+ if self.label:
50
+ cols.append(self.label)
51
+ validate_dataframe(self._obj, cols=cols)
52
+
53
+ def aplot(
54
+ self,
55
+ title: Optional[str] = None,
56
+ style: StyleTemplate = AREA_STYLE_TEMPLATE,
57
+ ax: Optional[Axes] = None,
58
+ **kwargs: Any,
59
+ ) -> Axes:
60
+ """Plot an area chart on the provided axis.
61
+
62
+ Parameters
63
+ ----------
64
+ title : str, optional
65
+ Title for the plot. The default is None.
66
+ style : StyleTemplate, optional
67
+ Style template for the plot. The default is AREA_STYLE_TEMPLATE.
68
+ ax : Axes, optional
69
+ Matplotlib axes to plot on. If None, use the current axes.
70
+ **kwargs : Any
71
+ Additional keyword arguments reserved for compatibility.
72
+
73
+ Returns
74
+ -------
75
+ Axes
76
+ The Matplotlib axes containing the area chart.
77
+ """
78
+ plot_ax = _get_axis(ax)
79
+
80
+ if self.label:
81
+ pivot_df = self._obj.pivot_table(
82
+ index=self.x, columns=self.label, values=self.y, aggfunc="sum"
83
+ ).sort_index()
84
+ pivot_df.plot(kind="area", stacked=self.stacked, alpha=0.7, ax=plot_ax)
85
+ else:
86
+ sorted_df = self._obj.sort_values(by=self.x)
87
+ plot_ax.fill_between(
88
+ sorted_df[self.x], sorted_df[self.y], color=style.font_color, alpha=0.4
89
+ )
90
+ plot_ax.plot(sorted_df[self.x], sorted_df[self.y], color=style.font_color)
91
+
92
+ plot_ax.set_xlabel(string_formatter(self.x))
93
+ plot_ax.set_ylabel(string_formatter(self.y))
94
+ if title:
95
+ plot_ax.set_title(title)
96
+ return plot_ax
97
+
98
+ def fplot(
99
+ self,
100
+ title: Optional[str] = None,
101
+ style: StyleTemplate = AREA_STYLE_TEMPLATE,
102
+ figsize: Tuple[float, float] = (10, 6),
103
+ ) -> Figure:
104
+ """Plot an area chart on a new figure.
105
+
106
+ Parameters
107
+ ----------
108
+ title : str, optional
109
+ Title for the plot. The default is None.
110
+ style : StyleTemplate, optional
111
+ Style template for the plot. The default is AREA_STYLE_TEMPLATE.
112
+ figsize : tuple[float, float], optional
113
+ Figure size. The default is (10, 6).
114
+
115
+ Returns
116
+ -------
117
+ Figure
118
+ The Matplotlib figure containing the area chart.
119
+ """
120
+ fig = Figure(
121
+ figsize=figsize,
122
+ facecolor=style.background_color,
123
+ edgecolor=style.background_color,
124
+ )
125
+ ax = Axes(fig=fig, facecolor=style.background_color)
126
+ self.aplot(title=title, style=style, ax=ax)
127
+ return fig
128
+
129
+
130
+ def aplot_area(
131
+ pd_df: pd.DataFrame,
132
+ x: str,
133
+ y: str,
134
+ label: Optional[str] = None,
135
+ stacked: bool = True,
136
+ title: Optional[str] = None,
137
+ style: StyleTemplate = AREA_STYLE_TEMPLATE,
138
+ ax: Optional[Axes] = None,
139
+ **kwargs: Any,
140
+ ) -> Axes:
141
+ """Plot area charts, optionally stacked for part-to-whole trends."""
142
+ return AreaChart(
143
+ pd_df=pd_df,
144
+ x=x,
145
+ y=y,
146
+ label=label,
147
+ stacked=stacked,
148
+ ).aplot(
149
+ title=title,
150
+ style=style,
151
+ ax=ax,
152
+ **kwargs,
153
+ )
154
+
155
+
156
+ def fplot_area(
157
+ pd_df: pd.DataFrame,
158
+ x: str,
159
+ y: str,
160
+ label: Optional[str] = None,
161
+ stacked: bool = True,
162
+ title: Optional[str] = None,
163
+ style: StyleTemplate = AREA_STYLE_TEMPLATE,
164
+ figsize: Tuple[float, float] = (10, 6),
165
+ ) -> Figure:
166
+ """Plot area charts on a new figure."""
167
+ return AreaChart(
168
+ pd_df=pd_df,
169
+ x=x,
170
+ y=y,
171
+ label=label,
172
+ stacked=stacked,
173
+ ).fplot(
174
+ title=title,
175
+ style=style,
176
+ figsize=figsize,
177
+ )
MatplotLibAPI/bar.py ADDED
@@ -0,0 +1,185 @@
1
+ """Bar and stacked bar chart helpers."""
2
+
3
+ from typing import Any, Optional, Tuple
4
+
5
+ import pandas as pd
6
+ import matplotlib.pyplot as plt
7
+ import seaborn as sns
8
+ from matplotlib.axes import Axes
9
+ from matplotlib.figure import Figure
10
+
11
+ from .base_plot import BasePlot
12
+
13
+ from .style_template import (
14
+ DISTRIBUTION_STYLE_TEMPLATE,
15
+ StyleTemplate,
16
+ string_formatter,
17
+ validate_dataframe,
18
+ )
19
+ from .utils import _get_axis
20
+
21
+ __all__ = ["DISTRIBUTION_STYLE_TEMPLATE", "aplot_bar", "fplot_bar"]
22
+
23
+
24
+ class BarChart(BasePlot):
25
+ """Plot grouped and stacked bar charts from tabular data.
26
+
27
+ Methods
28
+ -------
29
+ aplot
30
+ Plot a bar chart on an existing Matplotlib axes.
31
+ fplot
32
+ Plot a bar chart on a new Matplotlib figure.
33
+ """
34
+
35
+ def __init__(
36
+ self,
37
+ pd_df: pd.DataFrame,
38
+ category: str,
39
+ value: str,
40
+ group: Optional[str] = None,
41
+ stacked: bool = False,
42
+ ):
43
+ cols = [category, value]
44
+ if group:
45
+ cols.append(group)
46
+ validate_dataframe(pd_df, cols=cols)
47
+ super().__init__(pd_df=pd_df)
48
+ self.category = category
49
+ self.value = value
50
+ self.group = group
51
+ self.stacked = stacked
52
+
53
+ def aplot(
54
+ self,
55
+ title: Optional[str] = None,
56
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
57
+ ax: Optional[Axes] = None,
58
+ **kwargs: Any,
59
+ ) -> Axes:
60
+ """Plot bar or stacked bar charts for categorical comparisons.
61
+
62
+ Parameters
63
+ ----------
64
+ title : str, optional
65
+ Title for the plot, by default None.
66
+ style : StyleTemplate, optional
67
+ Style template for the plot, by default DISTRIBUTION_STYLE_TEMPLATE.
68
+ ax : Axes, optional
69
+ Matplotlib Axes to plot on, by default None which uses the current Axes.
70
+ **kwargs : Any
71
+ Additional keyword arguments forwarded to the plotting function.
72
+
73
+ Returns
74
+ -------
75
+ Axes
76
+ The Matplotlib Axes object containing the plot.
77
+ """
78
+ plot_ax = _get_axis(ax)
79
+
80
+ if self.group:
81
+ pivot_df = self._obj.pivot_table(
82
+ index=self.category,
83
+ columns=self.group,
84
+ values=self.value,
85
+ aggfunc="sum",
86
+ )
87
+ pivot_df.plot(kind="bar", stacked=self.stacked, ax=plot_ax, alpha=0.85)
88
+ else:
89
+ sns.barplot(
90
+ data=self._obj,
91
+ x=self.category,
92
+ y=self.value,
93
+ palette=style.palette,
94
+ ax=plot_ax,
95
+ )
96
+
97
+ plot_ax.set_facecolor(style.background_color)
98
+ plot_ax.set_xlabel(string_formatter(self.category))
99
+ plot_ax.set_ylabel(string_formatter(self.value))
100
+ if title:
101
+ plot_ax.set_title(title)
102
+ plot_ax.tick_params(axis="x", labelrotation=45)
103
+ return plot_ax
104
+
105
+ def fplot(
106
+ self,
107
+ title: Optional[str] = None,
108
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
109
+ figsize: Tuple[float, float] = (10, 6),
110
+ ) -> Figure:
111
+ """Plot bar or stacked bar charts on a new figure.
112
+
113
+ Parameters
114
+ ----------
115
+ title : str, optional
116
+ Title for the plot, by default None.
117
+ style : StyleTemplate, optional
118
+ Style template for the plot, by default DISTRIBUTION_STYLE_TEMPLATE.
119
+ figsize : tuple[float, float], optional
120
+ The size of the figure, by default (10, 6).
121
+
122
+ Returns
123
+ -------
124
+ Figure
125
+ The Matplotlib Figure object containing the plot.
126
+ """
127
+ fig = Figure(
128
+ figsize=figsize,
129
+ facecolor=style.background_color,
130
+ edgecolor=style.background_color,
131
+ )
132
+ ax = Axes(fig=fig, facecolor=style.background_color)
133
+ fig.set_facecolor(style.background_color)
134
+ self.aplot(title=title, style=style, ax=ax)
135
+ return fig
136
+
137
+
138
+ def aplot_bar(
139
+ pd_df: pd.DataFrame,
140
+ category: str,
141
+ value: str,
142
+ group: Optional[str] = None,
143
+ stacked: bool = False,
144
+ title: Optional[str] = None,
145
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
146
+ ax: Optional[Axes] = None,
147
+ **kwargs: Any,
148
+ ) -> Axes:
149
+ """Plot bar or stacked bar charts for categorical comparisons."""
150
+ return BarChart(
151
+ pd_df=pd_df,
152
+ category=category,
153
+ value=value,
154
+ group=group,
155
+ stacked=stacked,
156
+ ).aplot(
157
+ title=title,
158
+ style=style,
159
+ ax=ax,
160
+ **kwargs,
161
+ )
162
+
163
+
164
+ def fplot_bar(
165
+ pd_df: pd.DataFrame,
166
+ category: str,
167
+ value: str,
168
+ group: Optional[str] = None,
169
+ stacked: bool = False,
170
+ title: Optional[str] = None,
171
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
172
+ figsize: Tuple[float, float] = (10, 6),
173
+ ) -> Figure:
174
+ """Plot bar or stacked bar charts on a new figure."""
175
+ return BarChart(
176
+ pd_df=pd_df,
177
+ category=category,
178
+ value=value,
179
+ group=group,
180
+ stacked=stacked,
181
+ ).fplot(
182
+ title=title,
183
+ style=style,
184
+ figsize=figsize,
185
+ )
@@ -0,0 +1,88 @@
1
+ """Abstract base class for all plot types."""
2
+
3
+ from abc import ABC, abstractmethod
4
+ from typing import Any, Optional
5
+
6
+ import pandas as pd
7
+ from matplotlib.axes import Axes
8
+ from matplotlib.figure import Figure
9
+
10
+ from .style_template import StyleTemplate
11
+
12
+
13
+ class BasePlot(ABC):
14
+ """Base class defining the interface for all plot types.
15
+
16
+ This abstract base class ensures consistency across all plot implementations
17
+ by requiring both accessor-based (aplot_*) and figure-based (fplot_*) methods.
18
+
19
+ Methods
20
+ -------
21
+ aplot
22
+ Plot on an existing Matplotlib axes.
23
+ fplot
24
+ Plot on a new Matplotlib figure.
25
+ """
26
+
27
+ def __init__(self, pd_df: pd.DataFrame):
28
+ """Initialize the BasePlot."""
29
+ super().__init__()
30
+ self._obj = pd_df
31
+
32
+ @abstractmethod
33
+ def aplot(self, *args: Any, **kwargs: Any) -> Axes:
34
+ """Plot on an existing Matplotlib axes.
35
+
36
+ Subclasses should implement plot-specific parameters as needed.
37
+ Common parameters include title, style, and ax.
38
+
39
+ Parameters
40
+ ----------
41
+ pd_df : pd.DataFrame
42
+ The input DataFrame to plot.
43
+ *args : Any
44
+ Plot-specific positional arguments.
45
+ **kwargs : Any
46
+ Plot-specific keyword arguments. May include:
47
+ - title : str, optional
48
+ Chart title.
49
+ - style : StyleTemplate, optional
50
+ Styling template.
51
+ - ax : Axes, optional
52
+ Matplotlib axes to plot on. If None, uses the current axes.
53
+ - Additional plot-specific parameters.
54
+
55
+ Returns
56
+ -------
57
+ Axes
58
+ The Matplotlib axes object with the plot.
59
+ """
60
+
61
+ @abstractmethod
62
+ def fplot(self, *args: Any, **kwargs: Any) -> Figure:
63
+ """Plot on a new Matplotlib figure.
64
+
65
+ Subclasses should implement plot-specific parameters as needed.
66
+ Common parameters include title, style, and figsize.
67
+
68
+ Parameters
69
+ ----------
70
+ pd_df : pd.DataFrame
71
+ The input DataFrame to plot.
72
+ *args : Any
73
+ Plot-specific positional arguments.
74
+ **kwargs : Any
75
+ Plot-specific keyword arguments. May include:
76
+ - title : str, optional
77
+ Chart title.
78
+ - style : StyleTemplate, optional
79
+ Styling template.
80
+ - figsize : tuple, optional
81
+ Figure size as (width, height).
82
+ - Additional plot-specific parameters.
83
+
84
+ Returns
85
+ -------
86
+ Figure
87
+ The Matplotlib figure object with the plot.
88
+ """
@@ -0,0 +1,180 @@
1
+ """Box and violin plot helpers."""
2
+
3
+ from typing import Any, Optional, Tuple
4
+
5
+ import pandas as pd
6
+ import seaborn as sns
7
+ import matplotlib.pyplot as plt
8
+ from matplotlib.axes import Axes
9
+ from matplotlib.figure import Figure
10
+
11
+ from .base_plot import BasePlot
12
+
13
+ from .style_template import (
14
+ DISTRIBUTION_STYLE_TEMPLATE,
15
+ StyleTemplate,
16
+ string_formatter,
17
+ validate_dataframe,
18
+ )
19
+ from .utils import _get_axis
20
+
21
+ __all__ = ["DISTRIBUTION_STYLE_TEMPLATE", "aplot_box_violin", "fplot_box_violin"]
22
+
23
+
24
+ class BoxViolinPlot(BasePlot):
25
+ """Plot box and violin distribution charts from tabular data.
26
+
27
+ Methods
28
+ -------
29
+ aplot
30
+ Plot a box or violin chart on an existing Matplotlib axes.
31
+ fplot
32
+ Plot a box or violin chart on a new Matplotlib figure.
33
+ """
34
+
35
+ def __init__(
36
+ self,
37
+ pd_df: pd.DataFrame,
38
+ column: str,
39
+ by: Optional[str] = None,
40
+ violin: bool = False,
41
+ ):
42
+ cols = [column]
43
+ if by:
44
+ cols.append(by)
45
+ validate_dataframe(pd_df=pd_df, cols=cols)
46
+ super().__init__(pd_df=pd_df)
47
+ self.column = column
48
+ self.by = by
49
+ self.violin = violin
50
+
51
+ def aplot(
52
+ self,
53
+ title: Optional[str] = None,
54
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
55
+ ax: Optional[Axes] = None,
56
+ **kwargs: Any,
57
+ ) -> Axes:
58
+ """Plot a box or violin chart on the provided axis.
59
+
60
+ Parameters
61
+ ----------
62
+ title : str, optional
63
+ Title for the plot. The default is None.
64
+ style : StyleTemplate, optional
65
+ Style template for the plot. The default is DISTRIBUTION_STYLE_TEMPLATE.
66
+ ax : Axes, optional
67
+ Matplotlib axes to plot on. If None, use the current axes.
68
+ **kwargs : Any
69
+ Additional keyword arguments reserved for compatibility.
70
+
71
+ Returns
72
+ -------
73
+ Axes
74
+ The Matplotlib axes containing the distribution chart.
75
+ """
76
+ plot_ax = _get_axis(ax)
77
+
78
+ common_kwargs = {
79
+ "data": self._obj,
80
+ "x": self.by,
81
+ "y": self.column,
82
+ "palette": style.palette,
83
+ }
84
+
85
+ if self.violin:
86
+ sns.violinplot(**common_kwargs, hue=self.by, legend=False, ax=plot_ax)
87
+ else:
88
+ sns.boxplot(**common_kwargs, hue=self.by, legend=False, ax=plot_ax)
89
+
90
+ plot_ax.set_facecolor(style.background_color)
91
+ plot_ax.set_ylabel(string_formatter(self.column))
92
+ if self.by:
93
+ plot_ax.set_xlabel(string_formatter(self.by))
94
+ if title:
95
+ plot_ax.set_title(title)
96
+ return plot_ax
97
+
98
+ def fplot(
99
+ self,
100
+ title: Optional[str] = None,
101
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
102
+ figsize: Tuple[float, float] = (10, 6),
103
+ ) -> Figure:
104
+ """Plot a box or violin chart on a new figure.
105
+
106
+ Parameters
107
+ ----------
108
+ title : str, optional
109
+ Title for the plot. The default is None.
110
+ style : StyleTemplate, optional
111
+ Style template for the plot. The default is DISTRIBUTION_STYLE_TEMPLATE.
112
+ figsize : tuple[float, float], optional
113
+ Figure size. The default is (10, 6).
114
+
115
+ Returns
116
+ -------
117
+ Figure
118
+ The Matplotlib figure containing the distribution chart.
119
+ """
120
+ fig = Figure(
121
+ figsize=figsize,
122
+ facecolor=style.background_color,
123
+ edgecolor=style.background_color,
124
+ )
125
+ ax = Axes(fig=fig, facecolor=style.background_color)
126
+ self.aplot(
127
+ column=self.column,
128
+ by=self.by,
129
+ violin=self.violin,
130
+ title=title,
131
+ style=style,
132
+ ax=ax,
133
+ )
134
+ return fig
135
+
136
+
137
+ def aplot_box_violin(
138
+ pd_df: pd.DataFrame,
139
+ column: str,
140
+ by: Optional[str] = None,
141
+ violin: bool = False,
142
+ title: Optional[str] = None,
143
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
144
+ ax: Optional[Axes] = None,
145
+ **kwargs: Any,
146
+ ) -> Axes:
147
+ """Plot box or violin charts to summarize distributions."""
148
+ return BoxViolinPlot(
149
+ pd_df=pd_df,
150
+ column=column,
151
+ by=by,
152
+ violin=violin,
153
+ ).aplot(
154
+ title=title,
155
+ style=style,
156
+ ax=ax,
157
+ **kwargs,
158
+ )
159
+
160
+
161
+ def fplot_box_violin(
162
+ pd_df: pd.DataFrame,
163
+ column: str,
164
+ by: Optional[str] = None,
165
+ violin: bool = False,
166
+ title: Optional[str] = None,
167
+ style: StyleTemplate = DISTRIBUTION_STYLE_TEMPLATE,
168
+ figsize: Tuple[float, float] = (10, 6),
169
+ ) -> Figure:
170
+ """Plot box or violin charts on a new figure."""
171
+ return BoxViolinPlot(
172
+ pd_df=pd_df,
173
+ column=column,
174
+ by=by,
175
+ violin=violin,
176
+ ).fplot(
177
+ title=title,
178
+ style=style,
179
+ figsize=figsize,
180
+ )