[pstricks] Help - Trig functions and axis labels
Hensh, Richard
hensh at math.msu.edu
Fri Apr 2 17:18:11 CEST 2010
Try this:
%%%%%%%%%%%%%%
\documentclass[12pt,dvips]{minimal}
\usepackage{pst-func}
\usepackage{pstricks-add}
\begin{document}
\psset{plotpoints=200}
\psset{unit=10mm}
\def\xmin{-5}\def\xmax{5}
\def\ymin{-3}\def\ymax{3}
\begin{center}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)%
\pstVerb{%
/rad2deg {RadToDeg} def %
/s at x {rad2deg 2 mul sin 2 mul} def %
/t at x {rad2deg tan} def %
}
\psaxes[arrowscale=1.5,arrows=->](0,0)(\xmin,\ymin)(\xmax,\ymax)%
\SpecialCoor%
\psclip{\psframe[linecolor=white](\xmin,\ymin)(\xmax,\ymax)}
\psplot[linecolor=blue]{\xmin}{\xmax}{x s at x}%
\psplot[linecolor=green,yMaxValue=15]{\xmin}{\xmax}{x t at x}%
\multido{\ry=-4.71+3.1415}{4}{%
\psline[linecolor=gray,linewidth=1.0pt,linestyle=dashed](\ry,\ymin)(\ry,\ymax)
}
\endpsclip
\uput{8pt}[180](0,\ymax){$w$-Axis}
\uput{8pt}[-90](\xmax,0){$s$-Axis}
\uput{6pt}[20](!1 dup s at x){$w=2\sin 2s$}
\uput{6pt}[-20](!1.95 dup t at x){$w=\tan s$}
\psdots[linewidth=1.5pt,linecolor=red](!-3 dup s at x)(!PI 4 div dup s at x)
\NormalCoor
\end{pspicture}
\end{center}
\end{document}
%%%%%%%%%%%%%%%
regards
rick
From: pstricks-bounces at tug.org [pstricks-bounces at tug.org] On Behalf Of Chandrasekhar S [chandru.math at hotmail.com]
Sent: Thursday, April 01, 2010 2:19 PM
To: pstricks at tug.org
Subject: [pstricks] Help
Hi--
Everyone, I am an new to pstricks and all i can say is that i have enjoyed every moment of it. This is such a beautiful package. I want to learn more and more. I have some simple questions which i want you people to answer it. So, here are the questions:
# How can i name the axes according to my wish. For e.g i want the x-axis( y-axis) to be labeled as (a,b,c) where a,b,c could be any constants or mathematical constants such as pi etc.
## Which is the best method to plot trigonometrical functions. Until now i am only able to plot these algebraic ones.
Thanks,
Chandrasekhar.
♫
-----------
"What lies behind us and what lies before us are tiny matters compared to what lies within us":- Ralph Waldo Emerson.
The best dressed and the most admired Drag n’ drop
More information about the PSTricks
mailing list