1. type this following Latex code in your Latex editor:
% !TEX TS-program=pdflatex
% pdflatex drawEllipse1.tex
\documentclass{article}
\usepackage{tikz}
\usepackage[active,tightpage,pdflatex,multi,varwidth]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}
\begin{document}
\begin{tikzpicture}
%% draw a title
\draw(0,0) node{\textbf{Draw Ellipse}};
\draw(0,-25pt) node{\textbf{Using draw}};
\draw(0,-50pt) node {\textbf{circle command}};
\end{tikzpicture}
%% draw a horizontal ellipse / oval shape
\begin{tikzpicture}[very thick]
\draw(0,0) circle[x radius=2, y radius=1];
\end{tikzpicture}
%% draw a vertical ellipse / oval shape ( method 1 )
\begin{tikzpicture}
\draw[very thick](0,0) circle (1cm and 2cm);
\end{tikzpicture}
%% draw a vertical ellipse / oval shape ( method 2 )
\begin{tikzpicture}
\draw[very thick](0,0) ellipse (1cm and 2cm);
\end{tikzpicture}
\end{document}
2. save file as drawEllipse1.tex
3. then build or typeset or compile the Latex code.
2. save file as drawEllipse1.tex
3. then build or typeset or compile the Latex code.
Output:

<< Back to Study About Draw In Latex
Tidak ada komentar:
Posting Komentar