Skip to content

Commit 096b9b8

Browse files
authored
ENH: Improve plotting types (#278)
* ENH: Improve plotting types Add types for many inputs Clean out non-public functions * TST: Add tests for plotting Add tests Correct types * ENH: Improve types for plot() Add covered types in docs Add tests * TYP: Correct int -> float
1 parent cb48905 commit 096b9b8

File tree

15 files changed

+1039
-520
lines changed

15 files changed

+1039
-520
lines changed

pandas-stubs/core/frame.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ class DataFrame(NDFrame, OpsMixin):
12161216
by: _str | ListLike | None = ...,
12171217
ax: PlotAxes | None = ...,
12181218
fontsize: float | _str | None = ...,
1219-
rot: int = ...,
1219+
rot: float = ...,
12201220
grid: _bool = ...,
12211221
figsize: tuple[float, float] | None = ...,
12221222
layout: tuple[int, int] | None = ...,

pandas-stubs/core/groupby/generic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class DataFrameGroupBy(GroupBy):
171171
grouped: DataFrame,
172172
subplots: bool = ...,
173173
column: str | Sequence | None = ...,
174-
fontsize: int | str = ...,
174+
fontsize: float | str = ...,
175175
rot: float = ...,
176176
grid: bool = ...,
177177
ax: PlotAxes | None = ...,

pandas-stubs/plotting/__init__.pyi

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
from ._core import (
1+
from pandas.plotting._core import (
22
PlotAccessor as PlotAccessor,
33
boxplot as boxplot,
4-
boxplot_frame as boxplot_frame,
5-
boxplot_frame_groupby as boxplot_frame_groupby,
6-
hist_frame as hist_frame,
7-
hist_series as hist_series,
84
)
9-
from ._misc import (
5+
from pandas.plotting._misc import (
106
andrews_curves as andrews_curves,
117
autocorrelation_plot as autocorrelation_plot,
128
bootstrap_plot as bootstrap_plot,
13-
deregister as deregister_matplotlib_converters,
9+
deregister,
1410
lag_plot as lag_plot,
1511
parallel_coordinates as parallel_coordinates,
1612
plot_params as plot_params,
1713
radviz as radviz,
18-
register as register_matplotlib_converters,
14+
register,
1915
scatter_matrix as scatter_matrix,
2016
table as table,
2117
)
18+
19+
deregister_matplotlib_converters = deregister
20+
register_matplotlib_converters = register

0 commit comments

Comments
 (0)