Customizing Half Pie Chart Labels with tikzPackage for pie chartsDecimal values in polar pie chartPie Chart with datatoolLabels close to pie chart figuresHelp with pie chartPie chart with bar chart magnificationPie chart color problemPie Chart without labels in beamer using pgf-piePie Chart Doesn't ClosePie chart labelsTikz - Pie chart with many data

Shall I use personal or official e-mail account when registering to external websites for work purpose?

Is std::next for vector O(n) or O(1)?

Supply current of negative rail

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Was there ever an axiom rendered a theorem?

How would photo IDs work for shapeshifters?

Why can Shazam fly?

Is it wise to focus on putting odd beats on left when playing double bass drums?

Is it possible to build an equivalent function just looking at the input and output of the original function?

Is this food a bread or a loaf?

Can I find out the caloric content of bread by dehydrating it?

What is the steepest angle that a canal can be traversable without locks?

Are white and non-white police officers equally likely to kill black suspects?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

I see my dog run

What does "rabbited" mean/imply in this sentence?

Is it worth rebuilding a wheel myself to save money

If a centaur druid Wild Shapes into a Giant Elk, do their Charge features stack?

Access elements in std::string where positon of string is greater than its size

"My colleague's body is amazing"

Why is the design of haulage companies so “special”?

Why is my log file so massive? 22gb. I am running log backups

What do the Banks children have against barley water?

Dual Citizen. Exited the US on Italian passport recently



Customizing Half Pie Chart Labels with tikz


Package for pie chartsDecimal values in polar pie chartPie Chart with datatoolLabels close to pie chart figuresHelp with pie chartPie chart with bar chart magnificationPie chart color problemPie Chart without labels in beamer using pgf-piePie Chart Doesn't ClosePie chart labelsTikz - Pie chart with many data













0















There's a nice answer to a pie chart question over here. I tried to bend it to my needs but found some aspects difficult. Specifically:




  • I'd like to be able to manually adjust the labels.



    • Rather than adding the degree labels
      (newcommanddegre$^circ$, I assume), I just want to be able
      to write something in manually, like a year or date or note or the
      variable name for instance.


    • I'd liked to have the option of replacing the percentage labels with
      something else too, like the actual value shown in the legend
      perhaps.


    • And finally, the numbers aren't formatted nicely. For instance, the
      value 1236 should ideally be written as 1,236.




Is this kind of customization possible? There are various similar questions about other pie chart designs, but this design is a bit different to most I've seen. Anyway the current code is below.




PS: I kept getting lost in it, so to make reading a bit quicker and easier, I've set:
begindocument through enddocument in bold, and:
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E in italics, so you can identify it at a glance.




chart



documentclass[margin=5pt]article
usepackage[svgnames]xcolor
usepackagetikz,fourier,ifthen
usetikzlibrarycalc

newcommanddegre$^circ$

colorletcolor0blue!40
colorletcolor1orange!60
colorletcolor2DarkGreen!40
colorletcolor3yellow!60
colorletcolor4red!60
colorletcolor5blue!60!cyan!60
colorletcolor6cyan!60!yellow!60
colorletcolor7red!60!cyan!60
colorletcolor8red!60!blue!60
colorletcolor9orange!60!cyan!60


makeatletter
tikzset%
dc tag/.style=align=center,
dc legend/.style=align=left,anchor=west,
dc sector/.style=fill=Cj,line join=round


pgfkeys/DiagCirc/.cd,
% list of Name/Value
value list/.store in=Value@list,
% circular : 360 - semi circular 180
angle max/.store in=Angle@max,
angle max=360,
% radius of the diagram
radius/.store in=R@dius,
radius=4cm,
% composition of the legend
% V value
% N name
% P percent
% A angle
% Cj color
legend/.store in=L@gend,
legend=,
% location of the legend
legend location/.store in=Legend@Loc,
legend location=($(R@dius,R@dius)+(.5,-.5)$),
% poisition of the node in the sector
% 0 center, 1 on the edge, 1.++ external
factor/.store in=F@ctor,
factor=.80,
% composition of the node in the sector
tags/.store in=T@gs,
tags=,
% correction of round errors in percents
percent corr/.store in=C@rrP,
percent corr=,
% correction of round errors in angles
angle corr/.store in=C@rrA,
angle corr=,
% individual shift
shift sector/.store in=Shift@j,
shift sector=,
% more nodes in the sectors, or new legeng
sup loop/.store in=Sup@Loop,
sup loop=,
% code of the diagram
diagram/.code=%
% Calculation of the sum
pgfmathsetmacroS@m0
foreach i/y in Value@list xdefS@mS@m+i
pgfmathsetmacroS@mS@m
pgfmathsetmacroC@effAngle@max/S@m

% beginning of the first sector
xdef@ngleA0

% main loop
foreach V/N [count=j from 0] in Value@list %

% calculation of the current angle
pgfmathsetmacroAV*C@eff

% superior limit of the sector
pgfmathsetmacro@ngleB@ngleA+A ;

% mean angle
pgfmathsetmacroMedA(@ngleA+@ngleB)/2 ;

% color
pgfmathtruncatemacro@kmod(j,10)
defCjcolor@k

% individual shift
ifthenelseequalShift@j%
edefSh@ft0%
pgfmathparsearray(Shift@j,j)
edefSh@ftpgfmathresult


% drawing of the sector
draw[dc sector,shift=(MedA:Sh@ft)] (0,0)
-- (@ngleA:R@dius) arc (@ngleA:@ngleB:R@dius)
node[midway] (DCj) -- cycle ;

% low limit of the next sector
xdef@ngleA@ngleB ;

% current percent correction
pgfmathtruncatemacroPround(V/S@m*100)
ifthenelseequalC@rrP%
pgfmathparsearray(C@rrP,j)
pgfmathtruncatemacroPP+pgfmathresult

edefPP,%

% current angle and corection
pgfmathtruncatemacroAround(A)
ifthenelseequalC@rrA%
pgfmathparsearray(C@rrA,j)
pgfmathtruncatemacroAA+pgfmathresult
edefAA,degre


% the sector node
ifthenelseequalT@gs%
DiagNode[dc tag]F@ctor T@gs ;


% the legend
ifthenelseequalL@gend%
beginscope[shift=Legend@Loc]
draw[fill=Cj] (0,-.5*j)
rectangle ++(.25,.25) ++(0,-.15)
node[dc legend] strutL@gend ;
endscope


% some more stuff
Sup@Loop ;


% end of diagram code

makeatother

% Node on the j sector
newcommandDiagNode[2][]node[#1] at ($(0,0)!#2!(DCj)$)

begindocument

begintikzpicture
path[%
% style options
dc sector/.append style=shift=(MedA:5pt), % shift all sectors
dc dtag/.append style=,
dc legend/.append style=text width=2cm, align=right,
every pin/.style=fill=Cj,draw=Cj!50!black,thick,
% diagram options
/DiagCirc/.cd,
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E,
angle max=180, % semi-circular
angle corr=0,1,0,0,0, % correct round angle error
legend=N :hfill V, % custom legend
factor=.9,
percent corr=0,-1,0,0,0, % correct round percent error
shift sector=0,0,.3,0,0, % shift individual sector
tags=P, % custom sector nodes
sup loop=% custom features :
%DiagNode1.1 N; % some other sector nodes
% or something else
defPin10,40,150,120,150
pgfmathparsearray(Pin,j)
edefPinjpgfmathresult
node[pin=Pinj:A] at (DCj) ;
,
diagram] ;

endtikzpicture
enddocument










share|improve this question
























  • Straight up solutions are welcome, but what would be really nice is if you could also explain a little bit about how it works, so anyone reading can maybe solve similar problems on their/my own in the future. Teach a man to fish and all that. No pressure though, just a suggestion.

    – tjt263
    21 mins ago











  • PPS: Someone removed the pstricks tag. I used that tag because I also experimented with that package as per the designs on the page I linked to. It seemed simpler, but I still couldn't quite figure it out, despite having some quite nice documentation. I think tikz tends to look nicer and I'm a bit familiar with it from drawing other types of charts and diagrams, but if you use pstricks or whatever, feel free.

    – tjt263
    12 mins ago
















0















There's a nice answer to a pie chart question over here. I tried to bend it to my needs but found some aspects difficult. Specifically:




  • I'd like to be able to manually adjust the labels.



    • Rather than adding the degree labels
      (newcommanddegre$^circ$, I assume), I just want to be able
      to write something in manually, like a year or date or note or the
      variable name for instance.


    • I'd liked to have the option of replacing the percentage labels with
      something else too, like the actual value shown in the legend
      perhaps.


    • And finally, the numbers aren't formatted nicely. For instance, the
      value 1236 should ideally be written as 1,236.




Is this kind of customization possible? There are various similar questions about other pie chart designs, but this design is a bit different to most I've seen. Anyway the current code is below.




PS: I kept getting lost in it, so to make reading a bit quicker and easier, I've set:
begindocument through enddocument in bold, and:
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E in italics, so you can identify it at a glance.




chart



documentclass[margin=5pt]article
usepackage[svgnames]xcolor
usepackagetikz,fourier,ifthen
usetikzlibrarycalc

newcommanddegre$^circ$

colorletcolor0blue!40
colorletcolor1orange!60
colorletcolor2DarkGreen!40
colorletcolor3yellow!60
colorletcolor4red!60
colorletcolor5blue!60!cyan!60
colorletcolor6cyan!60!yellow!60
colorletcolor7red!60!cyan!60
colorletcolor8red!60!blue!60
colorletcolor9orange!60!cyan!60


makeatletter
tikzset%
dc tag/.style=align=center,
dc legend/.style=align=left,anchor=west,
dc sector/.style=fill=Cj,line join=round


pgfkeys/DiagCirc/.cd,
% list of Name/Value
value list/.store in=Value@list,
% circular : 360 - semi circular 180
angle max/.store in=Angle@max,
angle max=360,
% radius of the diagram
radius/.store in=R@dius,
radius=4cm,
% composition of the legend
% V value
% N name
% P percent
% A angle
% Cj color
legend/.store in=L@gend,
legend=,
% location of the legend
legend location/.store in=Legend@Loc,
legend location=($(R@dius,R@dius)+(.5,-.5)$),
% poisition of the node in the sector
% 0 center, 1 on the edge, 1.++ external
factor/.store in=F@ctor,
factor=.80,
% composition of the node in the sector
tags/.store in=T@gs,
tags=,
% correction of round errors in percents
percent corr/.store in=C@rrP,
percent corr=,
% correction of round errors in angles
angle corr/.store in=C@rrA,
angle corr=,
% individual shift
shift sector/.store in=Shift@j,
shift sector=,
% more nodes in the sectors, or new legeng
sup loop/.store in=Sup@Loop,
sup loop=,
% code of the diagram
diagram/.code=%
% Calculation of the sum
pgfmathsetmacroS@m0
foreach i/y in Value@list xdefS@mS@m+i
pgfmathsetmacroS@mS@m
pgfmathsetmacroC@effAngle@max/S@m

% beginning of the first sector
xdef@ngleA0

% main loop
foreach V/N [count=j from 0] in Value@list %

% calculation of the current angle
pgfmathsetmacroAV*C@eff

% superior limit of the sector
pgfmathsetmacro@ngleB@ngleA+A ;

% mean angle
pgfmathsetmacroMedA(@ngleA+@ngleB)/2 ;

% color
pgfmathtruncatemacro@kmod(j,10)
defCjcolor@k

% individual shift
ifthenelseequalShift@j%
edefSh@ft0%
pgfmathparsearray(Shift@j,j)
edefSh@ftpgfmathresult


% drawing of the sector
draw[dc sector,shift=(MedA:Sh@ft)] (0,0)
-- (@ngleA:R@dius) arc (@ngleA:@ngleB:R@dius)
node[midway] (DCj) -- cycle ;

% low limit of the next sector
xdef@ngleA@ngleB ;

% current percent correction
pgfmathtruncatemacroPround(V/S@m*100)
ifthenelseequalC@rrP%
pgfmathparsearray(C@rrP,j)
pgfmathtruncatemacroPP+pgfmathresult

edefPP,%

% current angle and corection
pgfmathtruncatemacroAround(A)
ifthenelseequalC@rrA%
pgfmathparsearray(C@rrA,j)
pgfmathtruncatemacroAA+pgfmathresult
edefAA,degre


% the sector node
ifthenelseequalT@gs%
DiagNode[dc tag]F@ctor T@gs ;


% the legend
ifthenelseequalL@gend%
beginscope[shift=Legend@Loc]
draw[fill=Cj] (0,-.5*j)
rectangle ++(.25,.25) ++(0,-.15)
node[dc legend] strutL@gend ;
endscope


% some more stuff
Sup@Loop ;


% end of diagram code

makeatother

% Node on the j sector
newcommandDiagNode[2][]node[#1] at ($(0,0)!#2!(DCj)$)

begindocument

begintikzpicture
path[%
% style options
dc sector/.append style=shift=(MedA:5pt), % shift all sectors
dc dtag/.append style=,
dc legend/.append style=text width=2cm, align=right,
every pin/.style=fill=Cj,draw=Cj!50!black,thick,
% diagram options
/DiagCirc/.cd,
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E,
angle max=180, % semi-circular
angle corr=0,1,0,0,0, % correct round angle error
legend=N :hfill V, % custom legend
factor=.9,
percent corr=0,-1,0,0,0, % correct round percent error
shift sector=0,0,.3,0,0, % shift individual sector
tags=P, % custom sector nodes
sup loop=% custom features :
%DiagNode1.1 N; % some other sector nodes
% or something else
defPin10,40,150,120,150
pgfmathparsearray(Pin,j)
edefPinjpgfmathresult
node[pin=Pinj:A] at (DCj) ;
,
diagram] ;

endtikzpicture
enddocument










share|improve this question
























  • Straight up solutions are welcome, but what would be really nice is if you could also explain a little bit about how it works, so anyone reading can maybe solve similar problems on their/my own in the future. Teach a man to fish and all that. No pressure though, just a suggestion.

    – tjt263
    21 mins ago











  • PPS: Someone removed the pstricks tag. I used that tag because I also experimented with that package as per the designs on the page I linked to. It seemed simpler, but I still couldn't quite figure it out, despite having some quite nice documentation. I think tikz tends to look nicer and I'm a bit familiar with it from drawing other types of charts and diagrams, but if you use pstricks or whatever, feel free.

    – tjt263
    12 mins ago














0












0








0








There's a nice answer to a pie chart question over here. I tried to bend it to my needs but found some aspects difficult. Specifically:




  • I'd like to be able to manually adjust the labels.



    • Rather than adding the degree labels
      (newcommanddegre$^circ$, I assume), I just want to be able
      to write something in manually, like a year or date or note or the
      variable name for instance.


    • I'd liked to have the option of replacing the percentage labels with
      something else too, like the actual value shown in the legend
      perhaps.


    • And finally, the numbers aren't formatted nicely. For instance, the
      value 1236 should ideally be written as 1,236.




Is this kind of customization possible? There are various similar questions about other pie chart designs, but this design is a bit different to most I've seen. Anyway the current code is below.




PS: I kept getting lost in it, so to make reading a bit quicker and easier, I've set:
begindocument through enddocument in bold, and:
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E in italics, so you can identify it at a glance.




chart



documentclass[margin=5pt]article
usepackage[svgnames]xcolor
usepackagetikz,fourier,ifthen
usetikzlibrarycalc

newcommanddegre$^circ$

colorletcolor0blue!40
colorletcolor1orange!60
colorletcolor2DarkGreen!40
colorletcolor3yellow!60
colorletcolor4red!60
colorletcolor5blue!60!cyan!60
colorletcolor6cyan!60!yellow!60
colorletcolor7red!60!cyan!60
colorletcolor8red!60!blue!60
colorletcolor9orange!60!cyan!60


makeatletter
tikzset%
dc tag/.style=align=center,
dc legend/.style=align=left,anchor=west,
dc sector/.style=fill=Cj,line join=round


pgfkeys/DiagCirc/.cd,
% list of Name/Value
value list/.store in=Value@list,
% circular : 360 - semi circular 180
angle max/.store in=Angle@max,
angle max=360,
% radius of the diagram
radius/.store in=R@dius,
radius=4cm,
% composition of the legend
% V value
% N name
% P percent
% A angle
% Cj color
legend/.store in=L@gend,
legend=,
% location of the legend
legend location/.store in=Legend@Loc,
legend location=($(R@dius,R@dius)+(.5,-.5)$),
% poisition of the node in the sector
% 0 center, 1 on the edge, 1.++ external
factor/.store in=F@ctor,
factor=.80,
% composition of the node in the sector
tags/.store in=T@gs,
tags=,
% correction of round errors in percents
percent corr/.store in=C@rrP,
percent corr=,
% correction of round errors in angles
angle corr/.store in=C@rrA,
angle corr=,
% individual shift
shift sector/.store in=Shift@j,
shift sector=,
% more nodes in the sectors, or new legeng
sup loop/.store in=Sup@Loop,
sup loop=,
% code of the diagram
diagram/.code=%
% Calculation of the sum
pgfmathsetmacroS@m0
foreach i/y in Value@list xdefS@mS@m+i
pgfmathsetmacroS@mS@m
pgfmathsetmacroC@effAngle@max/S@m

% beginning of the first sector
xdef@ngleA0

% main loop
foreach V/N [count=j from 0] in Value@list %

% calculation of the current angle
pgfmathsetmacroAV*C@eff

% superior limit of the sector
pgfmathsetmacro@ngleB@ngleA+A ;

% mean angle
pgfmathsetmacroMedA(@ngleA+@ngleB)/2 ;

% color
pgfmathtruncatemacro@kmod(j,10)
defCjcolor@k

% individual shift
ifthenelseequalShift@j%
edefSh@ft0%
pgfmathparsearray(Shift@j,j)
edefSh@ftpgfmathresult


% drawing of the sector
draw[dc sector,shift=(MedA:Sh@ft)] (0,0)
-- (@ngleA:R@dius) arc (@ngleA:@ngleB:R@dius)
node[midway] (DCj) -- cycle ;

% low limit of the next sector
xdef@ngleA@ngleB ;

% current percent correction
pgfmathtruncatemacroPround(V/S@m*100)
ifthenelseequalC@rrP%
pgfmathparsearray(C@rrP,j)
pgfmathtruncatemacroPP+pgfmathresult

edefPP,%

% current angle and corection
pgfmathtruncatemacroAround(A)
ifthenelseequalC@rrA%
pgfmathparsearray(C@rrA,j)
pgfmathtruncatemacroAA+pgfmathresult
edefAA,degre


% the sector node
ifthenelseequalT@gs%
DiagNode[dc tag]F@ctor T@gs ;


% the legend
ifthenelseequalL@gend%
beginscope[shift=Legend@Loc]
draw[fill=Cj] (0,-.5*j)
rectangle ++(.25,.25) ++(0,-.15)
node[dc legend] strutL@gend ;
endscope


% some more stuff
Sup@Loop ;


% end of diagram code

makeatother

% Node on the j sector
newcommandDiagNode[2][]node[#1] at ($(0,0)!#2!(DCj)$)

begindocument

begintikzpicture
path[%
% style options
dc sector/.append style=shift=(MedA:5pt), % shift all sectors
dc dtag/.append style=,
dc legend/.append style=text width=2cm, align=right,
every pin/.style=fill=Cj,draw=Cj!50!black,thick,
% diagram options
/DiagCirc/.cd,
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E,
angle max=180, % semi-circular
angle corr=0,1,0,0,0, % correct round angle error
legend=N :hfill V, % custom legend
factor=.9,
percent corr=0,-1,0,0,0, % correct round percent error
shift sector=0,0,.3,0,0, % shift individual sector
tags=P, % custom sector nodes
sup loop=% custom features :
%DiagNode1.1 N; % some other sector nodes
% or something else
defPin10,40,150,120,150
pgfmathparsearray(Pin,j)
edefPinjpgfmathresult
node[pin=Pinj:A] at (DCj) ;
,
diagram] ;

endtikzpicture
enddocument










share|improve this question
















There's a nice answer to a pie chart question over here. I tried to bend it to my needs but found some aspects difficult. Specifically:




  • I'd like to be able to manually adjust the labels.



    • Rather than adding the degree labels
      (newcommanddegre$^circ$, I assume), I just want to be able
      to write something in manually, like a year or date or note or the
      variable name for instance.


    • I'd liked to have the option of replacing the percentage labels with
      something else too, like the actual value shown in the legend
      perhaps.


    • And finally, the numbers aren't formatted nicely. For instance, the
      value 1236 should ideally be written as 1,236.




Is this kind of customization possible? There are various similar questions about other pie chart designs, but this design is a bit different to most I've seen. Anyway the current code is below.




PS: I kept getting lost in it, so to make reading a bit quicker and easier, I've set:
begindocument through enddocument in bold, and:
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E in italics, so you can identify it at a glance.




chart



documentclass[margin=5pt]article
usepackage[svgnames]xcolor
usepackagetikz,fourier,ifthen
usetikzlibrarycalc

newcommanddegre$^circ$

colorletcolor0blue!40
colorletcolor1orange!60
colorletcolor2DarkGreen!40
colorletcolor3yellow!60
colorletcolor4red!60
colorletcolor5blue!60!cyan!60
colorletcolor6cyan!60!yellow!60
colorletcolor7red!60!cyan!60
colorletcolor8red!60!blue!60
colorletcolor9orange!60!cyan!60


makeatletter
tikzset%
dc tag/.style=align=center,
dc legend/.style=align=left,anchor=west,
dc sector/.style=fill=Cj,line join=round


pgfkeys/DiagCirc/.cd,
% list of Name/Value
value list/.store in=Value@list,
% circular : 360 - semi circular 180
angle max/.store in=Angle@max,
angle max=360,
% radius of the diagram
radius/.store in=R@dius,
radius=4cm,
% composition of the legend
% V value
% N name
% P percent
% A angle
% Cj color
legend/.store in=L@gend,
legend=,
% location of the legend
legend location/.store in=Legend@Loc,
legend location=($(R@dius,R@dius)+(.5,-.5)$),
% poisition of the node in the sector
% 0 center, 1 on the edge, 1.++ external
factor/.store in=F@ctor,
factor=.80,
% composition of the node in the sector
tags/.store in=T@gs,
tags=,
% correction of round errors in percents
percent corr/.store in=C@rrP,
percent corr=,
% correction of round errors in angles
angle corr/.store in=C@rrA,
angle corr=,
% individual shift
shift sector/.store in=Shift@j,
shift sector=,
% more nodes in the sectors, or new legeng
sup loop/.store in=Sup@Loop,
sup loop=,
% code of the diagram
diagram/.code=%
% Calculation of the sum
pgfmathsetmacroS@m0
foreach i/y in Value@list xdefS@mS@m+i
pgfmathsetmacroS@mS@m
pgfmathsetmacroC@effAngle@max/S@m

% beginning of the first sector
xdef@ngleA0

% main loop
foreach V/N [count=j from 0] in Value@list %

% calculation of the current angle
pgfmathsetmacroAV*C@eff

% superior limit of the sector
pgfmathsetmacro@ngleB@ngleA+A ;

% mean angle
pgfmathsetmacroMedA(@ngleA+@ngleB)/2 ;

% color
pgfmathtruncatemacro@kmod(j,10)
defCjcolor@k

% individual shift
ifthenelseequalShift@j%
edefSh@ft0%
pgfmathparsearray(Shift@j,j)
edefSh@ftpgfmathresult


% drawing of the sector
draw[dc sector,shift=(MedA:Sh@ft)] (0,0)
-- (@ngleA:R@dius) arc (@ngleA:@ngleB:R@dius)
node[midway] (DCj) -- cycle ;

% low limit of the next sector
xdef@ngleA@ngleB ;

% current percent correction
pgfmathtruncatemacroPround(V/S@m*100)
ifthenelseequalC@rrP%
pgfmathparsearray(C@rrP,j)
pgfmathtruncatemacroPP+pgfmathresult

edefPP,%

% current angle and corection
pgfmathtruncatemacroAround(A)
ifthenelseequalC@rrA%
pgfmathparsearray(C@rrA,j)
pgfmathtruncatemacroAA+pgfmathresult
edefAA,degre


% the sector node
ifthenelseequalT@gs%
DiagNode[dc tag]F@ctor T@gs ;


% the legend
ifthenelseequalL@gend%
beginscope[shift=Legend@Loc]
draw[fill=Cj] (0,-.5*j)
rectangle ++(.25,.25) ++(0,-.15)
node[dc legend] strutL@gend ;
endscope


% some more stuff
Sup@Loop ;


% end of diagram code

makeatother

% Node on the j sector
newcommandDiagNode[2][]node[#1] at ($(0,0)!#2!(DCj)$)

begindocument

begintikzpicture
path[%
% style options
dc sector/.append style=shift=(MedA:5pt), % shift all sectors
dc dtag/.append style=,
dc legend/.append style=text width=2cm, align=right,
every pin/.style=fill=Cj,draw=Cj!50!black,thick,
% diagram options
/DiagCirc/.cd,
value list=149/A,1236/R+L+D,740/N+F,346/C,75/E,
angle max=180, % semi-circular
angle corr=0,1,0,0,0, % correct round angle error
legend=N :hfill V, % custom legend
factor=.9,
percent corr=0,-1,0,0,0, % correct round percent error
shift sector=0,0,.3,0,0, % shift individual sector
tags=P, % custom sector nodes
sup loop=% custom features :
%DiagNode1.1 N; % some other sector nodes
% or something else
defPin10,40,150,120,150
pgfmathparsearray(Pin,j)
edefPinjpgfmathresult
node[pin=Pinj:A] at (DCj) ;
,
diagram] ;

endtikzpicture
enddocument







tikz-pgf diagrams charts pgf-pie






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 26 mins ago









Phelype Oleinik

24.9k54690




24.9k54690










asked 29 mins ago









tjt263tjt263

2637




2637












  • Straight up solutions are welcome, but what would be really nice is if you could also explain a little bit about how it works, so anyone reading can maybe solve similar problems on their/my own in the future. Teach a man to fish and all that. No pressure though, just a suggestion.

    – tjt263
    21 mins ago











  • PPS: Someone removed the pstricks tag. I used that tag because I also experimented with that package as per the designs on the page I linked to. It seemed simpler, but I still couldn't quite figure it out, despite having some quite nice documentation. I think tikz tends to look nicer and I'm a bit familiar with it from drawing other types of charts and diagrams, but if you use pstricks or whatever, feel free.

    – tjt263
    12 mins ago


















  • Straight up solutions are welcome, but what would be really nice is if you could also explain a little bit about how it works, so anyone reading can maybe solve similar problems on their/my own in the future. Teach a man to fish and all that. No pressure though, just a suggestion.

    – tjt263
    21 mins ago











  • PPS: Someone removed the pstricks tag. I used that tag because I also experimented with that package as per the designs on the page I linked to. It seemed simpler, but I still couldn't quite figure it out, despite having some quite nice documentation. I think tikz tends to look nicer and I'm a bit familiar with it from drawing other types of charts and diagrams, but if you use pstricks or whatever, feel free.

    – tjt263
    12 mins ago

















Straight up solutions are welcome, but what would be really nice is if you could also explain a little bit about how it works, so anyone reading can maybe solve similar problems on their/my own in the future. Teach a man to fish and all that. No pressure though, just a suggestion.

– tjt263
21 mins ago





Straight up solutions are welcome, but what would be really nice is if you could also explain a little bit about how it works, so anyone reading can maybe solve similar problems on their/my own in the future. Teach a man to fish and all that. No pressure though, just a suggestion.

– tjt263
21 mins ago













PPS: Someone removed the pstricks tag. I used that tag because I also experimented with that package as per the designs on the page I linked to. It seemed simpler, but I still couldn't quite figure it out, despite having some quite nice documentation. I think tikz tends to look nicer and I'm a bit familiar with it from drawing other types of charts and diagrams, but if you use pstricks or whatever, feel free.

– tjt263
12 mins ago






PPS: Someone removed the pstricks tag. I used that tag because I also experimented with that package as per the designs on the page I linked to. It seemed simpler, but I still couldn't quite figure it out, despite having some quite nice documentation. I think tikz tends to look nicer and I'm a bit familiar with it from drawing other types of charts and diagrams, but if you use pstricks or whatever, feel free.

– tjt263
12 mins ago











0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483940%2fcustomizing-half-pie-chart-labels-with-tikz%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483940%2fcustomizing-half-pie-chart-labels-with-tikz%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

Tender dossier with centered articlesHow can I get legal style indentation on section, subsection, subsubsec.. using titlesec?missing item with addtocontents before sectionsubsubsubsection, paragraph and subparagraph count not reset when starting a new section, subsection, etcTikZ won't support HSB color model hsb in article document classAdding a vskip1em before each section - won't compile with itHow to implement a customized hierarchical table of content using titletoc with changing number formatsSection title formatGrouped entries in index don't spill over to next columnParagraph spacing in documentclassarticle with Figure and ListingsRagged Right Index Entries

inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX