TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to plot some parametric curves, however I always get an an error saying "Dimension is too large". Is there any way to fix this?

\draw[very thin,color=gray,step=.5cm,dashed] (-8,-8) grid (4,4);
\draw[<->, blue] (-8,0) -- (4,0) node[below right] {$x$};
\draw[<->, blue] (0,-8) -- (0,4) node[left] {$y$};
\draw [red, thick,  domain=-10:1.1, samples=40] 
 plot ({\x^3-3*\x}, {3*\x^2-9} );
share|improve this question
The numbers are too big, just switch to pgfplots and it would work just fine. – percusse Aug 3 '12 at 14:23
up vote 11 down vote accepted

enter image description here




share|improve this answer

The problem was with the line

\draw [red, thick,  domain=-10:1.1, samples=40] 
 plot ({\x^3-3*\x}, {3*\x^2-9} );

In particular, your domain=-10:1.1 was too big. You could just change it, or even better, use pgfplots for your task, which is what I've demonstrated below.

Note the use of \pgfplotsset to set global settings in the preamble.



\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis


            \addplot [domain=-3:3,samples=50]({x^3-3*x},{3*x^2-9}); 
share|improve this answer
Thank you, so it seems as it is limited on the size of graphs it can handle. I thought that something was wrong with my code. Thanks again. – Tony Aug 3 '12 at 16:23

With PSTricks just for fun!


enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.