Graphics, Figures & Tablesbeamer, tikZ | Scale Mindmap to fit

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
davidfall
Posts: 14
Joined: Thu Aug 11, 2011 4:11 pm

beamer, tikZ | Scale Mindmap to fit

Post by davidfall »

Hi,

I have a problem doing a mindmap for a beamer presentation using the tikz library mindmap. As my mindmap does not fit using the small mindmap option I also have to scale it down somehow... In the provided example I added the scaling factor 0.75 on the entire tikz environment. This does the trick, with the great exeption that "the connectors" is distorted.

Is there a solution to my problem?
Thanks in advance!
/D

MWE:

Code: Select all

\documentclass[mathserif]{beamer}
\usepackage{beamerthemesplit}
\usepackage{tikz}
\usetikzlibrary{calc,fadings,mindmap,trees}

\begin{document}

\section{F\"orslag till forsatt arbete}
\begin{frame}\frametitle{\insertsectionhead}
\begin{center}
\begin{tikzpicture}[scale=0.75]
    \tikzstyle{every node}=[font=\tiny]

  \path[mindmap,concept color=black,text=white,small mindmap, minimum size=0pt,text width=0.5cm]
    node[concept] {?}
    [clockwise from=0]
    child[concept color=green!50!black] {
      node[concept] {Rationell dimensionering}
      [clockwise from=90]
      child { node[concept] {Automatiserad design} }
      child { node[concept] {Optimerad armeringsriktning} }
      child { node[concept] {Bara fiberarmering i vissa omr\aa den} }
    }
    child[concept color=blue] {
      node[concept] {Rationell konstruktionsprocess}
      [clockwise from=-30]
      child { node[concept] {Beskriva processen idag} }
      child { node[concept] {Samarbete mellan arkitekt och ingenj\"ör} }
      child { node[concept] {Optimera processen. Vilka hinder finns idag?} }
    }
    child[concept color=red] { node[concept] {Fiberarmering} 
      [clockwise from=-90]
      child { node[concept] {Fiber-orientering?} }
      child { node[concept] {Statiskt obest\"amda konstruktioner} }
      child { node[concept] {Optimera processen. Vilka hinder finns idag?} }
    }
    child[concept color=orange] { node[concept] {Optimering} };
\end{tikzpicture}

\end{center}
\end{frame}
\end{document}
Last edited by davidfall on Thu Oct 20, 2011 2:49 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.

sitex
Posts: 70
Joined: Sat May 09, 2009 12:37 pm

Re: beamer, tikZ | Scale Mindmap to fit

Post by sitex »

Hello,

I am not sure this is the optimal solution, but I placed the tikzpicture environment in in a scalebox.

Tom
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

beamer, tikZ | Scale Mindmap to fit

Post by localghost »

You can use the »transform shape« option as explained in Section 16.7 of the pgf/tikZ user guide.

Code: Select all

\begin{tikzpicture}[scale=0.75,transform shape]
% picture content
\end{tikzpicture}
Note that this also scales the text inside the nodes of the mindmap.


Best regards and welcome to the board
Thorsten
davidfall
Posts: 14
Joined: Thu Aug 11, 2011 4:11 pm

beamer, tikZ | Scale Mindmap to fit

Post by davidfall »

First suggestion worked perfect.
Again I'm thankful to the board!
localghost wrote:Best regards and welcome to the board
Thanks! Best place to get a good answer!

By the way: I also managed to squeeze in some more functionality. The mindmap "unfold" while going forward in the presentation. Maybe, I didn't do it in the most fancy way, but it seems to work. maybe this isn't the place to show off (excuse me moderator), but in case anyone needs it:

Code: Select all

    \documentclass[mathserif]{beamer}
    \usepackage{beamerthemesplit}
    \usepackage{tikz}
    \usetikzlibrary{calc,fadings,mindmap,trees}

    \begin{document}

   
    \begin{frame}
    \begin{center}

\onslide<1->{
\tikzstyle{one} = [concept color=black!50,opacity=0]
\tikzstyle{c11} = [concept color=black!50,opacity=0]
\tikzstyle{c12} = [concept color=black!50,opacity=0]
\tikzstyle{c13} = [concept color=black!50,opacity=0]
\tikzstyle{two} = [concept color=black!50,opacity=0]
\tikzstyle{c21} = [concept color=black!50,opacity=0]
\tikzstyle{c22} = [concept color=black!50,opacity=0]
\tikzstyle{c23} = [concept color=black!50,opacity=0]
\tikzstyle{three} = [concept color=black!50,opacity=0]
\tikzstyle{c31} = [concept color=black!50,opacity=0]
\tikzstyle{c32} = [concept color=black!50,opacity=0]
\tikzstyle{c33} = [concept color=black!50,opacity=0]
\tikzstyle{four} = [concept color=black!50,opacity=0]}

\only<2->{\tikzstyle{one} = [concept color=green!75!black]}
\only<3->{\tikzstyle{c11} = [concept color=green!75!black]}
\only<4->{\tikzstyle{c12} = [concept color=green!75!black]}
\only<5->{\tikzstyle{c13} = [concept color=green!75!black]}
% 
\only<6->{\tikzstyle{two} = [concept color=blue]}
\only<7->{\tikzstyle{c21} = [concept color=blue]}
\only<8->{\tikzstyle{c22} = [concept color=blue]}
\only<9->{\tikzstyle{c23} = [concept color=blue]}
%
\only<10->{\tikzstyle{three} = [concept color=red!]}
\only<11->{\tikzstyle{c31} = [concept color=red!]}
\only<12->{\tikzstyle{c32} = [concept color=red!]}
\only<13->{\tikzstyle{c33} = [concept color=red!]}

\only<14->{\tikzstyle{four} = [concept color=orange]}



\scalebox{0.80}{
 \begin{tikzpicture}
    \tikzstyle{every node}=[font=\tiny]

  \path[mindmap,concept color=black,text=white,mindmap small, minimum
size=0pt,text width=3.5cm,concept distance=1mm]
    node[concept] {\huge{?}}%{F\"orslag till fortsatt arbete}
    [clockwise from=0]
    child[one] {
      node[concept] {\scriptsize{Rationell\\dimensionering}}
      [clockwise from=0]
      child[c11] { node[concept] {Automatiserad design} }
      child[c12] { node[concept] {Optimerad armerings-\\riktning} }
      child[c13] { node[concept] {Bara fiberarmering i vissa omr\aa den} }
    }
    child[two] {
      node[concept] {\scriptsize{Rationell \\konstruktions-\\process}}
      [clockwise from=0]
      child[c21] { node[concept] {Beskriva processen idag} }
      child[c22] { node[concept] {Samarbete mellan arkitekt och ingenj\"or} }
      child[c23] { node[concept] {Optimera processen. Vilka hinder finns idag?}
}
    }
    child[three] { node[concept] {\scriptsize{Fiberarmering} }
      [clockwise from=-140]
      child[c31] { node[concept] {Fiber-orientering?} }
      child[c32] { node[concept] {Statiskt obest\"amda konstruktioner} }
      child[c33] { node[concept] {Optimera processen. Vilka hinder finns idag?}
}
    }
    child[four] { node[concept] {\scriptsize{Optimering}} };
\end{tikzpicture}
}%End scalebox
    \end{center}
    \end{frame}
    \end{document}

Post Reply