Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

3 Answers 3

up vote 9 down vote accepted

enter image description here




share|improve this answer
add comment

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
add comment

With PSTricks just for fun!


enter image description here

share|improve this answer
add comment

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.