Let us plot a logarithmic scale graph to shown how these options are used.
\documentclass{article}
\usepackage{pstricks}
\usepackage{pstricks-add}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}(0,0)(6,5)
\psaxes[axesstyle=frame,ylogBase=10,
subticks=5,logLines=y](0,0)(6,5)
\psplot[linecolor=red]{0}{5}{x}
\psplot[linecolor=blue,linestyle=dotted,
linewidth=1.5pt,dotsep=1pt]
{0}{6}{0.5 x mul}
\psplot[linecolor=green,linestyle=dashed]
{1}{6}{x log 4 mul}
\rput(3.5,4.25){\color{red}$y=10^{x}$}
\rput(3,2.25){\color{green}$y=x^{4}$}
\rput(3.5,1.25){\color{blue}$y=10^{x/2}$}
\rput(3,-0.75){$x$}
\rput(-1,2.5){$y$}
\end{pspicture}
\end{document}
![]() |
| Fig.1 Plotting Logarithmic scale graph using Pstricks. |
Options "nStep, nStart, nEnd, xStep, XStart, xEnd, yStart, yEnd" controls the plot range.
By default the plot macros expect x|y data records, but when data files contains more than one y value, like:
x y1 y2 ... yMax x y1 y2 ... yMax ...
Files: tex ps pdf

No comments:
Post a Comment