Base class of all stats
Return an instantiated stat object
stats should not override this method.
Return a set of all non-computed aesthetics for this stat.
stats should not override this method.
Combine data with defaults and set aesthetics from parameters
stats should not override this method.
Modify data after the aesthetics have been mapped
This can be used by stats that require access to the mapped values of the computed aesthetics, part 3 as shown below.
stat computes and creates variables
variables mapped to aesthetics
stat sees and modifies data according to the aesthetic values
The default to is to do nothing.
Calculate statistics for this layers
This is the top-most computation method for the stat. It does not do any computations, but it knows how to verify the data, partition it call the next computation method and merge results.
stats should not override this method.
panda.DataFrame
Data points for all objects in a layer.
dict
Stat parameters
plotnine.layout.Layout
Panel layout information
Calculate the stats of all the groups and return the results in a single dataframe.
This is a default function that can be overriden by individual stats
dataframe
data for the computing
types.SimpleNamespace
x (scales.x
) and y (scales.y
) scale objects.
The most likely reason to use scale information is
to find out the physical size of a scale. e.g:
range_x = scales.x.dimension()
dict
The parameters for the stat. It includes default values if user did not set a particular parameter.
Calculate statistics for the group
All stats should implement this method
dataframe
Data for a group
types.SimpleNamespace
x (scales.x
) and y (scales.y
) scale objects.
The most likely reason to use scale information is
to find out the physical size of a scale. e.g:
range_x = scales.x.dimension()
dict
Parameters