pandas 1.4.2

Authors of third-party plotting backends should implement a module with a public plot(data, kind, **kwargs) . The parameter :None:None:`data` will contain the data structure and can be a Series or a DataFrame . For example, for df.plot() the parameter :None:None:`data` will contain the DataFrame :None:None:`df`. In some cases, the data structure is transformed before being sent to the backend (see PlotAccessor.__call__ in pandas/plotting/_core.py for the exact transformations).

The parameter kind will be one of:

See the pandas API reference for documentation on each kind of plot.

Any other keyword argument is currently assumed to be backend specific, but some parameters may be unified and added to the signature in the future (e.g. title which should be useful for any backend).

Currently, all the Matplotlib functions in pandas are accessed through the selected backend. For example, pandas.plotting.boxplot (equivalent to :None:None:`DataFrame.boxplot`) is also accessed in the selected backend. This is expected to change, and the exact API is under discussion. But with the current version, backends are expected to implement the next functions:

Use the code in pandas/plotting/_matplotib.py and https://github.com/pyviz/hvplot as a reference on how to write a backend.

For the discussion about the API see https://github.com/pandas-dev/pandas/issues/26747.

Plotting public API.

Plotting public API.

Authors of third-party plotting backends should implement a module with a public plot(data, kind, **kwargs) . The parameter :None:None:`data` will contain the data structure and can be a Series or a DataFrame . For example, for df.plot() the parameter :None:None:`data` will contain the DataFrame :None:None:`df`. In some cases, the data structure is transformed before being sent to the backend (see PlotAccessor.__call__ in pandas/plotting/_core.py for the exact transformations).

The parameter kind will be one of:

See the pandas API reference for documentation on each kind of plot.

Any other keyword argument is currently assumed to be backend specific, but some parameters may be unified and added to the signature in the future (e.g. title which should be useful for any backend).

Currently, all the Matplotlib functions in pandas are accessed through the selected backend. For example, pandas.plotting.boxplot (equivalent to :None:None:`DataFrame.boxplot`) is also accessed in the selected backend. This is expected to change, and the exact API is under discussion. But with the current version, backends are expected to implement the next functions:

Use the code in pandas/plotting/_matplotib.py and https://github.com/pyviz/hvplot as a reference on how to write a backend.

For the discussion about the API see https://github.com/pandas-dev/pandas/issues/26747.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/plotting/__init__.py#0
type: <class 'module'>
Commit: