Skip to content

Comparison Charts

Here we'll talk about how to plot some comparison chart types in DEX using dx.

Setup

We will be using our own built-in DataFrame generation function for these visualizations. The values you see may be different if you run the same code in a cell, but the column structure should be very similar (if not identical).

df = dx.random_dataframe(100)

The Customized examples with more options do not necessarily represent "good" data visualization; they are just a glimpse into what settings are available to compare against the Simple examples.

Bar

Simple

dx.bar(df, x='keyword_column', y='integer_column')

df.plot.bar(x='keyword_column', y='integer_column')

Customized

dx.bar(
    df, 
    x='keyword_column', 
    y='integer_column',
    y2='float_column',
    y2_style='dot',
    horizontal=True,
    bar_width='index',
    group_other=True,
    column_sort_order="desc",
    column_sort_type="string",
    pro_bar_mode="combined",
    combination_mode="max",
    show_bar_labels=True,
)

df.plot.bar(
    x='keyword_column', 
    y='integer_column',
    y2='float_column',
    y2_style='dot',
    horizontal=True,
    bar_width='index',
    group_other=True,
    column_sort_order="desc",
    column_sort_type="string",
    pro_bar_mode="combined",
    combination_mode="max",
    show_bar_labels=True,
)

Connected Scatterplot

Coming soon!

Correlation Matrix

Coming soon!

Diverging Bar

Coming soon!

Dot Plot

Coming soon!

Radar Plot

Coming soon!

Parallel Coordinates

Coming soon!

Scatter

Simple

dx.scatter(df, x='float_column', y='integer_column')

Known Issue

df.plot.scatter() can be used unless size is specified. If you wish to use pandas syntax and provide a size argument, please use df.plot(kind='scatter', ...).

df.plot(kind='scatter', x='float_column', y='integer_column')

Customized

dx.scatter(
    df, 
    x='float_column', 
    y='integer_column',
    size='index',
    trend_line='polynomial',
    marginal_graphics='histogram',
    formula_display='r2'
)

Known Issue

df.plot.scatter() can be used unless size is specified. If you wish to use pandas syntax and provide a size argument, please use df.plot(kind='scatter', ...).

df.plot(
    kind='scatter',
    x='float_column', 
    y='integer_column',
    size='index',
    trend_line='polynomial',
    marginal_graphics='histogram',
    formula_display='r2'
)

Scatterplot Matrix

Coming soon!