Home > Sample Charts > Multiples > Applying two levels of categorisation

Applying two levels of categorisation

One of the best innovations in Tufte’s “The Visual Display of Quantitative Information” is the idea of using an array of miniature charts to display multi-dimensional data. Often a series of values are recorded at (say) several sites or on several days, then are superimposed on a single chart as a collection of dotted and dashed lines in various colors. This often makes it very hard to see the patterns and relationships in the data.

The final example shows a boxplot, where the data has been split on two of the available dimensions. The outer split is used to create the trellis, while the inner one drives each miniature chart.

This shows the patterns in the data extremely clearly, and should have made anyone very suspicious of the data from Morris. It was later noticed that the yields from this farm had been recorded with the years in the wrong order!


SharpPlot sp = new SharpPlot;
sp.SetMargins(36,12,20,0);

cameradata = new double[] {4.5,3.1,2,4.5,5,2.5,5,5,3,5,3.5,2.5,4.5,3,3,4.5,2,4,4.5,
         4.5,2.5,4.5,4.5,4.5};
cameratype = AE.Compress(6,new string[]{"Sony\nCyber-Shot\nDSC-V1",
         "Canon\nPowerShot\nG5","Nikon\nCoolPix\n5400","Olympus\nCamedia\nC-5060"});
cameracap = new string[]{"Résolution","Rendu","Couleur","Sensibilité","Flash",
         "Autofocus","Rapidité"};

sp.SplitBy(cameratype);  // Sets trellis

sp.SetFillStyles(FillStyle.Opacity42);
sp.SetColors(Color.Red);
sp.SetMarkers(Marker.SmallBullet);
sp.SetLineStyles(LineStyle.Solid);
sp.SetPenWidths(1);

sp.PolarChartStyle = PolarChartStyles.SurfaceShading|PolarChartStyles.GridLines|
         PolarChartStyles.Markers;
sp.YAxisStyle = YAxisStyles.ForceZero;
sp.SetXLabels(cameracap);
sp.XLabelFormat = "XXXXXXXX;";
sp.SetLabelFont("Arial",6,Color.Black);
sp.SetCaptionFont("Arial",14,FontStyle.Bold,Color.Black);

sp.DrawMultiple(ChartType.PolarChart,cameradata);

Worked Examples

multiple1 multiple2 multiple3 multiple4

Send comments on this topic
© Dyalog Ltd 2013