Pie Charts in MATLAB

Basic Pie Chart

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>

Pie Chart with Labels

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #999999;">,<span style="color: #808080;"><span style="color: #ff0000;">[]</span>,</span></span>labels<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>

Pie Chart with Legend

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span></span></span>

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"> datalabel=<span style="color: #0000ff;">cellstr(</span><span style="color: #00ccff;">num2str(</span>data<span style="color: #00ccff;">)</span><span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span></span></span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #808080;">,<span style="color: #ff0000;">[]</span>,</span>datalabel<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">);</span></span></span>

Pie Chart with Legend and Wedge

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;
</span>wedge=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"> datalabel=<span style="color: #0000ff;">cellstr(</span><span style="color: #00ccff;">num2str(</span>data<span style="color: #00ccff;">)</span><span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span></span></span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #808080;">,<span style="color: #000000;">wedge</span>,</span>datalabel<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span></span></span>

Title

Pie Chart with Legend and Title

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;
</span>wedge=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"> datalabel=<span style="color: #0000ff;">cellstr(</span><span style="color: #00ccff;">num2str(</span>data<span style="color: #00ccff;">)</span><span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span></span></span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #808080;">,<span style="color: #000000;">wedge</span>,</span>datalabel<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span>
title(<span style="color: #800080;">'<span style="color: #ff9900;">Population of the United Kingdom</span>'</span>)<span style="color: #ff00ff;">;</span></span></span></span>

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;
</span>wedge=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"> datalabel=<span style="color: #0000ff;">cellstr(</span><span style="color: #00ccff;">num2str(</span>data<span style="color: #00ccff;">)</span><span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span></span></span>
<span style="color: #0000ff;">pie(</span>data<span style="color: #808080;">,<span style="color: #000000;">wedge</span>,</span>datalabel<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span>
title(<span style="color: #666699;">{</span><span style="color: #800080;">'<span style="color: #ff9900;">Population of the United Kingdom</span>'<span style="color: #ff00ff;">;<span style="color: #800080;">'</span><span style="color: #ff9900;">of Great Britain and Northern Ireland</span><span style="color: #800080;">'<span style="color: #666699;">}</span></span></span></span>)<span style="color: #ff00ff;">;</span></span></span></span>

Custom Colours

To specify custom colours we must assign the pie chart to a variable. For each pie segment there will be an index of the variable associated with the segment and a second index associated with the pie segments text.

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;
</span>wedge=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"> datalabel=<span style="color: #0000ff;">cellstr(</span><span style="color: #00ccff;">num2str(</span>data<span style="color: #00ccff;">)</span><span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span></span></span>
<span style="color: #0000ff;"><span style="color: #000000;">mypie=</span>pie(</span>data<span style="color: #808080;">,<span style="color: #000000;">wedge</span>,</span>datalabel<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span>
title(<span style="color: #666699;">{</span><span style="color: #800080;">'<span style="color: #ff9900;">Population of the United Kingdom</span>';'<span style="color: #ff9900;">of Great Britain and Northern Ireland</span>'<span style="color: #666699;">}</span></span>)<span style="color: #ff00ff;">;
</span></span></span></span><span style="color: #000000;">segment1patch=<span style="color: #0000ff;">mypie(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>
segment1patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>1<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment1text=<span style="color: #0000ff;">mypie(</span>2<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment2patch=<span style="color: #0000ff;">mypie(</span>3<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment2patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>0<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment2text=<span style="color: #0000ff;">mypie(</span>4<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment3patch=<span style="color: #0000ff;">mypie(</span>5<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment3patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment3text=<span style="color: #0000ff;">mypie(</span>6<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment4patch=<span style="color: #0000ff;">mypie(</span>7<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment4patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment4text=<span style="color: #0000ff;">mypie(</span>8<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span></span>

We can also modify the transparency and text colour

<span style="color: #339966;"><strong>%% Create Data</strong></span>
<span style="color: #339966;">% UK by Population</span>
E=55619430<span style="color: #ff00ff;">;</span>
W=3125165<span style="color: #ff00ff;">;</span>
S=5424800<span style="color: #ff00ff;">;</span>
NI=1870834<span style="color: #ff00ff;">;</span>
data=<span style="color: #ff0000;">[</span>E<span style="color: #ff00ff;">;</span>W<span style="color: #ff00ff;">;</span>S<span style="color: #ff00ff;">;</span>NI<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
labels=<span style="color: #003366;">{</span><span style="color: #800080;">'</span><span style="color: #ff9900;">England</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Wales</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Scotland</span><span style="color: #800080;">'</span><span style="color: #ff00ff;">;</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Northern Ireland</span><span style="color: #800080;">'</span><span style="color: #003366;">}</span><span style="color: #ff00ff;">;
</span>wedge=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
<span style="color: #0000ff;">figure(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"> datalabel=<span style="color: #0000ff;">cellstr(</span><span style="color: #00ccff;">num2str(</span>data<span style="color: #00ccff;">)</span><span style="color: #0000ff;">)</span>;</span></span>
<span style="color: #0000ff;"><span style="color: #000000;">mypie=</span>pie(</span>data<span style="color: #808080;">,<span style="color: #000000;">wedge</span>,</span>datalabel<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;
<span style="color: #000000;"><span style="color: #0000ff;"> legend(</span>labels<span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">Location</span><span style="color: #800080;">'</span><span style="color: #999999;">,</span><span style="color: #800080;">'</span><span style="color: #ff9900;">SouthEastOutside</span><span style="color: #800080;">'</span><span style="color: #0000ff;">);
title(<span style="color: #666699;">{</span><span style="color: #800080;">'<span style="color: #ff9900;">Population of the United Kingdom</span>';'<span style="color: #ff9900;">of Great Britain and Northern Ireland</span>'<span style="color: #666699;">}</span></span>);
</span></span></span><span style="color: #000000;">segment1patch=<span style="color: #0000ff;">mypie(</span>1<span style="color: #0000ff;">)</span><span style="color: #ff00ff;">;</span>
segment1patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>1<span style="color: #999999;">,</span>1<span style="color: #999999;">,</span>0<span style="color: #ff0000;">]<span style="color: #ff00ff;">;
<span style="color: #000000;">segment1patch<span style="color: #ff0000;">.</span>FaceAlpha=0.5<span style="color: #ff00ff;">;</span>
segment1patch<span style="color: #ff0000;">.</span>EdgeColor=<span style="color: #ff0000;">[</span>1<span style="color: #808080;">,</span>0.5<span style="color: #808080;">,</span>0<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span></span></span></span>
segment1text=<span style="color: #0000ff;">mypie(</span>2<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span><span style="color: #0000ff;"><span style="color: #ff00ff;">
</span></span>segment1text<span style="color: #ff0000;">.</span>BackgroundColor = <span style="color: #ff0000;">[</span>0<span style="color: #808080;">,</span>0.5<span style="color: #808080;">,</span>1<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
segment1text<span style="color: #ff0000;">.</span>EdgeColor = <span style="color: #ff0000;">[</span>0.5<span style="color: #808080;">,</span>0.5<span style="color: #808080;">,</span>0<span style="color: #ff0000;">]</span><span style="color: #ff00ff;">;</span>
segment1text<span style="color: #ff0000;">.</span>FontSize = 28<span style="color: #ff00ff;">;</span>
segment2patch=<span style="color: #0000ff;">mypie(</span>3<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment2patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>0<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment2text=<span style="color: #0000ff;">mypie(</span>4<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment3patch=<span style="color: #0000ff;">mypie(</span>5<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment3patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>0<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment3text=<span style="color: #0000ff;">mypie(</span>6<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment4patch=<span style="color: #0000ff;">mypie(</span>7<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span>
segment4patch<span style="color: #ff0000;">.</span>FaceColor=<span style="color: #ff0000;">[</span>1<span style="color: #999999;">,</span>0<span style="color: #999999;">,</span>1<span style="color: #ff0000;">]<span style="color: #ff00ff;">;</span></span>
segment4text=<span style="color: #0000ff;">mypie(</span>8<span style="color: #0000ff;">)<span style="color: #ff00ff;">;</span></span></span>

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.