Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Plots high-dimensional datasets across parallel axes
ResourceFunction["ParallelCoordinatesPlot"][mat] visualizes mat with a parallel coordinates plot. | |
ResourceFunction["ParallelCoordinatesPlot"][mat,cols] labels the plot axes that correspond to data columns with cols. | |
ResourceFunction["ParallelCoordinatesPlot"][mat,cols,ranges] determines the span of each data column in the plot by the two-column matrix ranges. |
| "AxesOrder" | Automatic | order of the axes (data columns) |
| "Colors" | Automatic | colors to be used for multiple data |
| "Direction" | "Horizontal" | direction of the plot |
| "LabelsOffset" | Automatic | offset for the axes labels |
| "PlotAxesGrid" | True | whether to plot the axes grid |
| PlotStyle | Automatic | plot style |
Visualize the rows of a matrix:
| In[1]:= |
|
| Out[2]= |
|
Visualize the rows of matrices in an association:
| In[3]:= |
|
| Out[4]= |
|
Visualize the rows of a matrix using column names:
| In[5]:= |
|
| Out[6]= |
|
Visualize the rows of a matrix using column names and axes ranges:
| In[7]:= |
|
| Out[8]= |
|
Visualize without labels for the data columns' names:
| In[9]:= |
|
| Out[10]= |
|
Here is an association of matrices with the same number of columns and different number of rows:
| In[11]:= |
|
| Out[13]= |
|
| In[14]:= |
|
| Out[14]= |
|
Here we visualize the multidimensional data of each matrix using a (combined) parallel coordinates plot:
| In[15]:= |
|
| Out[15]= |
|
Changing the axes order (the order of the data columns) might produce more informative plots:
| In[16]:= |
|
| Out[9]= |
|
The option "Colors" specifies the coloring of the rows of the different matrices:
| In[17]:= |
|
| Out[7]= |
|
For some data, it is easier to see patterns through vertical parallel coordinates plots:
| In[18]:= |
|
| Out[7]= |
|
The option "LabelsOffset" allows tweaking of the axes labels' locations:
| In[19]:= |
|
| Out[9]= |
|
If the value of the option "PlotAxesGrid" is False, then no axes grid is plotted:
| In[20]:= |
|
| Out[7]= |
|
The option PlotStyle can be used to specify how the lines corresponding to the data elements are drawn:
| In[21]:= |
|
| Out[7]= |
|
Get the "FisherIris" dataset:
| In[22]:= |
|
| Out[23]= |
|
Split the iris data into groups defined by the species column (which is the last column):
| In[24]:= |
|
| Out[25]= |
|
Use ParallelCoordinatesPlot to visualize the differences between subsets of data:
| In[26]:= |
|
| Out[26]= |
|
ParallelCoordinatesPlot can be seen as an extension of ListLinePlot:
| In[27]:= |
|
| Out[29]= |
|
| In[30]:= |
|
| Out[30]= |
|
If the first argument is an association of matrices, then the third argument (for the axes ranges) is always taken to be Automatic:
| In[31]:= |
|
| Out[31]= |
|
Make a grid of parallel coordinates plots using the "FisherIris" dataset:
| In[32]:= |
|
| Out[5]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License