Graphics, Figures & Tablesaxis: Dimension too large when setting ymax=800,000

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
johannesschauer97
Posts: 1
Joined: Tue Apr 19, 2016 8:07 pm

axis: Dimension too large when setting ymax=800,000

Post by johannesschauer97 »

Hey guys,

I actually want to draw a graph with xmax=260 and ymax=800,000, but when I want to render I get: "Dimension too large"

What can I do?

Code: Select all

\documentclass{article}

\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        width=4in,
        height=4in,
        xlabel={x \ (in \ ME)},
        ylabel={GE},
        axis x line=middle,
        axis y line=middle,
        % the following x label positioning does work here.
        every axis x label/.style=
            {at={(ticklabel cs: 0.5,0)}, anchor=north},
        ytick={0,200000,400000,...,600000},
        xtick={0,40,80,...,240},
        ymin=0,
        ymax=800000,
        xmin=0,
        xmax=260,
        xlabel shift = -1in,
        clip mode=individual
    ]
    \end{axis}
\end{tikzpicture}
\end{document}

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

Post Reply