図の作成や貼り付けを行う.

図の作成

picture環境

picture環境のもと文字や記号を記述する.

テンプレート
\begin{picture}
\put(x座標の始点,y座標の始点){表示する文字や記号}
\end{picture}
例文
begin
\begin{picture}(100,50)
\put(0,0){===========}
\put(0,50){(left,top)}
\put(100,50){(right,top)}
\put(50,25){(50,25)}
\end{picture}
end
出力
picture-1.gif

丸と線

丸や線を用いて簡単な図を作成する.

テンプレート
\begin{picture}(横方向の範囲,縦方向の範囲)
\put(x,y){\line(a,b){length}}
\put(x,y){\circle{半径}}
\put(x,y){\circle*{半径}}
\end{picture}
例文
\begin{picture}(200,120)
\put(0,0){\circle{7}}
\put(0,0){\line(0,1){120}}
\put(0,0){\line(1,0){200}}
\put(80,50){\circle*{5}}
\put(180,100){\circle*{5}}
\put(0,50){\circle{3}}
\put(80,0){\circle{3}}
\put(180,0){\circle{3}}
\put(80,50){\line(2,1){100}}
\put(0,50){\line(1,0){140}}
\put(80,0){\line(0,1){50}}
\put(140,50){\line(0,1){30}}
\put(180,0){\line(0,1){100}}
\put(25,5){x(80)}
\put(5,25){y(50)}
\put(105,35){a(2)}
\put(145,65){b(1)}
\put(100,5){length(100)}
\end{picture}
出力
picture-2.gif

includegraphicsコマンド

eps形式の画像ファイルを取り込む.

テンプレート
\includegraphics[width=1.0\linewidth]{画像のepsファイル名} 
\includegraphics[width=0.5\linewidth]{sin.eps} 
出力
sin.gif

図の配置

figure

図をフロートオブジェクトと呼ばれる貼り付ける対象として取り扱うことで,適切な位置に表示できる.

テンプレート
\begin{figure}[htbp]
picture環境
あるいは
includegraphicsコマンド
を記述する.
\end{figure}
\begin{figure}[htbp]
 \includegraphics[width=0.5\linewidth]{figure-sin.eps} 
\end{center}
\end{figure}

中央揃え

図を中央揃えで表示する.

テンプレート
\begin{figure}[htbp]
\begin{center}
picture環境
あるいは
includegraphicsコマンド
を記述する.
\end{center}
\end{figure}
\begin{figure}[htbp]
\begin{center}
 \includegraphics[width=0.5\linewidth]{center-sin.eps} 
\end{center}
\end{figure}

キャプション

図のキャプションを出力するには,figure環境の中で,\captionコマンドを実行する.

下部に表示

図のキャプションは下部に出力する場合が多い.

テンプレート
\begin{figure}[htbp]
picture環境
あるいは
includegraphicsコマンド
を記述する.
\caption{キャプションコメント}
\end{figure}
\begin{figure}[htbp]
 \includegraphics[width=0.5\linewidth]{center-sin.eps} 
\caption{sin(x)}
\end{figure}
上部に表示

キャプションを上部に出力することもできる.

テンプレート
\begin{figure}[htbp]
\caption{キャプションコメント}
picture環境
あるいは
includegraphicsコマンド
を記述する.
\end{figure}
\begin{figure}[htbp]
\caption{sin(x)}
 \includegraphics[width=0.5\linewidth]{center-sin.eps} 
\end{figure}

参照

文中で図を参照する.

参照元のテンプレート
\begin{figure}[htbp]
picture環境
あるいは
includegraphicsコマンド
を記述する.
\label{ラベル}
\end{figure}
参照先のテンプレート
\ref{ラベル}
参照元の例
\begin{figure}[htbp]
 \includegraphics[width=0.5\linewidth]{center-sin.eps} 
\label{figure01}
\end{figure}
参照先の例
\ref{figure01}

雛形

その1

図を中心に揃え,キャプションを表の下部に表示する.

テンプレート
\begin{figure}[htbp]
\begin{center}
 \includegraphics[width=1.0\linewidth]{画像のepsファイル名} 
\end{center}
\caption{キャプションコメント}
\label{ラベル}
\end{figure}

その2

図を中心に揃え,キャプションを表の上部に表示する.

テンプレート
\begin{figure}[htbp]
\caption{キャプションコメント}
\begin{center}
 \includegraphics[width=1.0\linewidth]{画像のepsファイル名} 
\end{center}
\label{ラベル}
\end{figure}