[texhax] Drawing colored pie chart in KOMA-Class scrreprt (preferably without manually installing pgf-pie
Pascal
pascal.bernhard at belug.de
Sun Mar 23 15:07:19 CET 2014
Am Sunday, den 23.03.2014, 08:20 -0500 schrieb Herbert Schulz:
> On Mar 23, 2014, at 8:02 AM, Pascal <pascal.bernhard at belug.de> wrote:
>
> > 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
>
> Howdy,
>
> Without a minimal but compilable source file that demonstrates the problem this tells me very little.
I just copied Herberts TeX-code into my TeX-editor and compiled it. So
that should be a compilable source file, or is there something I do not
get?
Pascal
>
>
More information about the texhax
mailing list