Graphics, Figures & TablesProblem with PSTricks labels

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Problem with PSTricks labels

Post by coachbennett1981 »

Hey everyone, I plotted 10^x and its inverse log x on an axes. I changed both the y-scale, but in doing so, plotting (1,0), (0,1) are not in the correct locations. Here is the code I am working with.. Any suggestions on how to fix this error?

Code: Select all

\psset{unit=.5in}
\begin{pspicture}(-3.5,-2)(6,6) 
\psaxes[Dy=10,Dx=1,dy=1cm]{<->}(0,0)(-2,-3)(6,4)
\psplot[plotstyle=curve,linewidth=2pt,linecolor=red,arrows=<->]{-1.5} {.5} {10 x exp}
\psplot[plotstyle=curve,linewidth=2pt,linecolor=blue,arrows=<->]{.001}{6}{x log}
\qdisk(0,1){2pt}
\qdisk(1,10){2pt}
\qdisk(10,1){2pt}
\qdisk(1,0){2pt}
\end{pspicture}

Thanks,

Nick

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Problem with PSTricks labels

Post by CrazyHorse »

coachbennett1981 wrote:Hey everyone, I plotted 10^x and its inverse log x on an axes. I changed both the y-scale, but in doing so, plotting (1,0), (0,1) are not in the correct locations. Here is the code I am working with.. Any suggestions on how to fix this error?

Code: Select all

\psset{unit=.5in}
\begin{pspicture}(-3.5,-2)(6,6) 
\psaxes[Dy=10,Dx=1,dy=1cm]{<->}(0,0)(-2,-3)(6,4)
\psplot[plotstyle=curve,linewidth=2pt,linecolor=red,arrows=<->]{-1.5} {.5} {10 x exp}
\psplot[plotstyle=curve,linewidth=2pt,linecolor=blue,arrows=<->]{.001}{6}{x log}
\qdisk(0,1){2pt}
\qdisk(1,10){2pt}
\qdisk(10,1){2pt}
\qdisk(1,0){2pt}
\end{pspicture}

With Dy=10 you changed the labels of the y axis, but only the labels
and not the scaling which is still 0.5in. To get the point (0,1)
depending to the labels, you have to modify the scaling for this axis:

Code: Select all

\psset{yunit=0.1}
\qdisk(0,1){2pt}
\qdisk(1,10){2pt}
\qdisk(10,1){2pt}
\qdisk(1,0){2pt}
Herbert
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Re: Problem with PSTricks labels

Post by coachbennett1981 »

thanks man.. I appreciate it. I will check on this tonight.. Thank you

Edit: Thanks. That was very helpful.
Post Reply