iqplot.ecdf

iqplot.ecdf(data=None, q=None, cats=None, q_axis='x', palette=None, order=None, p=None, show_legend=None, legend_label=None, legend_location='right', legend_orientation='vertical', legend_click_policy='hide', tooltips=None, complementary=False, kind='collection', style=None, arrangement='overlay', conf_int=False, ptiles=(2.5, 97.5), n_bs_reps=10000, marker='circle', marker_kwargs=None, line_kwargs=None, fill_kwargs=None, horizontal=None, val=None, click_policy=None, conf_int_kwargs=None, **kwargs)

Make an ECDF plot.

Parameters:
  • data (Pandas DataFrame, 1D Numpy array, or xarray) – DataFrame containing tidy data for plotting. If a Numpy array, a single category is assumed and a box plot generated from data.

  • q (hashable) – Name of column to use as quantitative variable if data is a Pandas DataFrame. Otherwise, q is used as the quantitative axis label.

  • cats (hashable or list of hashables) – Name of column(s) to use as categorical variable(s).

  • q_axis (str, either 'x' or 'y', default 'x') – Axis along which the quantitative value varies.

  • palette (list colors, or single color string) – If a list, color palette to use. If a single string representing a color, all glyphs are colored with that color. Default is colorcet.b_glasbey_category10 from the colorcet package.

  • order (list or None) – If not None, must be a list of unique group names when the input data frame is grouped by cats. The order of the list specifies the ordering of the categorical variables in the legend. If None, the categories appear in the order in which they appeared in the inputted data frame.

  • p (bokeh.plotting.Figure instance, or None (default)) – If None, create a new figure. Otherwise, populate the existing figure p.

  • show_legend (bool, default False) – If True, display legend.

  • legend_label (str, default None) – If cats is None and show_legend is True, then if legend_label is not None, a legend is created for the glyph on the plot and labeled with legend_label. Otherwise, no legend is created if cats is None.

  • legend_location (str, default 'right') – Location of legend. If one of “right”, “left”, “above”, or “below”, the legend is placed outside of the plot area. If one of “top_left”, “top_center”, “top_right”, “center_right”, “bottom_right”, “bottom_center”, “bottom_left”, “center_left”, or “center”, the legend is placed within the plot area. If a 2-tuple, legend is placed according to the coordinates in the tuple.

  • legend_orientation (str, default 'vertical') – Either ‘horizontal’ or ‘vertical’.

  • legend_click_policy (str, default 'hide') – Either ‘hide’, ‘mute’, or None; how the glyphs respond when the corresponding category is clicked in the legend.

  • tooltips (list of 2-tuples) – Specification for tooltips as per Bokeh specifications. For example, if we want col1 and col2 tooltips, we can use tooltips=[(‘label 1’: ‘@col1’), (‘label 2’: ‘@col2’)].

  • complementary (bool, default False) – If True, plot the empirical complementary cumulative distribution function.

  • kind (str, default 'collection') – If ‘collection’, the figure is populated with a collection of ECDFs coded with colors based on the categorical variables. If ‘colored’, the figure is populated with a single ECDF with circles colored based on the categorical variables.

  • style (str, default 'staircase' for collection, 'dots' for colored) –

    The style of ECDF to make.

    • dots: Each data point is plotted as a dot.

    • staircase: ECDF is plotted as a traditional staircase.

    • formal: Strictly adhere to the definition of an ECDF.

  • conf_int (bool, default False) – If True, display confidence interval of ECDF.

  • ptiles (list, default (2.5, 97.5)) – The percentiles to use for the confidence interval. Ignored if conf_int is False.

  • n_bs_reps (int, default 10,000) – Number of bootstrap replicates to do to compute confidence interval. Ignored if conf_int is False.

  • marker (str, default 'circle') – Name of marker to be used in the plot (ignored if style is ‘staircase’). Must be one of[‘asterisk’, ‘circle’, ‘circle_cross’, ‘circle_x’, ‘cross’, ‘dash’, ‘diamond’, ‘diamond_cross’, ‘hex’, ‘inverted_triangle’, ‘square’, ‘square_cross’, ‘square_x’, ‘triangle’, ‘x’]

  • marker_kwargs (dict) – Keyword arguments to be passed to p.scatter() or other relevant marker function.

  • line_kwargs (dict) – Kwargs to be passed to p.line(), p.ray(), and p.segment().

  • fill_kwargs (dict) – Keyword arguments to pass to p.patch() when making the fill for the step-filled histogram or confidence intervals. Ignored if style = ‘step’ and conf_int is False. By default {“fill_alpha”: 0.3, “line_alpha”: 0}.

  • horizontal (bool or None, default None) – Deprecated. Use q_axis.

  • val (hashable) – Deprecated, use q.

  • click_policy (str, default 'hide') – Deprecated. Use legend_click_policy.

  • conf_int_kwargs (dict) – Deprecated. Use fill_kwargs.

  • kwargs – Any kwargs to be passed to bokeh.plotting.figure() when making the plot.

Returns:

output – Plot populated with ECDFs.

Return type:

bokeh.plotting.Figure instance