Graphics, Figures & Tables\psChart Problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

\psChart Problem

Post by coachbennett1981 »

Good morning. I am created a pie chart and I can not seem to move the percents to be located in the proper chart piece. I was wondering if anyone could help.

Smallville 35%
Mythbusters 15%
History Channel 20%
Dora the Explorer 10%
CBS News 20%

All of my percents are located near the center of the circle. I put the percents and the categories above. The file is below. Any help would be appreciated.

Nick

Code: Select all

\documentclass{article}
\usepackage{pstricks-add}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{color}
\usepackage{pst-bar}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\newcounter{lC}
\setcounter{lC}{1}
\psset{unit=1.5}
	\psframebox[fillcolor=black!30,fillstyle=solid]{
		\begin{pspicture}(-3,-3)(3,3)
		\psChart[userColor={red!,green!30,blue!40,gray,cyan!50,magenta!60},chartSep=30pt,shadow=true,shadowsize=5pt]{35,15,20,10,20}{6}{2}
		\psset{nodesepA=5pt,nodesepB=-20pt}
			\ncline{psChart01}{psChart1}\nput{45}{psChart01}{(35\%}
			\ncline{psChart01}{psChart1}\nput{150}{psChart01}{(15\%}
			\ncline{psChart01}{psChart1}\nput{-90}{psChart01}{(20\%}
			\ncline{psChart01}{psChart1}\nput{0}{psChart01}{(10\%}
			\ncline{psChart01}{psChart1}\nput{0}{psChart01}{(20\%}
			\bfseries%
			\rput(psChartI1){Smallville}\rput(psChartI2){Mythbusters}\rput(psChartI3){History Channel}\rput(psChartI4){Dora the Explorer}\rput(psChart5){CBS News}
			\end{pspicture}}

\end{document}
Last edited by coachbennett1981 on Fri Oct 01, 2010 7:57 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

\psChart Problem

Post by CrazyHorse »

coachbennett1981 wrote:I am created a pie chart and I can not seem to move the percents to be located in the proper chart piece. I was wondering if anyone could help.
psChartO1}{psChartI1
O for Outer, not 0 and I for Inner

Code: Select all

\documentclass{article}
\usepackage{pstricks-add}

\begin{document}

\psset{unit=1.5}
\psframebox[fillcolor=black!30,fillstyle=solid]{
  \begin{pspicture}(-3,-3)(3,3)
    \psChart[userColor={red!,green!30,blue!40,gray,cyan!50,magenta!60},
       chartSep=30pt,shadow=true,shadowsize=5pt]{35,15,20,10,20}{6}{2}
    \psset{nodesepA=5pt,nodesepB=-20pt}
    \ncline{psChartO1}{psChartI1}\nput{45}{psChartO1}{(35\%}
    \ncline{psChartO2}{psChartI2}\nput{150}{psChartO2}{(15\%}
    \ncline{psChartO3}{psChartI3}\nput{-90}{psChartO3}{(20\%}
    \ncline{psChartO4}{psChartI4}\nput{0}{psChartO4}{(10\%}
    \ncline{psChartO5}{psChartI5}\nput{0}{psChartO5}{(20\%}
    \bfseries%
    \rput(psChartI1){Smallville}\rput(psChartI2){Mythbusters}\rput(psChartI3){History Channel}\rput(psChartI4){Dora the Explorer}\rput(psChart5){CBS News}
         \end{pspicture}}

\end{document}
Herbert
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: \psChart Problem

Post by coachbennett1981 »

Thank you for looking at my code..
Post Reply