4

So I have this code:

     \begin{figure}[H]
\centering
\includegraphics[height=\textheight, width=\textwidth]{similar_waveforms_filtered_and_cut_new}  
\caption{Seiemic traces for events studied in this project with picks made at station DE02 - the closest station to the locations determined.}
\label{similar_waveforms}  
\end{figure}

and I am trying to 'best fit' an image that I have rotated so that it is portrayed vertically. when I am using height=\textheight, width=\textwidth my caption appears below the footnote - is there a way to correct this? I have attached an image for referenceseismic_waves. Many Thanks

2

1 Answer 1

4

as mentioned in my comments:

\documentclass{article}
\usepackage[demo]{graphicx}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
     \begin{figure}[htbp]
\centering
\includegraphics[height=\dimexpr\textheight-3\baselineskip, % <---
                 width=\textwidth,
                 keepaspectio]%
                {similar_waveforms_filtered_and_cut_new}
\caption{Seiemic traces for events studied in this project with picks made at station DE02 - the closest station to the locations determined.}
\label{similar_waveforms}
\end{figure}
\end{document}

enter image description here

3
  • Dear @HB, if answer solve your problem, you can accept it (by clicking on check mark at top left side of the answer ;-)
    – Zarko
    Apr 20, 2019 at 11:52
  • I think it would be a good idea to add a \keepaspectio option to \includegraphics. While it doesn't make a difference for the black rectangle that's used in your answer, it's probably a good thing to have in general.
    – Mico
    Apr 20, 2019 at 12:20
  • @Mico, you are right. corrected.
    – Zarko
    Apr 20, 2019 at 12:56

You must log in to answer this question.

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