% --- start of displayed preamble in the book --- input piechartmp % --- end of displayed preamble in the book --- % graphic converted to gray in book using 'color2gray' defaultfont:="ptmr8r"; warningcheck:=0; beginfig(1) SetupPercent(this,"%"); Segment(15,"Lions",auto); Segment(6,"Tigers",auto); Segment(10,"Hyaena",auto); Segment(7,"Monkeys",auto); Segment(5,"Warthogs",auto); PieChart(2.5cm,0.1,65,0,0); Label(0)(percent)(inwards,0) withcolor white; Label.auto(0)(name)(outwards,0); endfig; end;