[texhax] Drawing colored pie chart in KOMA-Class scrreprt (preferably without manually installing pgf-pie
Pascal
pascal.bernhard at belug.de
Sun Mar 23 14:02:31 CET 2014
Am Sunday, den 23.03.2014, 08:24 +0100 schrieb Herbert Voss:
> Am 23.03.2014 00:22, schrieb Suresh Govindachar:
> >
> >> On Fri, Mar 21, 2014 at 5:02 PM, Pascal <pascal.bernhard at belug.de> asked:
> >
> > [for a simple, quick way to add a 2-dimensional pie chart with colors
> > without having to install pgf-pie]:
> >
> > > The first example works
> > > (http://www.texample.net/tikz/examples/pie-chart/), but I'm
> > > totally at a loss about how get colors into the pie chart.
> > > This basically does the trick, I do not aspire to fancy stuff
> > > like a drawn out slice, but colors I definitively would like
> > > to see.
> > [...]
> > > I should mention that in my case the pie chart is supposed to
> > > show that the markets is carved up by two companies, one
> > > having a 69 % market share, the other 29 %, which leaves 2 %
> > > for various other tiny firms. I'm not sure whether I could
> > > modify the example above quite easily to fit my needs, so any
> > > help here would also be higly appreciated.
> >
> > Here's a simple tweak to that example to get colors and to illustrate
> > your particular "69-29-2" example:
>
> Run this PSTricks example with `xelatex`
>
> \documentclass{scrartcl}
> \usepackage{pstricks-add}
>
> \begin{document}
>
> \psset{unit=1.5}
> \begin{pspicture}(-3,-3)(3,3)
> \psChart[userColor={red!30,green!30,blue!40,gray,cyan!50,
> magenta!60,cyan},
>
> chartSep=30pt,shadow=true,shadowsize=5pt]{34.5,17.2,20.7,15.5,5.2,6.9}{6}{2}
> \psset{nodesepA=5pt,nodesepB=-10pt}
> \ncline{psChartO1}{psChart1}\nput{0}{psChartO1}{1000 (34.5\%)}
> \ncline{psChartO2}{psChart2}\nput{150}{psChartO2}{500 (17.2\%)}
> \ncline{psChartO3}{psChart3}\nput{-90}{psChartO3}{600 (20.7\%)}
> \ncline{psChartO4}{psChart4}\nput{0}{psChartO4}{450 (15.5\%)}
> \ncline{psChartO5}{psChart5}\nput{0}{psChartO5}{150 (5.2\%)}
> \ncline{psChartO6}{psChart6}\nput{0}{psChartO6}{200 (6.9\%)}
> \bfseries%
> \rput(psChartI1){Taxes}\rput(psChartI2){Rent}\rput(psChartI3){Bills}
> \rput(psChartI4){Car}\rput(psChartI5){Gas}\rput(psChartI6){Food}
> \end{pspicture}
>
> \end{document}
>
Hallo Herbert,
unfortunately the pie chart was not displayed correctly, only text and
numbers showed up, not the pie itself or any colors. I ran it with
xelatex.
I appended the log file to this email (although not sure whether this
mailing list accecpts email attachments)
Pascal
-------------- next part --------------
LOG FILE :
This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013) (format=xelatex 2014.2.16) 23 MAR 2014 13:56
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**Pie-Chart_Herbert-Voss.tex
(./Pie-Chart_Herbert-Voss.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 42 languages loaded.
(/usr/share/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2012/07/29 v3.11b KOMA-Script document class (article)
(/usr/share/texmf-dist/tex/latex/koma-script/scrkbase.sty
Package: scrkbase 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent
basics and keyval usage)
(/usr/share/texmf-dist/tex/latex/koma-script/scrbase.sty
Package: scrbase 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent
basics and keyval usage)
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV at toks@=\toks14
)
(/usr/share/texmf-dist/tex/latex/koma-script/scrlfile.sty
Package: scrlfile 2012/06/15 v3.12 KOMA-Script package (loading files)
Package scrlfile, 2012/06/15 v3.12 KOMA-Script package (loading files)
Copyright (C) Markus Kohm
))) (/usr/share/texmf-dist/tex/latex/koma-script/tocbasic.sty
Package: tocbasic 2012/04/04 v3.10b KOMA-Script package (handling toc-files)
)
Package tocbasic Info: omitting babel extension for `toc'
(tocbasic) because of feature `nobabel' available
(tocbasic) for `toc' on input line 115.
Package tocbasic Info: omitting babel extension for `lof'
(tocbasic) because of feature `nobabel' available
(tocbasic) for `lof' on input line 116.
Package tocbasic Info: omitting babel extension for `lot'
(tocbasic) because of feature `nobabel' available
(tocbasic) for `lot' on input line 117.
Class scrartcl Info: File `scrsize11pt.clo' used instead of
(scrartcl) file `scrsize11.clo' to setup font sizes on input line 126
7.
(/usr/share/texmf-dist/tex/latex/koma-script/scrsize11pt.clo
File: scrsize11pt.clo 2012/07/29 v3.11b KOMA-Script font size class option (11p
t)
)
(/usr/share/texmf-dist/tex/latex/koma-script/typearea.sty
Package: typearea 2012/07/29 v3.11b KOMA-Script package (type area)
Package typearea, 2012/07/29 v3.11b KOMA-Script package (type area)
Copyright (C) Frank Neukam, 1992-1994
Copyright (C) Markus Kohm, 1994-
\ta at bcor=\skip41
\ta at div=\count80
\ta at hblk=\skip42
\ta at vblk=\skip43
\ta at temp=\skip44
Package typearea Info: These are the values describing the layout:
(typearea) DIV = 10
(typearea) BCOR = 0.0pt
(typearea) \paperwidth = 597.50793pt
(typearea) \textwidth = 418.25555pt
(typearea) DIV departure = -6%
(typearea) \evensidemargin = 17.3562pt
(typearea) \oddsidemargin = 17.3562pt
(typearea) \paperheight = 845.04694pt
(typearea) \textheight = 595.80026pt
(typearea) \topmargin = -25.16531pt
(typearea) \headheight = 17.0pt
(typearea) \headsep = 20.40001pt
(typearea) \topskip = 11.0pt
(typearea) \footskip = 47.60002pt
(typearea) \baselineskip = 13.6pt
(typearea) on input line 1213.
)
\c at part=\count81
\c at section=\count82
\c at subsection=\count83
\c at subsubsection=\count84
\c at paragraph=\count85
\c at subparagraph=\count86
\abovecaptionskip=\skip45
\belowcaptionskip=\skip46
\c at pti@nb at sid@b at x=\box26
\c at figure=\count87
\c at table=\count88
\bibindent=\dimen102
) (/usr/share/texmf-dist/tex/latex/pstricks-add/pstricks-add.sty
(/usr/share/texmf-dist/tex/latex/pstricks/pstricks.sty
Package: pstricks 2013/05/21 v0.56 LaTeX wrapper for `PSTricks' (RN,HV)
(/usr/share/texmf-dist/tex/generic/pstricks/pstricks.tex
(/usr/share/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
File: pst-xkey.tex 2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
(/usr/share/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2012/10/14 v2.6b package option processing (HA)
(/usr/share/texmf-dist/tex/generic/xkeyval/xkeyval.tex
\XKV at toks=\toks15
\XKV at tempa@toks=\toks16
\XKV at depth=\count89
File: xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
)))
(/usr/share/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv)
\pstFP at xs=\count90
\pstFP at xia=\count91
\pstFP at xib=\count92
\pstFP at xfa=\count93
\pstFP at xfb=\count94
\pstFP at rega=\count95
\pstFP at regb=\count96
\pstFP at regs=\count97
\pstFP at times=\count98
)
(/usr/share/texmf-site/tex/generic/pgf/utilities/pgfutil-common.tex
\pgfutil at everybye=\toks17
)
(/usr/share/texmf-site/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys at pathtoks=\toks18
\pgfkeys at temptoks=\toks19
(/usr/share/texmf-site/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
\pgfkeys at tmptoks=\toks20
))
(/usr/share/texmf-site/tex/generic/pgf/utilities/pgffor.code.tex
\pgffor at iter=\dimen103
\pgffor at skip=\dimen104
\pgffor at stack=\toks21
\pgffor at toks=\toks22
)
\psLoopIndex=\count99
`PSTricks' v2.43 <2013/05/12> (tvz)
\pst at dima=\dimen105
\pst at dimb=\dimen106
\pst at dimc=\dimen107
\pst at dimd=\dimen108
\pst at dimg=\dimen109
\pst at dimh=\dimen110
\pst at dimm=\dimen111
\pst at dimn=\dimen112
\pst at dimo=\dimen113
\pst at dimp=\dimen114
\pst at hbox=\box27
\pst at ibox=\box28
\pst at boxg=\box29
\pst at cnta=\count100
\pst at cntb=\count101
\pst at cntc=\count102
\pst at cntd=\count103
\pst at cntg=\count104
\pst at cnth=\count105
\pst at cntm=\count106
\pst at cntn=\count107
\pst at cnto=\count108
\pst at cntp=\count109
\@zero=\count110
\pst at toks=\toks23
(/usr/share/texmf-dist/tex/xelatex/xetex-pstricks/pstricks.con
(/usr/share/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg))
\psunit=\dimen115
\psxunit=\dimen116
\psyunit=\dimen117
\pst at C@@rType=\count111
\pslinewidth=\dimen118
\psk at startLW=\dimen119
\psk at endLW=\dimen120
\pst at customdefs=\toks24
\pslinearc=\dimen121
\pst at symbolStep=\dimen122
\pst at symbolWidth=\dimen123
\pst at symbolLinewidth=\dimen124
\everypsbox=\toks25
\psframesep=\dimen125
\pslabelsep=\dimen126
\sh at wgridXunit=\dimen127
\sh at wgridYunit=\dimen128
\pst at shift=\dimen129
\theoverlaybox=\box30
(/usr/share/texmf-dist/tex/xelatex/xetex-pstricks/pstricks.con
(/usr/share/texmf-dist/tex/generic/pstricks/config/xdvipdfmx.cfg
Using PSTricks configuration for XeTeX+xdvipdfmx
)))
File: pstricks.tex 2013/05/12 v2.43 `PSTricks' (tvz,hv)
(/usr/share/texmf-dist/tex/generic/pstricks/pst-fp.tex)
File: pst-fp.tex 2013/05/12 v2.43 `PST-fp' (hv)
(/usr/share/texmf-site/tex/latex/xcolor/xcolor.sty
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
(/usr/share/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package xcolor Info: Driver file: xetex.def on input line 225.
(/usr/share/texmf-dist/tex/xelatex/xetex-def/xetex.def
File: xetex.def 2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
))
(/usr/share/texmf-dist/tex/latex/pst-plot/pst-plot.sty
Package: pst-plot 2011/06/05 v1.00 LaTeX wrapper for `pst-plot' (HV)
(/usr/share/texmf-dist/tex/latex/xkeyval/pst-xkey.sty
Package: pst-xkey 2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)
)
(/usr/share/texmf-dist/tex/latex/multido/multido.sty
Package: multido 2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)
(/usr/share/texmf-dist/tex/generic/multido/multido.tex
v1.42, 2010/05/14 <tvz>
\multido at count=\count112
\multidocount=\count113
\multido at stuff=\toks26
)
File: multido.tex 2010/05/14 v1.42 `multido' (tvz,hv)
)
Package: pst-plot 2011/04/13 package wrapper for pst-plot.tex (hv)
(/usr/share/texmf-dist/tex/generic/pst-plot/pst-plot.tex
v1.45, 2013/04/29 (tvz,hv)
\pstRadUnit=\dimen130
\pstRadUnitInv=\dimen131
\pst at linecnt=\count114
\psxlabelsep=\dimen132
\psylabelsep=\dimen133
\psk at subticksize=\dimen134
\pst at xticksizeA=\dimen135
\pst at xticksizeB=\dimen136
\pst at xticksizeC=\dimen137
\pst at yticksizeA=\dimen138
\pst at yticksizeB=\dimen139
\pst at yticksizeC=\dimen140
\@digitcounter=\count115
\psk at llx=\dimen141
\psk at lly=\dimen142
\psk at urx=\dimen143
\psk at ury=\dimen144
\pst at xunit=\dimen145
\pst at yunit=\dimen146
)
File: pst-plot.tex 2013/04/29 1.45 `pst-plot' (tvz,hv)
)
(/usr/share/texmf-dist/tex/latex/pst-node/pst-node.sty
Package: pst-node 2012/09/18 v1.01 LaTeX wrapper for `pst-node' (HV)
Package: pst-node 2010/04/22 package wrapper for pst-node.tex
(/usr/share/texmf-dist/tex/generic/pst-node/pst-node.tex v1.27, 2013/04/12
\psrow=\count116
\pscol=\count117
\psmatrixcnt=\count118
\psrowsep=\skip47
\pscolsep=\skip48
\pst at args=\count119
\num at pts=\count120
\pst at argcnt=\count121
)
File: pst-node.tex 2013/04/12 1.27 `pst-node' (tvz,hv)
)
(/usr/share/texmf-dist/tex/latex/pst-3d/pst-3d.sty
Package: pst-3d 2009/07/28 package wrapper for pst-3d.tex (hv)
(/usr/share/texmf-dist/tex/generic/pst-3d/pst-3d.tex
`PST-3d' v1.11, 2010/02/14 (tvz))
File: pst-3d.tex 2010/02/14 v1.11 `PST-3d' (hv)
)
(/usr/share/texmf-dist/tex/latex/pst-math/pst-math.sty
Package: pst-math 2009/01/20 package wrapper for PSTricks pst-math.tex
(/usr/share/texmf-dist/tex/generic/pst-math/pst-math.tex
`pst-math' v0.62 , (CJ,hv))
File: pst-math.tex 2010/10/20 v0.62 `PST-math' (hv)
)
Package: pstricks-add 2010/02/11 v. 0.14 package wrapper for pstricks-add.tex (
hv)
(/usr/share/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
`pstricks-add' v3.60, 2013/01/01 (dr,hv)
\psparallelogramsep=\dimen147
\pshooklength=\dimen148
\pshookwidth=\dimen149
\pst at cntC=\count122
\chart at ColorIndex=\dimen150
\chart at ColorStep=\dimen151
\pst at chartHeight=\dimen152
\pst at chartStackDepth=\dimen153
\pst at chartStackWidth=\dimen154
\chart at Toggle=\count123
\psVectorCtr=\count124
)
File: pstricks-add.tex 2013/01/01 v3.60 `PSTricks-add' (hv)
) (./Pie-Chart_Herbert-Voss.aux)
\openout1 = `Pie-Chart_Herbert-Voss.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
[1
] (./Pie-Chart_Herbert-Voss.aux) )
Here is how much of TeX's memory you used:
5807 strings out of 494330
92670 string characters out of 6166209
247107 words of memory out of 5000000
9013 multiletter control sequences out of 15000+600000
4248 words of font info for 16 fonts, out of 8000000 for 9000
1020 hyphenation exceptions out of 8191
49i,7n,73p,581b,360s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on Pie-Chart_Herbert-Voss.pdf (1 page).
More information about the texhax
mailing list