Graphics, Figures & TablesPlotting log_{3} x in PSTricks

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

Plotting log_{3} x in PSTricks

Post by coachbennett1981 »

Does anyone have any idea of how to plot this function in Pstricks.. I can do log x--- x log, but I do not know how to get base three.. Is this possible?

Nick

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Plotting log_{3} x in PSTricks

Post by gmedina »

Hi,

can't you just use the fact that, for example, log_3(x)=log_10(x)/log_10(3)? In this way, log_3(x) can be plot simply by plotting the result of multiplying log_10(x) by the constant 1/log_10(3).
Last edited by gmedina on Thu Mar 11, 2010 4:29 pm, edited 1 time in total.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Plotting log_{3} x in PSTricks

Post by CrazyHorse »

coachbennett1981 wrote:Does anyone have any idea of how to plot this function in Pstricks.. I can do log x--- x log, but I do not know how to get base three.. Is this possible?

Nick

Code: Select all

\documentclass{article}
\usepackage{pstricks-add}

\begin{document}

\begin{pspicture}(0,-3)(5,3)
\psaxes{->}(0,0)(0,-3)(5,3)[$x$,-90][$y$,180]
\psplot[algebraic,linecolor=red,
  linewidth=1.5pt]{0.1}{4}{ln(x)/ln(3)}
\psline[linestyle=dashed](3,0)(3,1)(0,1)
\end{pspicture}

\end{document} 
Herbert
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Plotting log_{3} x in PSTricks

Post by localghost »

Post Reply