G'Day David

Thank you very much for your example, which has somewhat enlightened me with respect to the exemplary-hidden capabilities of Maple's charting functionalities. The enhanced postscript output looks crisp and the circle can be regarded as a anti-aliased circle. However the coloring exhibits unwanted Moiré patterns indicating that the sectors might internally be generated using a suboptimal fill algorithm.

I need more something along these lines:

_PieChart := proc(p)
local P, S, L;
local i, j;
local trans := [3, 0];
local scalef := [0.5, 0.5];
local corr := [0.05, 0.05];
local angle;
local pSet;
local prob;
# Work around Maple's design considerations for formal parameters.
# The error message could be more indicative or at least show the
# offending line of code.
prob := p;
prob := sort(prob, `>`);
angle:= 2*Pi*(prob[4]+prob[5])/add(i, i = prob);
pSet[1] := [op(prob[1..3]), prob[4]+prob[5]];
pSet[2] := [prob[4], prob[5]];
for i from 1 to nops(pSet[1]) do
pSet[1][i] := i = pSet[1][i];
end do;
for j from 1 to nops(pSet[2]) do
pSet[2][j] := j+nops(pSet[1]) = pSet[2][j];
end do;
P[1] := Statistics:-PieChart(pSet[1], color = red .. yellow, scaling = constrained, captions = relative);
P[2] := Statistics:-PieChart(pSet[2], color = red .. yellow, scaling = constrained, captions = absolute);
S[1] := plottools:-translate(plottools:-scale(P[2], scalef[1], scalef[2]), trans[1], trans[2]);
L[1] := plottools:-line([1, 0], [trans[1]-corr[1], scalef[1]]);
L[2] := plottools:-line([cos(-angle), sin(-angle)], [trans[1]-corr[1], -scalef[1]]);
#plotsetup(postscript,plotoutput = cat("piechart.ps"), plotoptions = "portrait,noborder,color=cmyk");
print(plots:-display(P[1], S[1], L[1], L[2], title = "Brand spanking new"));
return NULL;
end proc:

Using a worksheet, I should like to call the function as follows, using different input vectors of probability figures. The issue at hand is that I need to dissect the vector into subsets of numbers with similar magnitudes, so one gets to see the proportions of the figures. That's why I have this zoom-into-one sector approach.

> restart;
> plotsetup(default);
> read "piechart.txt";
> Probabilities := [2.33*10^(-5), 1.632*10^(-4), 8.9*10^(-5), 2.71*10^(-6), 5.66*10^(-6)];
>_PieChart(Probabilities);

Of course this is still heaps away from my desired result, as too many things are hardcoded in the procedure and for the life of me I cannot figure out how to programmatically disable the output of this useless (at least in my pie chart) legend. Additionally, I have tried to find documentation that goes well beyond what can be found on the help pages of Maple or this forum but it has been found wanting. What I was looking for was a more in-depth information on how plot structs are created, if and how they could be manipulated from the command interface and some examples of how the following parameters influence the creation of graphs: resolution, numpoints and adaptive.

Cheers

Roberto