1

I'm using beamer for a presentation with a configuration like:

\begin{frame}
\frametitle{My Title}
\begin{columns}
\begin{column}{0.5\textwidth}
*some text bullets*
\end{column}
\begin{column}{0.5\textwidth}
*a tikzpicture*
\end{column}
\end{columns}
\end{frame}

And the text to the left of the tikz picture is not showing up and no errors either. anyone else had something like this before?

Edit

The document is:

\documentclass[
    11pt, 
    aspectratio=169, 
]{beamer}

\graphicspath{{Images/}{./}} % Specifies where to look for included images (trailing slash required)
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule for better rules in tables

%\usepackage{appendixnumberbeamer} %If you want a separate slide counter for your appendix

%%% Customize Theme %%%%%%%%%%%%%%%%%%%%%%
\usetheme{Madrid} % You can use other themes too, but this changes many things. I've found Madrid to be the best for this color scheme

\definecolor{myRed}{RGB}{120,4,4}
\definecolor{myOrange}{RGB}{227, 125, 0}
% Bottom right hand color
\setbeamercolor*{structure}{bg=myRed!20,fg=myRed!90}
\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg} %?
\setbeamercolor*{palette secondary}{use=structure,fg=myRed,bg=white}
    %bottom left of footer & bar between title & top bubbles
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=myRed} 
\setbeamercolor{frametitle}{bg=myRed!85,fg=white} %title of each slide
\setbeamercolor*{titlelike}{parent=palette primary} %?
%for miniframe (very top) AND center footer
\setbeamercolor{section in head/foot}{fg=myOrange, bg=white}
%%% Specific Colors %%%
\setbeamercolor{item projected}{bg=myOrange}
\setbeamertemplate{enumerate items}{bg=myOrange}
\setbeamercolor{itemize item}{fg=myOrange}
\setbeamercolor{itemize subitem}{fg=myOrange}
\setbeamercolor{button}{bg=myOrange}
%%% Edits ONLY the TOC slide %%%
\setbeamercolor{section in toc}{fg=black}
\setbeamercolor{subsection in toc}{fg=black}
%%% Block Colors %%%
% Standard block %
    \setbeamercolor{block title}{bg=myOrange, fg=white}
    \setbeamercolor{block body}{bg=myOrange!20}
%---------------------------------------------------------
%   SELECT FONT THEME & FONTS
%---------------------------------------------------------
\usefonttheme{default} % Typeset using the default sans serif font
\usepackage{palatino} % Use the Palatino font for serif text
\usepackage[default]{opensans} % Use the Open Sans font for sans serif text
\useinnertheme{circles}
%---------------------------------------------------------
%   SELECT OUTER THEME
%---------------------------------------------------------
% Outer themes change the overall layout of slides, such as: header and footer lines, sidebars and slide titles. Uncomment each theme in turn to see what changes it makes to your presentation.
\useoutertheme{miniframes}

%%%%%%%%%%%%%%%%%%%%%%%
% Other packages
%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{groupplots}
\usepgfplotslibrary{polar}
\usepgfplotslibrary{smithchart}
\usepgfplotslibrary{statistics}
\usepgfplotslibrary{dateplot}
\usepgfplotslibrary{ternary}
% Custom preamble from global variable:
\usepgfplotslibrary{fillbetween}

\begin{document}
\begin{frame}
    \frametitle{Title Title Title}
    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 
\begin{columns}[t]
\begin{column}{0.4\textwidth}
    \begin{itemize}
    \item blah
    \item blah
    \item blah
    \end{itemize}
    (Source: blah 2020)
\end{column}
\begin{column}{0.4\textwidth}
    \begin{tikzpicture}[scale=0.75]
\begin{axis}[ymin={-1}, ymax={1}, hide axis]
    \addplot+[name path=f, no marks]
        table[row sep={\\}]
        {
            x  y  \\
            -1.0  0.0  \\
            0.0  0.0  \\
            1.0  1.0  \\
        }
        ;
    \addplot+[name path=g, no marks]
        table[row sep={\\}]
        {
            x  y  \\
            -1.0  0.0  \\
            0.0  0.5  \\
            1.0  1.0  \\
        }
        ;
    \addplot+[name path=h, no marks]
        table[row sep={\\}]
        {
            x  y  \\
            -1.0  -0.5  \\
            0.0  0.0  \\
            1.0  0.5  \\
        }
        ;
    \addplot+[thick, color={blue}, fill={blue}, opacity={0.25}]
        fill between [of=g and h]
        ;
\end{axis}
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}

\end{document}

example

5
  • please always provide an example we can run to see the problem and test answers Jan 9 at 20:14
  • \documentclass{beamer} \begin{document} \begin{columns} \begin{column}{0.5\textwidth} *some text bullets* \end{column} \begin{column}{0.5\textwidth} *a tikzpicture* \end{column} \end{columns} \end{document} makes this output so any problem is due to code you have not shown Jan 9 at 20:19
  • Your code (in order, and adding \begin/\end{document} makes this output so any problem is due to code you have not shown. Please make sure that you can copy and paste your code and get the problem you are talking about.
    – Teepeemm
    Jan 9 at 21:19
  • thanks for the update, I added the output of your document. It looks OK to me, can you clarify your question. Jan 9 at 22:17
  • I have produced a minimal (not) working example after some finagling. And discovered if I scale the tikzpicture down the text does show up but at the bottom of the screen and not nicely to the left of the figure.
    – Charlie
    Jan 9 at 22:42

1 Answer 1

1

You are aligning on the first reference point in each column, but it is easier to see where that is if you have a "normal" if invisible line there, so the two \mbox at the top of the columns align. I further adjusted the tikz position "by eye" with an extra \vspace

enter image description here

\begin{document}
\begin{frame}
    \frametitle{Title Title Title}
    text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 
\begin{columns}[t]
\begin{column}{0.4\textwidth}
\mbox{}

    \begin{itemize}
    \item blah
    \item blah
    \item blah
    \end{itemize}
    (Source: blah 2020)
\end{column}
\begin{column}{0.4\textwidth}
\mbox{}

  \vspace{20pt}

    \begin{tikzpicture}[scale=0.75]
\begin{axis}[ymin={-1}, ymax={1}, hide axis]
    \addplot+[name path=f, no marks]
        table[row sep={\\}]
        {
            x  y  \\
            -1.0  0.0  \\
            0.0  0.0  \\
            1.0  1.0  \\
        }
        ;
    \addplot+[name path=g, no marks]
        table[row sep={\\}]
        {
            x  y  \\
            -1.0  0.0  \\
            0.0  0.5  \\
            1.0  1.0  \\
        }
        ;
    \addplot+[name path=h, no marks]
        table[row sep={\\}]
        {
            x  y  \\
            -1.0  -0.5  \\
            0.0  0.0  \\
            1.0  0.5  \\
        }
        ;
    \addplot+[thick, color={blue}, fill={blue}, opacity={0.25}]
        fill between [of=g and h]
        ;
\end{axis}
\end{tikzpicture}
\end{column}
\end{columns}
\end{frame}

\end{document}
2
  • Thanks! Why didn't it pick the first bullet and the top of the tikzpicture to align before? Just for my own understanding. e.g. why does one have to add an mbox?
    – Charlie
    Jan 9 at 23:51
  • the list has vertical space like a vspace at the top. so it aligns on that, but you don't have to use \mbox . The main difficulty is visualising the ref point of the tikz. You could omit the mbox, and just adjust the vspace amount, but personally I would (and did) start by adding \mbox{} or \mbox{xxx} for debugging, so the alignment is clear then add vspace to adjust from that point @Charlie Jan 9 at 23:57

You must log in to answer this question.

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