Graphics, Figures & Tablestikz pie chart

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
colas
Posts: 2
Joined: Thu May 15, 2014 12:05 am

tikz pie chart

Post by colas »

Code: Select all

\documentclass{article}
\usepackage[paperheight=30cm,paperwidth=35cm,margin=1in,heightrounded]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
How to divide the pie in unequal slices ?
Thanks

Code: Select all

\begin{document}
\thispagestyle{empty}
\fbox{\begin{tikzpicture}[scale=0.6] 
% center
\path  (0,0) coordinate(A);

% circles
\foreach \rr in {12,...,24}{
  \draw  (A) circle (\rr);
}

\def\pp{25} 
% rays
\foreach \aa in {1,...,\pp}{
  \draw ($(A)+(\aa/\pp*360:12)$) --  ($(A)+(\aa/\pp*360:24)$); 
}
\end{tikzpicture}}

\end{document}
Last edited by Stefan Kottwitz on Thu May 15, 2014 7:57 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply