Pandas plotting backend function, not meant to be called directly. To activate, set pandas.options.plotting.backend="plotly" See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py
(data_frame, kind, **kwargs)
| 79 | |
| 80 | |
| 81 | def plot(data_frame, kind, **kwargs): |
| 82 | """ |
| 83 | Pandas plotting backend function, not meant to be called directly. |
| 84 | To activate, set pandas.options.plotting.backend="plotly" |
| 85 | See https://github.com/pandas-dev/pandas/blob/master/pandas/plotting/__init__.py |
| 86 | """ |
| 87 | from .express import ( |
| 88 | scatter, |
| 89 | line, |
| 90 | area, |
| 91 | bar, |
| 92 | box, |
| 93 | histogram, |
| 94 | violin, |
| 95 | strip, |
| 96 | funnel, |
| 97 | density_contour, |
| 98 | density_heatmap, |
| 99 | imshow, |
| 100 | ) |
| 101 | |
| 102 | if kind == "scatter": |
| 103 | new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["s", "c"]} |
| 104 | return scatter(data_frame, **new_kwargs) |
| 105 | if kind == "line": |
| 106 | return line(data_frame, **kwargs) |
| 107 | if kind == "area": |
| 108 | new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["stacked"]} |
| 109 | return area(data_frame, **new_kwargs) |
| 110 | if kind == "bar": |
| 111 | return bar(data_frame, **kwargs) |
| 112 | if kind == "barh": |
| 113 | return bar(data_frame, orientation="h", **kwargs) |
| 114 | if kind == "box": |
| 115 | new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["by"]} |
| 116 | return box(data_frame, **new_kwargs) |
| 117 | if kind in ["hist", "histogram"]: |
| 118 | new_kwargs = {k: kwargs[k] for k in kwargs if k not in ["by", "bins"]} |
| 119 | return histogram(data_frame, **new_kwargs) |
| 120 | if kind == "violin": |
| 121 | return violin(data_frame, **kwargs) |
| 122 | if kind == "strip": |
| 123 | return strip(data_frame, **kwargs) |
| 124 | if kind == "funnel": |
| 125 | return funnel(data_frame, **kwargs) |
| 126 | if kind == "density_contour": |
| 127 | return density_contour(data_frame, **kwargs) |
| 128 | if kind == "density_heatmap": |
| 129 | return density_heatmap(data_frame, **kwargs) |
| 130 | if kind == "imshow": |
| 131 | return imshow(data_frame, **kwargs) |
| 132 | if kind == "heatmap": |
| 133 | raise ValueError( |
| 134 | "kind='heatmap' not supported plotting.backend='plotly'. " |
| 135 | "Please use kind='imshow' or kind='density_heatmap'." |
| 136 | ) |
| 137 | |
| 138 | raise NotImplementedError( |
nothing calls this directly
no test coverage detected