plotnine.geom_jitter
Scatter plot with points jittered to reduce overplotting
geom_jitter(
mapping=None,
data=None,
*,
stat="identity",
position="jitter",
na_rm=False,
inherit_aes=True,
show_legend=None,
raster=False,
width=None,
height=None,
random_state=None,
**kwargs
)Parameters
mapping : aes = None-
Aesthetic mappings created with aes. If specified and
inherit_aes=True, it is combined with the default mapping for the plot. You must supply mapping if there is no plot mapping.Aesthetic Default value x y alpha 1color 'black'fill Nonegroup shape 'o'size 1.5stroke 0.5The bold aesthetics are required.
data : DataFrame = None-
The data to be displayed in this layer. If
None, the data from from theggplot()call is used. If specified, it overrides the data from theggplot()call. stat : str | stat = "identity"-
The statistical transformation to use on the data for this layer. If it is a string, it must be the registered and known to Plotnine.
position : str | position = "jitter"-
Position adjustment. If it is a string, it must be registered and known to Plotnine.
na_rm : bool = False-
If
False, removes missing values with a warning. IfTruesilently removes missing values. inherit_aes : bool = True-
If
False, overrides the default aesthetics. show_legend : bool | dict = None-
Whether this layer should be included in the legends.
Nonethe default, includes any aesthetics that are mapped. If abool,Falsenever includes andTruealways includes. Adictcan be used to exclude specific aesthetis of the layer from showing in the legend. e.gshow_legend={'color': False}, any other aesthetic are included by default. raster : bool = False-
If
True, draw onto this layer a raster (bitmap) object even ifthe final image is in vector format. width : float = None-
Proportion to jitter in horizontal direction. The default value is that from
position_jitter height : float = None-
Proportion to jitter in vertical direction. The default value is that from
position_jitter. random_state : int | RandomState = None-
Seed or Random number generator to use. If
None, then numpy global generatornumpy.randomis used. **kwargs : Any-
Aesthetics or parameters used by the
stat.