1

I used the instructions from

how-to-change-certain-pages-into-landscape-portrait-mode

to create a table with plots in landscape mode.

The page is turned , but with the left side up, instead of the right side up.

Also the landscape page is only half the size of a normal page. Why is that?

My code:

\begin{sideways}
\begin{landscape}
\begin{sidewaysfigure}
\par \textbf{Results for the CHSH}
\begin{tabular}{|c|c|c|c|}
\hline 
\multirow{epsilon} & \multicolumn{3}{c|}{some text}\tabularnewline
\cline{2-4} 
& some more text\tabularnewline
\hline 
0 (asdsa) & \includegraphics[width=0.45\textwidth]{dasdas} & \includegraphics[width=0.45\textwidth]{asda} & \includegraphics[width=0.45\textwidth]{asda}\tabularnewline
\hline 
0.1 & \includegraphics[width=0.45\textwidth]{asdas} & \includegraphics[width=0.45\textwidth]{asdas} & \includegraphics[width=0.45\textwidth]{asdasd}\tabularnewline
\hline 
10 & \includegraphics[width=0.45\textwidth]{asdasdas} & \includegraphics[width=0.45\textwidth]{asdasd} & \includegraphics[width=0.45\textwidth]{adasda}\tabularnewline
\hline 
100 & \includegraphics[width=0.45\textwidth]{asdasdad} & \includegraphics[width=0.45\textwidth]{sadasd} & \includegraphics[width=0.45\textwidth]{asdasdad}\tabularnewline
\hline 
\end{tabular}
\end{sidewaysfigure}
\end{landscape}
\end{sideways}

I just replaced the contents of the table with some random stuff. Can anyone help?

  • Please help us help you and add a minimal working example (MWE) starting with \documentclass{...} and ending with \end{document}. – Salim Bou Jul 30 '15 at 18:10
1

There are some conceptual problems with the code you've posted:

  • Nesting sideways, landscape, and sidewaysfigure environments is bound to give you grief. A single sidewaysfigure environment suffices.

  • You're trying to set up a tabular environment whose total width grossly exceeds the width of the (rotated) textblock. (For instance, 0.45*3=1.35>>1 -- and that's not even taking into account the width of the first column!) Instead of calculating the maximum available column width myself, I'd use a tabularx environment, set its overall width to \textwidth, let LaTeX calculate the available width for columns 2, 3, and 4, and specify \linewidth as the width for each of the 12 graphs.

  • To get a predictable placement of the caption, use the \caption command. If you do not want a "Figure :" prefix, be sure to load the caption package and to use \caption* to generate the caption. That's what's done in the example below.

A minor nit-pick: The \multirow directive takes three arguments, not one.

enter image description here

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{rotating,multirow,tabularx,caption}
\captionsetup{font=bf} % use this instruction if you really need bold captions
\begin{document}

\begin{sidewaysfigure}
\caption*{Results for the CHSH} % use "\caption" if you want numbered output
\begin{tabularx}{\textwidth}{|c|X|X|X|} % let LaTeX calculate width of columns 2, 3, and 4
\hline 
\multirow{2}{*}{epsilon} 
& \multicolumn{3}{c|}{some text}\\
\cline{2-4} 
& \multicolumn{1}{c|}{some more text} & & \\
\hline 
0 (asdsa) & 
\includegraphics[width=\linewidth]{dasdas} & 
\includegraphics[width=\linewidth]{asda} & 
\includegraphics[width=\linewidth]{asda}\\
\hline 
0.1 & 
\includegraphics[width=\linewidth]{asdas} & 
\includegraphics[width=\linewidth]{asdas} & 
\includegraphics[width=\linewidth]{asdasd}\\
\hline 
10 & 
\includegraphics[width=\linewidth]{asdasdas} & 
\includegraphics[width=\linewidth]{asdasd} & 
\includegraphics[width=\linewidth]{adasda}\\
\hline 
100 & 
\includegraphics[width=\linewidth]{asdasdad} & 
\includegraphics[width=\linewidth]{sadasd} & 
\includegraphics[width=\linewidth]{asdasdad}\\
\hline 
\end{tabularx}
\end{sidewaysfigure}
\end{document}
0

I can't tell you exactly what is wrong without a proper example which can be compiled to reproduce the problem. I experimented, but failed to reproduce the issue you described.

Even after completing your code to create a minimal document, I got errors:

  • \multirow{}{}{} requires 3 arguments - not 1
  • nobody can compile a document which requires files they do not have without special measures

I am guessing, from the filenames, that you did not test your example before posting. An example is of little use if it does not reproduce the issue you want help with. An example is unlikely to reproduce that issue if you don't test it to make sure that it does.

I can say that it is certainly a mistake to use sideways and landscape and sidewaysfigure. You probably want one of these. I've gone with the third, but you may take your pick. I've also adjusted the image sizes to make the black boxes fit the page, switched to \caption, corrected a missing vertical rule, corrected the use of \multirow and used $\epsilon$ to save space.

Your kilometres may vary.

\documentclass[a4paper]{article}
\usepackage[demo]{graphicx}
\usepackage{rotating,multirow}

\begin{document}
\begin{sidewaysfigure}
  \centering
  \caption{Results for the CHSH}
  \begin{tabular}{|c|c|c|c|}
    \hline
    \multirow{2}*{$\epsilon$} & \multicolumn{3}{c|}{some text}\tabularnewline
    \cline{2-4}
    & some more text &&\tabularnewline
    \hline
    0 (asdsa) & \includegraphics[width=0.25\textwidth]{dasdas} & \includegraphics[width=0.25\textwidth]{asda} & \includegraphics[width=0.25\textwidth]{asda}\tabularnewline
    \hline
    0.1 & \includegraphics[width=0.25\textwidth]{asdas} & \includegraphics[width=0.25\textwidth]{asdas} & \includegraphics[width=0.25\textwidth]{asdasd}\tabularnewline
    \hline
    10 & \includegraphics[width=0.25\textwidth]{asdasdas} & \includegraphics[width=0.25\textwidth]{asdasd} & \includegraphics[width=0.25\textwidth]{adasda}\tabularnewline
    \hline
    100 & \includegraphics[width=0.25\textwidth]{asdasdad} & \includegraphics[width=0.25\textwidth]{sadasd} & \includegraphics[width=0.25\textwidth]{asdasdad}\tabularnewline
    \hline
  \end{tabular}
\end{sidewaysfigure}
\end{document}

tabular

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.