Plotting Problem

View: New views
1 Messages — Rating Filter:   Alert me  

Plotting Problem

by xlogo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello everyone,

It seems there are computation problem when plotting functions

I try to plot the function x^2-2x-1 between -15 and 17.
I wrote this code:
----------------------------------------------------------
\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[x=0.5cm,y=0.5cm]
\clip (-15,-10) rectangle (17,10);
\draw[smooth,domain=-15:17] plot(\x,{\x^2-2*\x-1});
\end{tikzpicture}
\end{document}
------------------------------------------------------------------------

I compile with PdfLatex and I have this message error:
[PDFLatex]: Missing $ inserted. ...mooth,domain=-15:17] plot(\x,{\x^2-2*\x-1})

If I give a little interval, for example between -1 and 3, there's no problem.
Hence I think there is a bug with too higher value for the function.

Am I right?
Regards

Loïc


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users

test.png (22K) Download Attachment