GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • All
  • Best
  • Libs
  • Learn

This view

  • Original page
  • New address

GeezerVison is showing python-graph-gallery.com — Parallel coordinate plot

Parallel coordinate plot

logo of a chart:Parallel1

A parallel plot allows to compare the feature of several individual observations (series) on a set of numeric variables. Interestingly, Pandas is probably the best way to plot a parallel coordinate plot with python. Plotly is a good alternative to plot interactive versions though.

Parallel sectionAbout this chart

⏱ Quick start

Pandas is probably the best way to make a parallel coordinate plot. This library is most often used for data wrangling, but it offers a parallel_coordinates() function dedicated to it.🔥

Most basic parallel plot with Python and Pandas.

Most basic parallel plot with Python and Pandas.

# libraries
import pandas
import matplotlib.pyplot as plt
from pandas.plotting import parallel_coordinates

# Take the iris dataset
import seaborn as sns
data = sns.load_dataset('iris')

# Make the plot
parallel_coordinates(data, 'species', colormap=plt.get_cmap("Set2"))
plt.show()

Parallel coordinate chart with Python and Pandas

The following examples are dedicated to the parallel_coordinates() function of Pandas. It shows how to apply the most common types of customization.

If you need to go further, here is the complete pandas documentation

Basic parallel coordinate char

Basic parallel coordinate char

⚠️ Avoid the 61 most common dataviz mistakes

Boxplots hiding information, pie charts, cut axes, spaghetti charts... I gathered the 61 dataviz caveats I see the most as a deck of cards. Each card shows a chart that is not ideal, and a better alternative.

Get the full deck for free:

I respect your privacy. Unsubscribe anytime.

Dataviz caveat card: The spaghetti chart
61
cards

Parallel coordinate chart with Seaborn

Seaborn and its lineplot() function is another very good alternative when it comes to create parallel coordinate charts with Python.

Used in conjunction with matplotlib, it allows to reach a great level of customization as shown in the example below

Basic parallel coordinate chart with Seaborn

Basic parallel coordinate chart with Seaborn

A polished slope chart made with Python, Seaborn and Matplotlib

A polished slope chart made with Python, Seaborn and Matplotlib

Animation with pythonInteractive parallel coordinate with plotly

Plotly is a python library that makes the link with Javascript to build interactive charts that you can display in a browser.

The following example is a parallel chart made with this library and the parallel_coordinates() function.

See code

Matplotlib logoBest python parallel plot examples

The web is full of astonishing charts made by awesome bloggers, (often using R). The Python graph gallery tries to display (or translate from R) some of the best creations and explain how their source code works. If you want to display your work here, please drop me a word or even better, submit a Pull Request!

A radar chart can be an alternative to a parallel coordinate plot.

A radar chart can be an alternative to a parallel coordinate plot.

A parallel plot or slope chart with groups, legend, title and annotation.

A parallel plot or slope chart with groups, legend, title and annotation.

Related chart types

logo of a chart:Bar

Barplot

logo of a chart:Spider

Spider / Radar

logo of a chart:Wordcloud

Wordcloud

logo of a chart:Parallel1

Parallel

logo of a chart:Lollipop

Lollipop

logo of a chart:CircularBarplot

Circular Barplot

logo of a chart:TableBig

Table

300 projects

💡 Out of dataviz inspiration?

I have spent years collecting the most beautiful data visualizations out there. Get the list of my top 300 dataviz projects, hand-picked, for free.

I respect your privacy. Unsubscribe anytime.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.