Multiple Axes

Create plots with multiple axes by specifying xaxis_sequence or yaxis_sequence. Multiple axis plots are useful for visualizing the relationship between variables that have very different units or scales. In these cases, multiple axes can help display their relationship without forcing one variable to conform to the scale of the other.

Examples

Multiple columns

When two or more response variables appear in separate columns, pass their column names to the x or y arguments. The resulting chart will have shared axes.

The xaxis_sequence or yaxis_sequence arguments can be used to create multiple axes.

Use by with multiple axes

When a single response variable has observations from several groups of data, use the by parameter to specify the grouping column.

Layering

Finally, plots can be layered to achieve multiple axes. Use the dx.layer function to accomplish this.