A Simple Weighted Scatter

This chart is a variant of the standard ScatterPlot with the size of the markers used to show an extra dimension in the data. The third argument gives the required marker area (typically the number of incidents recorded at a certain location) and all the markers are automatically scaled to cover the range of areas given.

This is the most obvious use of the bubblechart. Three vectors of data are provided, giving the x,y co-ordinates of each value and a count of the number of items at that point.

Note that this chart adds Value tags to the markers to give an exact value for the count at that point.

BubbleChart1
SharpPlot sp = new SharpPlot();
ydata = new int[] {190,270,310,120,190,230};
xdata = new int[] {17,31,29,14,16,24};
count = new int[] {12,65,77,7,9,112};

sp.Heading = "Incident count";
sp.SetXTickMarks(5);
sp.SetYTickMarks(50);
sp.SetMarkers(MarkerStyle.Bullet);
sp.BubbleChartStyle = BubbleChartStyles.GridLines|BubbleChartStyles.ValueTags;
sp.SetValueTags(count);
sp.SetValueFont("Arial",10);
sp.DrawBubbleChart(ydata,xdata,count);
sp.SetKeyText("Number of Incidents");

See also

BubbleChart1 BubbleChart2 BubbleChart3 BubbleChart4