So I'm trying to draw a graph within Latex using the pst-plot package but I'm having trouble in a very odd place.
Here's my coding:
Code: Select all
\documentclass[11pt]{book}\usepackage{pst-plot}\usepackage{pstricks}\begin{document}\psset{unit=2cm}\begin{pspicture}(-2.5,-1)(2.5,1)\psline[linewidth=.5pt](-2.5,0)(2.55,0) % x-axis\psline[linewidth=.5pt](0,-1)(0,1) % y-axis\psplot[plotpoints=300]{-2.5}{.133}{3 x 2 exp mul 2 x mul sub 15 x mul 2 sub div}\psplot[plotpoints=300]{.134}{2.5}{3 x 2 exp mul 2 x mul sub 15 x mul 2 sub div}\end{pspicture}\end{document}
! LaTex Error: Two \documentclass or \documentstyle commands
The confusion is that I've used this in the preamble before and it works perfectly fine. It is only in conjunction with the attempted pst-plot package that this arises. Can someone please explain?
Any feedback would be most appreciated. Thanks!