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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply