Graphics, Figures & TablesToo large Dimension in Picture

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Thomas_l
Posts: 6
Joined: Fri Apr 19, 2013 3:13 pm

Too large Dimension in Picture

Post by Thomas_l »

Hi all,

I am working on a presentation where I want to show the duct layout of a ventilation system. The plan was to draw the ventilation system with a TikZ picture. For easier drawing I wanted to give the coordinates in mm and then scale the tikzpicture itself.

Code: Select all

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}
  \begin{minipage}{\textwidth}
    \centering
    \begin{tikzpicture}[scale=0.002]
      \draw (-500,350) rectangle (500,-350);
      \draw (500,250) rectangle (600,50);
    \end{tikzpicture}
  \end{minipage}
\end{frame}

\end{document}
The picture is drawn correct but I keep getting the dimension to large error.

Regards
Thomas

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

Too large Dimension in Picture

Post by alainremillard »

tikz allows to specify the basic length for x and y units. It is 1 cm by default. An x value of 600 means a line close over 19 feet long. By changing the basic units to 1mm, see below, it solve your problem. (Scale value was ajusted)

Code: Select all

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}
  \begin{minipage}{\textwidth}
    \centering
    \begin{tikzpicture}[x=1mm,y=1mm,scale=0.02]
      \draw (-500,350) rectangle (500,-350);
      \draw (500,250) rectangle (600,50);
    \end{tikzpicture}
  \end{minipage}
\end{frame}

\end{document}
Have a nice day

Alain Rémillard
Post Reply