# [pstricks] A little help deciphering code and a question

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri May 2 08:15:37 CEST 2014

Scott, Randy schrieb:

> I am modifying a graph that I borrowed from a colleague. I hope some of
> you might be able to help me figure out the following questions I have.
>
> 1. What is the purpose of
>
> \makebox(0,0)[cc]{\footnotesize{$p_0$}}

that maeks no sense here. Also the \put commands. Use \rput instead:

\documentclass{article}
\usepackage[pdf]{pstricks}
\usepackage{pst-plot}

\begin{document}
\begin{pspicture}(10,8)
\psset{xunit=2,yunit=0.75}
\psaxes[labels=none, ticks=none](0,0)(4.75,8.25)[$q$
\textsf{(quantity)},90][$p$ \textsf{(price/unit)},90]

\psset{algebraic,plotstyle=curve}
\psplot[linecolor=blue]{0}{4}{0.5*(x-4)^2}
\psplot[linecolor=blue]{0}{4}{0.25*x^2+1}

\psline[linestyle=dotted](2,0)(2,2)
\psline[linestyle=dotted](0,2)(2,2)

\psyTick(0.75){\scriptstyle p_0}
\psyTick(1.5){\scriptstyle p*}
\psyTick(6){\scriptstyle p_1}
\psxTick(4){\scriptstyle q*}
\psxTick(7.75){\scriptstyle q_1}
\rput(3.2,3){\footnotesize\textsf{Supply}}
\rput(1.8,4.25){\footnotesize\textsf{Demand}}
\end{pspicture}

\end{document}

Herbert