<jupyter_start><jupyter_text>Enrichment Plot A function to plot step plots of cumulative counts. > from mlxtend.general_plotting import category_scatter  Overview In enrichment plots, the y-axis can be interpreted as "how many samples are less or equal to the corresponding x-axis label."  References- -  Example 1 - Enrichment Plots from Pandas DataFrames<jupyter_code>import pandas as pd
s1 = [1.1, 1.5]
s2 = [2.1, 1.8]
s3 = [3.1, 2.1]
s4 = [3.9, 2.5]
data = [s1, s2, s3, s4]
df = pd.DataFrame(data, columns=['X1', 'X2'])
df<jupyter_output><empty_output><jupyter_text>Plotting the data where the categories are determined by the unique values in the label column `label_col`. The `x` and `y` values are simply the column names of the DataFrame that we want to plot.<jupyter_code>import matplotlib.pyplot as plt
from mlxtend.plotting import enrichment_plot

ax = enrichment_plot(df, legend_loc='upper left')<jupyter_output><empty_output><jupyter_text>API<jupyter_code>with open('../../api_modules/mlxtend.plotting/enrichment_plot.md', 'r') as f:
    print(f.read())<jupyter_output>## enrichment_plot

*enrichment_plot(df, colors='bgrkcy', markers=' ', linestyles='-', alpha=0.5, lw=2, where='post', grid=True, count_label='Count', xlim='auto', ylim='auto', invert_axes=False, legend_loc='best', ax=None)*

Plot stacked barplots

**Parameters**

- `df` : pandas.DataFrame

    A pandas DataFrame where columns represent the different categories.
    colors: str (default: 'bgrcky')
    The colors of the bars.

- `markers` : str (default: ' ')

    Matplotlib markerstyles, e.g,
    'sov' for square,circle, and triangle markers.

- `linestyles` : str (default: '-')

    Matplotlib linestyles, e.g.,
    '-,--' to cycle normal and dashed lines. Note
    that the different linestyles need to be separated by commas.

- `alpha` : float (default: 0.5)

    Transparency level from 0.0 to 1.0.

- `lw` : int or float (default: 2)

    Linewidth parameter.

- `where` : {'post', 'pre', 'mid'} (default: 'post')

    Starting location of the steps.

- `grid` : bool (default: `True`)

 [...]
{'fraction_non_alphanumeric': 0.13320555821753713, 'fraction_numerical': 0.01772879731672257, 'mean_word_length': 4.3538461538461535, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '536526', 'license': 'MIT', 'n_tokens_mistral': 754, 'n_tokens_neox': 712, 'n_words': 227, 'path': 'mlxtend/docs/sources/user_guide/plotting/enrichment_plot.ipynb', 'repo_name': 'WhiteWolf21/fp-growth', 'size': '2087'}