I have some figures that are very big, so I placed them in landscape mode.
They are still too big for landscape mode so they get out of the page's margin. The problem is that the figure looks like it has a big blank space in the upper part of the page, so I would like to center the figure so that the distance between the figure and the upper and lower borders are the same.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
You can remove both the figure environment and the center environment. figure is for floating, referencing, captions, but you don't use it anyway. Instead of \begin{center} and \end{center} just keep \centering, otherwise you get unnecessary space before and after it. \centering is for pure centering, while \begin{center} ... \end{center} is for displaying centered paragraphs within surrounding text, that's why it brings vertical space around.
Seems like you want also "vertical" centering in landscape mode. You could add \vspace*{\fill} before and after it to achieve that.
Stefan Kottwitz wrote:You can remove both the figure environment and the center environment. figure is for floating, referencing, captions, but you don't use it anyway. Instead of \begin{center} and \end{center} just keep \centering, otherwise you get unnecessary space before and after it. \centering is for pure centering, while \begin{center} ... \end{center} is for displaying centered paragraphs within surrounding text, that's why it brings vertical space around.
Seems like you want also "vertical" centering in landscape mode. You could add \vspace*{\fill} before and after it to achieve that.
Stefan
If I remove figure I cannot add a caption right? I need the image to be a figure so it has a caption and it appears in the ToC.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p