% --- 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) SetupColors((0.7,0.7),this,this); Segment(32.5,"Lions",auto,"32500"); Segment(12.8,"Tigers",auto,"12800"); Segment(22.4,"Hyaena",auto,"22400"); Segment(18.2,"Monkeys",auto,"18200"); Segment(14.1,"Warthogs",auto,"14100"); SegmentState(2,invisible,this); SegmentState(4,this,0.3); PieChart(2cm,0.15,60,0,0); Label.auto(0)(value)(outwards,0); endfig; end;