如何在 tikz 上绘制 log_0.1?

如何在 tikz 上绘制 log_0.1?

我正在尝试使用 tikz 绘制 y=log_(0.1),但似乎找不到正确的语法。以下是我目前所拥有的。

\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{arrows}
\begin{document}

\begin{tikzpicture}
\coordinate[label=0:$Y$] (y) at (0,2.5);
\coordinate (y1) at (0,-2);
\coordinate[label=90:$X$] (x) at (4,0);
\coordinate (x1) at (-0.5,0);
\coordinate[label=-135:$O$] (o) at (0,0);

\draw[-latex] (x1)--(x);
\draw[-latex] (y1)--(y);
\draw plot[domain=0.3:3.8] (\x,{log10(\x)});
\draw plot[domain=2:3.8] (\x,{log0.1(\x)});
\end{tikzpicture}
\end{document}

答案1

这有效:

\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{arrows}
\begin{document}

\begin{tikzpicture}
\coordinate[label=0:$Y$] (y) at (0,2.5);
\coordinate (y1) at (0,-2);
\coordinate[label=90:$X$] (x) at (4,0);
\coordinate (x1) at (-0.5,0);
\coordinate[label=-135:$O$] (o) at (0,0);

\draw[-latex] (x1)--(x);
\draw[-latex] (y1)--(y);
\draw plot[domain=0.3:3.8] (\x,{log10(\x)});
\draw plot[domain=0.3:3.8] (\x,{ log10(\x)/log10(0.1) });
\end{tikzpicture}
\end{document}

对数的基本基数变化。请参见此处:http://www.sosmath.com/algebra/logs/log4/log43/log43.html

相关内容