STATISTICA







STATISTICA BASIC Scatpie.stb

{ This program will produce a Scatterplot of the X (TSAR Ranking) and Y (Customer Satisfaction) variable in Scatpie.sta (available for downloading in scatpie.zip). Each point's size is determined by another factor (Total Sales) and each point is a Pie Chart representing the proportion of Parts and Labor sales.
Program written, modified, or edited at StatSoft, Inc.
}

dim codes(2), pievalues(2);

codes(1):=1;
codes(2):=2;

graph:=NewGraph (SCATTERPLOT, '@bComparison of branch offices@b',
                 '@bCustomer Satisfaction@b', '@bTSAR Ranking@b',
                 NCases, X, Y);
GraphSetScaling (graph, AX_X, SCALING_MANUAL, -5, 5, 2);
GraphSetScaling (graph, AX_Y, SCALING_MANUAL, -5, 5, 2);

for i:=1 to ncases do
begin
  pievalues(1):=part1(i);
  pievalues(2):=part2(i);
  plot:=GraphAddPlot (graph, PIECHART, ?Name$, 2, codes, pievalues);
  GraphSetPieLayout (graph, plot, PIE_2D, PIE_CIRCLE, x(i), y(i),
                     radius(i), radius(i), 0, ?LType,?ExplSlice);
end;
GraphSetDefaultFont (Graph, ?FontName$, 14, ?Color);

GraphDrawTextParam (graph, '@bSize of pie: Total
sales@ARed:@T@TParts@AGreen:@T@TLabor@b', 'Arial', 12, BLACK,
?Orientation, AL_RIGHT, AL_BOTTOM, TRUE, FILL_OUTSIDE_BACKGROUND,
98, 2, FALSE);


for i:=1 to ncases do
  GraphDrawTextParam (graph, CaseName(i),
                      'Arial', 10, BLACK,
                      ?Orientation, AL_CENTER, AL_BOTTOM, FALSE, ?b,
				   x(i), y(i)+radius(i)/10, TRUE);
Back to List of Programs



[StatSoft]
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217

[StatSoft]e-mail: info@statsoft.com

©Copyright StatSoft, Inc., 1984-2004.
StatSoft, StatSoft logo, STATISTICA, SEWSS, SEDAS, Data Miner, SEPATH and GTrees are trademarks of StatSoft, Inc.