This is my MetaPost input file:
prologues := 3 ;
outputformat := "%j-%c.eps" ;
input piechartmp;
beginfig(1);
SetupColors((0.7, 0.7), this, this) ;
SetupPercent(this, "%") ;
Segment(64, "acc") ;
Segment(24, "bak") ;
Segment(12, "ext") ;
SegmentState(3, this, 0.3) ;
PieChart(2cm, 0.15, 60, 0,0) ;
Label.auto(0) (name) (outwards, 0) ;
Label(1)(percent) (inwards, 0) withcolor (1, 1, 0) ;
Label(2)(percent) (inwards, 0) withcolor (1, 1, 0) ;
Label(3)(percent) (inwards, 0) withcolor (1, 1, 0) ;
pickup pencircle scaled 2pt;
endfig;
end.
This is my makefile:
NAME=piechart
PDFVIEWER=acroread
all :
mptopdf ${NAME}.mp
mv -f ${NAME}.1 ${NAME}.eps
mv -f ${NAME}-1.pdf ${NAME}.pdf
${PDFVIEWER} ${NAME}.pdf &
This is the output
I want to change 2 things:
1) I want the pie "ext" to be drawn lower than the rest. How do you do that?
2) I don't want "64%" for internal label of acc, I want
the string 64% - 269 GiB
. How to do that?
outputformat
line is doing nothing by the way - you can delete it. If you wanted to produce an.eps
file directly useoutputtemplate
which has superseded the old command. But with yourmakefile
you don't need it.