I'm trying to copy the graph of a piecewise function created in GeoGebra into a LaTeX document but all I see are the axes -- no curves. I'm running TexShop and compiling with XeLaTex. In the log file I get the following ominous messages:
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command pst: (ps:) failed.
The thing is that simpler graphs, like parabolae and lines seem to be ok --- is this one just way too complicated?
\documentclass[10pt]{article}
\usepackage{pstricks-add}
%\usepackage{pst-plot}
\pagestyle{empty}
\begin{document}
\newrgbcolor{xdxdff}{0.49 0.49 1}
\psset{algebraic=true}
\psset{xunit=2.0cm,yunit=2.0cm}
\begin{pspicture*}(-3.94,-5.35)(7.93,3.35)
\psgrid[subgriddiv=0,gridlabels=0,gridcolor=lightgray](0,0)(-3.94,-5.35)(7.93,3.35)
\psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=2,Dy=2,ticksize=-2pt 0,subticks=2]{->}(0,0)(-7.88,-10.7)(15.86,6.69)
\psplot[plotpoints=200]{-7.883107654532565}{0.95999979546005}{(x*<*0.96)*(x^2+1)}
\psplot[plotpoints=200]{1.0800001247036413}{6.999999907292117}{((1.08*<*x)*∧*(x*<*7))*(x-1)*(x-2)*(x-5)/(x-4)}
\begin{scriptsize}
\psdots[dotstyle=*,linecolor=blue](1,4)
\psdots[dotsize=4pt 0,linecolor=xdxdff](1,2)
\psdots[linecolor=xdxdff](1,0)
\end{scriptsize}
\end{pspicture*}
\end{document}
GeoGebra
is a good tool for interaction, but like most export feature, the code is not clean. Have a look at What is the clearest way to graph a piecewise function? for home-made, clean code :) Welcome!