# How do I plot graphs of natural and decimal logarithms in the same diagram with TikZ?

My question is to seek for the code to plot the graphs of the natural and decimal logarithms both in the same diagram using TikZ?

• what is a repert? – percusse Mar 25 '17 at 17:40
• I think repert is a faute d'orthographe for french : repère meaning axis in the sense of pgfplots – marsupilam Mar 25 '17 at 17:42
• I meant cartisien plane " axis" – zeraoulia rafik Mar 25 '17 at 17:43
• @marsupilam, thanks i have mixed between french and english – zeraoulia rafik Mar 25 '17 at 17:44

\documentclass[]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\begin{document}
\begin{tikzpicture}
\begin{axis}[no marks,axis lines*=middle,samples=101]
\end{axis}
\end{tikzpicture}
\end{document}


• could you show me how do i can writing under this plot , i don't meant caption ? – zeraoulia rafik Mar 26 '17 at 11:50

\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (-0.95,0.2) -- (5.4,0.2);
\foreach \x in {,1.,2.,3.,4.,5.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {$\x$};
\draw[->,color=black] (0.1,-2.93) -- (0.,2.02);
\foreach \y in {-2.,-1.,1.,2.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {$\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-0.95,-2.93) rectangle (5.38,2.02);
\draw[line width=1.2pt,color=magenta,smooth,samples=100,domain=0.1:7] plot(\x,{ln((\x))});
\draw[line width=1.2pt,color=green,smooth,samples=100,domain=0.1:7] plot(\x,{log10((\x))});
\draw (2.38,1.64) node[anchor=north west] {$f(x)=\ln(x)$};
\draw (2.4,1) node[anchor=north west] {$g(x)=\log_{10}(x)$};
\begin{scriptsize}
\draw[color=magenta] (0.16,-4.54) node {$f$};
\draw[color=green] (0.15,-4.54) node {$g$};
\end{scriptsize}
\end{tikzpicture}
\end{document}