その他一覧へ戻る

常用対数グラフ

鉄TeX機能紹介/TikZサンプル/常用対数グラフ.tex鉄TeX機能紹介 / TikZhybrid

レンダリング結果

1ページ / 同名PDFあり
常用対数グラフ preview
PDFを開く
TeXソース
TeXソース
入力コード
\documentclass[dvipdfmx]{article}
\usepackage{tikz}
\pagestyle{empty}
\usepackage[dvipdfmx,active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5mm}

\begin{document}
\begin{tikzpicture}[x=1cm,y=10cm,domain=1:10, samples=100]
\draw[xstep=0.1,ystep=0.01] (1,0) grid (10,1);
\draw[xstep=1,ystep=0.1,thick] (1,0) grid (10,1);
\draw[thick](1,0) rectangle(10,1);
\draw[domain=1:10, very thick] plot(\x, {ln(\x)/ln(10)});
\foreach \x in {1,...,10} {%
  \node[below] at (\x,0) {\x};
}
\foreach \y in {1,...,9} {%
  \node[left] at (1,\y/10) {0.\y};
}
\node[left] at (1,0) {0};
\node[left] at (1,1) {1.0};
\end{tikzpicture}

\end{document}