There has been a post related to this subject in the past, but it didn't really address my problem.

The general problem I have is plotting functions in LaTeX. I could of course import an image from Maple or Mathematica, but now I'm acquainted a bit with the TikZ environment which can make very nice images, I'd like to try it by only using my editor (I work on a Mac, with Texpad as an editor).

One possibility I read about was using pgfplots (something already included in TikZ) to draw functions, another was using gnuplot (which I downloaded, I have version 4.6.0). Here are two minimal working examples (using pgfplots and gnuplot respectively):

\begin{tikzpicture} \draw[->] (0,0) -- (4,0) node [right] {$x$}; \draw[->] (0,0) -- (0,4) node [right] {$y$}; \draw plot[id=x, domain=0:4] function{sqrt(9 - x*x)}; \end{tikzpicture}

\begin{tikzpicture} \begin{axis}[axis x line=middle, axis y line=middle, xlabel=$x$,ylabel=$y$] \addplot[domain=0:5] {sqrt(9-x^2)}; \end{axis} \end{tikzpicture}

One thing that concerns me is the roughness of both curves; they are not smooth. I read somewhere that a good reason to use gnuplot is it's capability to produce smooth curves (many points). How can I get the curves to be smooth?

Another thing I'm wondering about is how to get the pgfplots-plot to look exactly like the gnuplot-plot (without the numbers and ticks on the axes). I tried fiddling around a bit with this, but no success.

Thanks a lot,

Latrace