Home > Sample Charts > TraceChart > The Kite Diagram

The Kite Diagram

Trace charts are a slightly specialist style of plot, originally designed for data from devices like seismographs and EEGs where multiple pens trace out (almost) parallel lines. Each pen is allocated a tickmark on the Y-axis and then an ‘inner axis’ is created for it (naturally these inner axes are all scaled identically).

This is a very special-purpose chart, which is simply a reflected version of the surface-filled plot. It is commonly used to show vegetation coverage or the results of a pollen analysis. The example shows a count of some common tree-species recorded while walking inland from a lake-shore into the forest.


SharpPlot sp = new SharpPlot;
sp.Heading = "Sample Kite Chart";

oak = new int[] {0,0,1,2,2,3,3,3,2,1,1,0};
ash = new int[] {0,0,0,0,1,1,1,0,0,0,0,0};
birch = new int[] {0,1,1,1,2,2,2,2,2,2,1,1};
hazel = new int[] {0,1,1,2,2,2,1,0,0,0,0,0};

sp.YCaption = "Species\nobserved";
sp.YAxisStyle = YAxisStyles.AtEndCaption|YAxisStyles.GridLines;
sp.SetYLabels(new string[]{"Oak","Ash","Birch","Hazel"});
sp.XCaption = "Metres\nfrom\nShore";
sp.XAxisStyle = XAxisStyles.AtEndCaption|XAxisStyles.ArrowedAxis;
sp.MarginRight = 48;
sp.TraceChartStyle = TraceChartStyles.KiteDiagram;

sp.SetFillStyles(new FillStyle("25+#CCCC00"));  // NB - #.FillStyle.GradientRight + Orange
sp.SetColors(Color.ForestGreen);

trace = new int[][]{oak,ash,birch,hazel};
sp.DrawTraceChart(trace);

Worked Examples

tracechart1 tracechart2 tracechart3 tracechart4

Send comments on this topic
© Dyalog Ltd 2013