Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am new to PSTricks and want to plot some functions. The documentation of pst-plot explains (but not detailed enough) both \psgraph environment and the combination of \pspicture and \psaxes. The thing I want to know is:

When should I use one rather than the other one?

Bonus question: I want to change the font of the axis labels from text to math. How can we do that?

\documentclass{minimal}
\usepackage{pst-plot}

\begin{document}
\begin{psgraph}[]{->}(0,0)(-1,-2)(\psPiTwo,2){8cm}{6cm}
    % plotting 
\end{psgraph}
\end{document}

Output:

enter image description here

share|improve this question
    
@Werner: Thank you very much for the useful comment. It really solved the problem. –  Stupid Boy Feb 27 '13 at 7:43

1 Answer 1

Since they are interchangeable, there should be no problem using either one or the other.

You should be able to change the x/y labels using

\psset[pst-plot]{xAxisLabel=$x$,yAxisLabel=$y$}

Here is a complete MWE:

enter image description here

\documentclass{article}
\usepackage{pst-plot}% http://ctan.org/pkg/pst-plot
\begin{document}
\psset[pst-plot]{xAxisLabel=$x$,yAxisLabel=$y$}
\begin{psgraph}[]{->}(0,0)(-1,-2)(\psPiTwo,2){8cm}{6cm}
    % plotting 
\end{psgraph}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.