I would like to draw a curve in latex but when I put this code
\psset{algebraic=true}
\pspicture(-2,-0.5)(2,2)
\psline{<->}(-2,0)(2,0)
\psline{->}(0,-0.5)(0,2)
\psplot{-1.5}{1}{x*x+x}
\endpspicture
theses errors appear
! Undefined control sequence.<recently read> \c@lor@to@ps \psline(
! Undefined control sequence.\XC@usec@lor ...string \color@ #1#2\endcsname \@@\fi \space \psline(
! Undefined control sequence.<recently read> \c@lor@to@ps \psline
Please if someone can help me because i didn't understand why this error appears.
\documentclass{article}
\usepackage[french]{babel}
\usepackage{color}
\usepackage{xcolor} %les couleurs
\definecolor{myblue}{rgb}{0.2,0.4,1}
\usepackage{layout}
\usepackage[top=2 cm, bottom=2 cm, left=2 cm, right=2 cm]{geometry}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{array}
\usepackage{pstricks-add}
\usepackage{pst-eucl}
\begin{document}
\psset{algebraic=true}
\pspicture(-2,-0.5)(2,2)
\psline{<->}(-2,0)(2,0)
\psline{->}(0,-0.5)(0,2)
\psplot{-1.5}{1}{x*x+x}
\endpspicture
\end{document}




pdflatex,latex,xelatex)? What plotting package do you want to use (PStricks,pgfplots)? In what form do you want to provide the plot data (a text file of comma separated values, coordinates you'll enter into the.texfile)? – Jake Apr 23 '12 at 14:03I would like to draw a curve in latex with my own data so how i can make that please?
i use the compiler pdflatex and i use plotting package pgfplots and I don't know what is the best form to provide this? but the same error still
– boutheina Apr 23 '12 at 14:22pgfplotsmanual would already answer your question. – Jake Apr 23 '12 at 14:32pgfplotsanddataon this site and you'll find lots. If you're looking for concrete advice, add that to your question. Also, you should pay attention to correct orthography (capitalising "I", for example), I believe that may trigger the "low quality" error as well. – Jake Apr 23 '12 at 15:05\documentclass), a sample of yourpgfplots.testtabledatafile, and the error message you get. – Jake Apr 28 '12 at 22:54\addplot table {<data source>};with some optional arguments. Please, take a look at p. 22 of the manual (for the\addplotcommand in general) and p. 26 (for thetableinput). – Jake Apr 28 '12 at 23:04