2

I tried the legend to the south code from this question (see code below): Pie chart with joined legend position

but it unfortunately does not work.

If i change yshift to a fixed value it work. BUT only when i compile it in overleaf - if I compile it with textstudio it does not.

Can someone tell me whats the problem with overleaf vs. my local latex distribution?

\documentclass[border=5pt, tikz]{standalone}
\usepackage{pgf-pie}

\begin{document} \tikzset{ legend to the south/.code={ \coordinate[xshift=-1.5cm, yshift=(\value{pgfpie@sliceLength}0.5+1)0.5cm-4em] (legendpos) at (current bounding box.south);}, }

\begin{tikzpicture}[ every path/.style={draw=white, very thick} ] \pie[square, scale font, color = {blue!10, blue!20, blue!40}, sum=auto, text=legend, after number = {%}, style={legend to the south} ]{58/Unidentifiable ML,25/MOP only,11/SMO only,6/MOP & SMP} \end {tikzpicture} \end{document}

  • Comment (%) the line: 'style={legend to the south}' or see https://tex.stackexchange.com/questions/503651/pie-chart-with-joined-legend-position?noredirect=1&lq=1 – Raffaele Santoro Jan 24 '22 at 12:05
  • @RaffaeleSantoro: The legend to the south part is what i want to achieve. The example you reference is the one i try to implement but is not working. – Jessica Walther Jan 24 '22 at 16:41

1 Answers1

0

The solution from Pie chart with joined legend position is prior to pgf-pie v0.4 in which they moved the definitions from .cls to .tex.

What I did was to download the pgf-pie v0.3 .cls file as pgf-pie3.cls and import it locally. Then I used fixed positions for xshift and yshift:

    \tikzset{
    legend to the south/.code={{
    \coordinate[xshift=-1.5cm, yshift=2mm] (legendpos) at
    (current bounding box.south);}},
    }