Visualization Overview

Brett Champion, Wolfram Research

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

Introduction

During this talk, we will explore recent and future improvements and additions to the visualization features available in the Wolfram Language. Topics will include visualizing multidimensional data and new ways to style plots and charts for aesthetic and functional purposes.

Things (mostly) Not Covered Here

({{Vector Field Visualizations}, {Tim McDevitt, 10:30 Today}})

({{Geographic Visualizations}, {Nirmal Malapaka, 11:00 Today}})

({{Axes and Scales}, {MinHsuan Peng, 1:00 Today}})

({{Visualization Office Hours}, {Vis and Graphics Team, 2:00 Today}})

({{General Graphics}, {James Lane, 11:30 Thursday
Alec Shedelbower, 11:00 Friday
Yuzhu Lu, Noon Friday}})

V12.3: ListLinePlot3D

ListLinePlot3D is a new function, filling a gap between ListPointPlot3D and ListPlot3D. There are two behaviors, depending on the type of data given.

Curve through a set of points in 3D:

ListLinePlot3D[Table[{(Sqrt[t]) Cos[t],(Sqrt[t]) Sin[t],(Sqrt[t])},{t,0,20,0.2}],Filling->Bottom]

ListLinePlot3D[Table[AnglePath3D[RandomReal[{0°,20°},{1000,3}]],3],BoxRatios->Automatic]

Ridgeline plots through tabular data:

ListLinePlot3D[{{0,1,1,1,1},{2,2,2,2,2},{3,3,3,3,3},{4,4,4,5,5}},Filling->Bottom]

daylight=;

ListLinePlot3D[daylight,Filling->Bottom]

Time series are handled the same way:

companies={LinguisticAssistant,LinguisticAssistant,LinguisticAssistant,LinguisticAssistant};

data=EntityValue[companies,EntityProperty["Financial","CumulativeFractionalChange",{"Date"->Interval[{(DateObject["Wed 1 Jan 2020", DateObject[{2020,1,1},"Day"]]),(DateObject["Thu 31 Dec 2020", DateObject[{2020,12,31},"Day"]])}]}]];

ListLinePlot3D[data,Filling->Axis,PlotLegends->companies]

V13.0: Infinite Plots

In order to make it easier to visualize the asymptotic behavior of functions, we’re adding the ability to plot over infinite domains.

Plot[((x Sin[x]+Log[x])/(x Log[x])),{x,1,100}]

Plot[((x Sin[x]+Log[x])/(x Log[x])),{x,1,Infinity}]

Limit[((x Sin[x]+Log[x])/(x Log[x])),x->Infinity]

V13.0: Multipanel Expansion

For a few versions, functions like ListPlot have had the ability to create grids of sub-plots with shared axes:

ListLinePlot[Table[Mod[Range[100],Prime[i]],{i,4}],PlotLayout->{"Row",2}]

This has now been expanded to many more functions:

Plot, LogPlot, etc...

Plot[{BesselJ[1,x],BesselJ[2,x],BesselJ[3,x],BesselJ[4,x],BesselJ[5,x],BesselJ[6,x]},{x,0,20},Filling->Axis,PlotLayout->{"Row",2}]

Density and Contour Plots

DensityPlot[{Cos[2y] Sin[3 x],Cos[4 y] Sin[3 x],Cos[2 y] Sin[5 x],3Cos[4 y] Sin[5 x]},{x,0,10},{y,0,10},PlotLayout->{"Row",2}]

Vector and Stream Plots

StreamPlot[{{y,-x},{x,y-x}},{x,-3,3},{y,-3,3},PlotLayout->"Row"]

Bar and Pie Charts

PieChart[{{1,1,1},{1,2,2},{2,2,3}},ChartLayout->"Row"]

Histograms

SmoothHistogram[Table[RandomVariate[WeibullDistribution[i,(Sqrt[i])],500],{i,6}],PlotLayout->{"Row",2}]

V13.0: Multiaxis Plots

Show different datasets on different axes in a plot.

ListLinePlot[{PrimePi[Range[100]], EulerPhi[Range[100]]},MultiaxisArrangement->All]

Let’s look at an example from finance:

companies={LinguisticAssistant,LinguisticAssistant,LinguisticAssistant};

price=EntityValue[companies,EntityProperty["Financial","Close",{"Date"->Interval[{(DateObject["Wed 1 Jan 2020", DateObject[{2020,1,1},"Day"]]),(DateObject["Thu 31 Dec 2020", DateObject[{2020,12,31},"Day"]])}]}]];

ListLinePlot[price,PlotLabels->companies]

ListLinePlot[price,MultiaxisArrangement->All]

Specify the placement of the axes for each curve:

ListLinePlot[price,MultiaxisArrangement->{Left->{1,3},Right->{2}}]

Have two of the curves share an axis:

ListLinePlot[price,MultiaxisArrangement->{Left->{{1,3}},Right->{2}}]

V13.0: AbsoluteOptions Overhaul

AbsoluteOptions has been completely reimplemented, and is much more accurate.

scene=Graphics[{{GrayLevel[0.1],Rectangle[Scaled[{0,0}],Scaled[{1,1}]]},Table[Translate[Scale[Rotate[{Hue[i/200],Rectangle[{0,0},{1,1}]},i],(Sqrt[2i])],{i Sin[i],i Cos[i]}],{i,200}]},Frame->True]

V13.0

Column[AbsoluteOptions[scene,{PlotRange,AspectRatio,ImagePadding,FrameTicks}]]

V12.3

Column[AbsoluteOptions[scene,{PlotRange,AspectRatio,ImagePadding,FrameTicks}]]

V12.2: RadialAxisPlot

(HyperlinkDefault[RadialAxisPlot, paclet:ref/RadialAxisPlot, paclet:ref/RadialAxisPlot]) displays an n-dimensional point {(Subscript[x, 1]),(Subscript[x, 2]),…,(Subscript[x, n])} by putting the coordinate values on axis arranged around a central point:

RadialAxisPlot[{1,2,3,4,5}]

You can compare multiple points by plotting them on the same axes:

RadialAxisPlot[{{1,2,3,4,5},{4,7,3,2,6}}]

We can also use a grid layout for RadialAxisPlot, in which case the axes are kept the same across all the components:

RadialAxisPlot[{{1,2,3,4,5},{4,7,3,2,6}},PlotLayout->"Row"]

If possible, all the axes use the same scale, but you can also allow each axis to be scaled independently:

RadialAxisPlot[{{1,2,3,4,5},{4,7,3,2,6}},PlotRange->All]

The axes are automatically scaled independently if it’s clear that there is something different between the axes.

RadialAxisPlot[{1,2,3,4,5},PlotRange->{1->{0,20}}]

As seen above, RadialAxisPlot and ParallelAxisPlot extend the specifications for axis-related options like PlotRange, ScalingFunctions, Ticks, and AxesLabel to allow a rule-based syntax.

RadialAxisPlot[{1,2,3,4,5},AxesStyle->{_?EvenQ->Red,_->Blue}]

V12.2: ParallelAxisPlot

ParallelAxisPlot is similar in concept to RadialAxisPlot, with the main visual difference being that the axes are all parallel to each other, instead of connecting at one central point:

ParallelAxisPlot[{{1,2,3,4,5},{4,7,3,2,6}}]

ParallelAxisPlot is read in the same way you’d read a ListPlot of a subset of coordinates. In the following example, the first dataset (blue) is separate from the second (yellow) and third (green) across all the dimensions of the data. The second and third are similar for dimensions one through three, but differ in the fourth and fifth:

pdata={RandomReal[{1,1.2},{3,5}],RandomReal[{2,2.2},{3,5}],Table[Join[RandomReal[{2,2.2},3],RandomReal[{3,3.2},2]],3]};

ParallelAxisPlot[pdata]

{ListPlot[pdata[[All,All,{1,2}]],],ListPlot[pdata[[All,All,{4,5}]],],ListPlot[pdata[[All,All,{3,4}]],]}

V12.2: PointValuePlot

PointValuePlot is a function that is designed to help make sense of location data that has annotations associated with each location. It tries to make it easy to map the annotation data to visual indicators such as size, color, and shape.

In this case the annotations are mapped to colors:

PointValuePlot[Table[RandomReal[10,2]->RandomReal[],20],PlotLegends->Automatic]

In this case, the annotations are from a small set of values, so we use discrete colors instead of a gradient:

PointValuePlot[Table[RandomReal[10,2]->RandomInteger[3],20],PlotStyle->PointSize[Large],PlotLegends->Automatic]

For vector-valued annotations, we can use individual plots at each point:

pairs=Table[RandomReal[10,2]->RandomReal[1,2],20]

PointValuePlot[pairs,PlotLegends->Automatic]

Choose how to encode specific annotations in the data:

PointValuePlot[pairs,{1->"Color",2->"Size"},PlotLegends->Automatic]

PointValuePlot[pairs,{2->"Color",1->"Size"},PlotLegends->Automatic]

The locations can be geographic as well:

PointValuePlot[Table[RandomGeoPosition[LinguisticAssistant]->{RandomInteger[3],RandomReal[100]},20],PlotLegends->Automatic]

V12.2: ArrayPlot3D

The next version introduces a 3D version of ArrayPlot, useful for visualizing the evolution of 2D cellular automata or individual states of 3D automata.

ArrayPlot3D[CellularAutomaton["GameOfLife",RandomInteger[1,{50,50}],50]]

Plot the evolution of a 3-color, 2D cellular automaton:

ArrayPlot3D[CellularAutomaton[{1635,{3,1},{1,1}},{{{1}},0},25],Mesh->None]