TikZ: a LaTeX package for creating graphics in scientific documents
In this tutorial, we will learn the basics of TikZ which is a LaTeX package for creating graphics in scientific documents. In this tutorial, it is assumed that the reader is familiar with the basics of LaTeX for writing scientific documents.
To use TikZ in our LaTeX document, we need to use the following package:
\usepackage{tikz}
Note that there is no need to use an external graphics program.
The basic structure of the TikZ code block is shown below:
\begin{tikzpicture}
< TikZ codes >
\end{tikzpicture}
Drawing lines
In TikZ, the basic drawing command is \draw. We can draw the figure shown below using TikZ commands. The corresponding codes are given below:
\begin{tikzpicture}[scale=1.5]
\draw[color=red,very thick]…