4

I am new to drawing diagrams in LaTeX. I want to be able to draw the diagram below in LaTeX for my beamer presentation but I am finding it a bit challenging. Can anyone please help? enter image description here

This is what i have been able to do so far:

\documentclass[12pt,serif]{beamer}
\mode<presentation>{\usetheme{CambridgeUS}}
\usecolortheme{seahorse}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[charter]{mathdesign}
\usepackage{tikz}

\begin{document}

\begin{frame}
 \begin{tikzpicture}
 \draw[blue,thick] (15,15)  ++(45:1) arc (45:-45:4);
 \filldraw[blue,thick] (16.2,15) circle(0.5cm);
 \draw[blue,thick] (16.2,15) rectangle(25cm,5);
 \end{tikzpicture}
 \end{frame}

 \end{document}

I don't really mind if the colours are different. Thanks

2

2 Answers 2

6

enter image description here

color of borders and fills of circles can be simply adjusted to your taste. to preserve simplicity of code, the color of rectangles is (so far) fixed:

\documentclass{beamer}
\mode<presentation>{\usetheme{CambridgeUS}}
\usecolortheme{seahorse}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\usepackage[charter]{mathdesign} % i haven't installed
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{frame}[fragile]
 \begin{tikzpicture}[
C/.style = {circle,
           draw=#1, thick,
           fill=#1!30,
           minimum size=12mm
           },
R/.style = {rectangle,
           draw=gray, thick,
           fill=gray!30,
           minimum height=9mm,
           text width=12cm-#1cm,
           inner xsep=8mm,
           align=left,
           font=\Large,
           anchor=west
           }
                    ]
%
\draw[gray, line width=2mm] ( 60:4) arc (60:-60:4);
%
 \node[R=2.83] at ( 45:4) {Agra}; %  4*cos(45)
 \node[R=3.86] at ( 15:4) {Fran}; %  4*cos(15)
 \node[R=3.86] at (-15:4) {Brana};%  4*cos(15)
 \node[R=2.83] at (-45:4) {Grad}; %  4*cos(45)
%
\node[C=blue]  at ( 45:4) {};
\node[C=green] at ( 15:4) {};
\node[C=olive] at (-15:4) {};
\node[C=gray]  at (-45:4) {};
\end{tikzpicture}
\end{frame}
\end{document}

addedmdum: small changes of above example that enable simple coloring of rectangles:

\documentclass{beamer}
\mode<presentation>{\usetheme{CambridgeUS}}
\usecolortheme{seahorse}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\usepackage[charter]{mathdesign}
\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{frame}[fragile]
 \begin{tikzpicture}[
C/.style = {% Circle
            circle,
            draw=#1, thick,
            fill=#1!30,
            minimum size=11mm
           },
R/.style args = {#1:#2}{% Rectangle       <---
            rectangle, rounded corners, % <---
            draw=#2, very thin,
            top color= #2!20,           % <---
            bottom color= #2!20,        % <---
            middle color= #2!60,        % <---
            minimum height=9mm,
            text width=12cm-#1cm,
            inner xsep=9mm,
            align=left,
            font=\Large,
            anchor=west
           },
                    ]
%
\draw[gray, line width=2mm] ( 60:4) arc (60:-60:4);
%
 \node[R=2.83:blue]     at ( 45:4) {Agra}; %  4*cos(45)
 \node[R=3.86:green]    at ( 15:4) {Fran}; %  4*cos(15)
 \node[R=3.86:olive]    at (-15:4) {Brana};%  4*cos(15)
 \node[R=2.83:gray]     at (-45:4) {Grad}; %  4*cos(45)
%
\node[C=blue]  at ( 45:4) {};
\node[C=green] at ( 15:4) {};
\node[C=olive] at (-15:4) {};
\node[C=gray]  at (-45:4) {};
\end{tikzpicture}
\end{frame}
\end{document}

enter image description here

1
  • this is exactly what I needed. Much appreciated!
    – Kay
    Commented Mar 30, 2018 at 18:30
4

The smartdiagram package can do something similar:

\documentclass{beamer}
\usepackage{smartdiagram}

\begin{document}

\begin{frame}
\begin{center}
\smartdiagram[descriptive diagram]
{
{, Agra},
{, Fran},
{, Bran},
{, Grad},
}
\end{center}
\end{frame} 

\end{document}
1
  • thanks for suggesting the smartdiagram package. I know this would be useful sometime.
    – Kay
    Commented Mar 30, 2018 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .