4
\documentclass[12pt,pstricks,border=5pt]{standalone}

\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(-7,-1.5)(7,1.5)
\psaxes[trigLabels=true,trigLabelBase=2,dx=\psPiH,xunit=\psPi]{->}(0,0)(-2.2,-1.5)(2.2,1.5)
\psplot[linecolor=red,linewidth=1.5pt,algebraic,plotstyle=curve]{-7}{7}{sin(x)}
\end{pspicture}

\end{document}

enter image description here

How to change the axes label from radian to degrees (for example, from -360^\circ, -270^\circ, ..., 360^\circ)?

4
\documentclass[12pt,pstricks,border=5pt]{standalone}
\usepackage{pst-plot}

\begin{document}
\begin{pspicture}(-7,-1.5)(7,1.5)
\psaxes[Dx=90,dx=\psPiH,xunit=\psPi,xlabelFactor={}^\circ]{->}(0,0)(-2.2,-1.5)(2.2,1.5)
\psplot[linecolor=red,linewidth=1.5pt,algebraic,plotpoints=100]{-7}{7}{sin(x)}
\end{pspicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy