# how to make mindmap fit on frame?

I'm in the process of creating a Beamer presentation using some tikz concepts, how do I make a mindmap fit to the slide? My code is as follows:

\documentclass[T]{beamer}

\usetheme{Frankfurt}
\usecolortheme{dolphin}
\usefonttheme{structuresmallcapsserif}
\usefonttheme{serif}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\usepackage[graphics,tightpage]{preview}

\setbeamertemplate{button}{\tikz
\node[
inner xsep=10pt,
draw=structure!80,
fill=structure!50,
rounded corners=4pt]  {\Large\insertbuttontext};}

\title{Presentation Template}
\setbeamercolor{author}{fg=yellow}
\author{asdfasdfa}
\setbeamercolor{date}{fg=yellow}
\date\today

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section*{Outline}

\begin{frame}
\begin{multicols}{2}
\frametitle{Contents}
\tableofcontents
\end{multicols}
\end{frame}

\section{Timeline}
\begin{frame}
\frametitle{ Timeline}
\centering

\end{frame}

\begin{frame}
\begin{tikzpicture}
\path[mindmap,concept color=blue, text=white, transform shape]
node[concept]{bicycle}
child[grow=30]{node[concept]{time trial bicycle}}
child[grow=60, concept color=black]{node[concept]{mountain bicycle}}
child[grow=120, concept color=orange]{node[concept]{tandem bicycle}};
\end{tikzpicture}
\end{frame}
\end{document}

-
One way would be to simply scale the entire tikzpicture. So something like \begin{tikzpicture}[scale=0.8]. – Peter Grill Apr 25 '13 at 0:32
Thanks for your help. – user28552 Apr 25 '13 at 0:49
From the PGF manual: “Mindmaps with small mindmap will also fit onto a standard frame of the beamer package.” You do need to change the direction of the time trial and road racing bicycle nodes to 0 and 60 respectively. – Qrrbrbirlbel Apr 25 '13 at 0:57
Perhaps duplicate: Scaling tikz mindmaps within a beamer frame. – Claudio Fiandrino Apr 25 '13 at 6:52

Another option would be to use \resizebox:

\documentclass[T]{beamer}

\usetheme{Frankfurt}
\usecolortheme{dolphin}
\usefonttheme{structuresmallcapsserif}
\usefonttheme{serif}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{hyperref}
\usepackage{tikz}
\usetikzlibrary{mindmap}
\usepackage[graphics,tightpage]{preview}

\setbeamertemplate{button}{\tikz
\node[
inner xsep=10pt,
draw=structure!80,
fill=structure!50,
rounded corners=4pt]  {\Large\insertbuttontext};}

\title{Presentation Template}
\setbeamercolor{author}{fg=yellow}
\author{asdfasdfa}
\setbeamercolor{date}{fg=yellow}
\date\today

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section*{Outline}

\begin{frame}
\begin{multicols}{2}
\frametitle{Contents}
\tableofcontents
\end{multicols}
\end{frame}

\section{Timeline}
\begin{frame}
\frametitle{ Timeline}
\centering

\end{frame}

\begin{frame}
\resizebox{\textwidth}{!}{%
\begin{tikzpicture}
\path[mindmap,concept color=blue, text=white, transform shape]
node[concept,scale=0.8]{bicycle}
child[grow=30]{node[concept]{time trial bicycle}}
child[grow=60, concept color=black]{node[concept]{mountain bicycle}}
child[grow=120, concept color=orange]{node[concept]{tandem bicycle}};
\end{tikzpicture}%
}
\end{frame}
\end{document}


-
ah, but you missed the 'hidden' time trial node- I only found it by accident! – cmhughes Apr 25 '13 at 0:38
Thanks for your help. – user28552 Apr 25 '13 at 0:47
@cmhughes hidden it was. Fixed. Thank you. – Gonzalo Medina Apr 25 '13 at 0:47
@GonzaloMedina how would I then make those nodes links within the presentation? – user28552 Apr 25 '13 at 0:53
@user28552 You can use the \hypertarget, \hyperlink mechanism to build links to other parts of the presentation, or \href to make them links to outer destinations. If you need some additional guidance, perhaps this deserves a new question. – Gonzalo Medina Apr 25 '13 at 0:56

You can change scale=<whatever you like> for a few of the nodes- also wrapping it in a \makebox[\textwidth] helps a little.

You can also change the level distance if you like- it's a fairly manual process, but that's ok for a presentation, as they are very different from regular documents.

% arara: pdflatex
% !arara: indent: { overwrite: on}
\documentclass{beamer}

\usetheme{Frankfurt}
\usecolortheme{dolphin}
\usefonttheme{structuresmallcapsserif}
\usefonttheme{serif}
\usepackage{tikz}
\usetikzlibrary{mindmap}

\begin{document}

\begin{frame}
\makebox[\textwidth][c]{%
\begin{tikzpicture}
\path[mindmap,concept color=blue, text=white, transform shape]
node[concept,scale=0.8]{bicycle}