Tikz is one of the most widely used packages for image creation in Latex. It has so much that there is absolutely nothing that you can't draw with latex and can with some other tool. In this tutorial we explain the basics of Tikz. We go over the basic shapes, how to draw them, how to understand the co-ordinates, and positioning of the components of an image.
Specifically, this tutorial demonstrates:
- How to draw a rectangle in Latex using TikZ
- How to draw a ellipse in Latex using TikZ
- How to draw a circle in Latex using TikZ
- How to draw an arc in Latex using TikZ
- How to fill the shapes with colors
- How to change the line styles - solid, dashed etc.
The code for this experiment is here:
\documentclass{article}\usepackage{tikz}\usetikzlibrary{shapes, arrows, shadows}\begin{document}\begin{tikzpicture}\draw[fill=blue] (2,3) ellipse (2 and 3);\draw[fill=red, style=dashed] (2,3) circle (2);\draw (0,0) rectangle (4,4);\draw[fill=red!50] (1,2) -- +(40:4) arc(40:180:4) -- cycle;\end{tikzpicture}\end{document}
The video where I develop this code and explain everything is below. If you have a question or want me to demonstrate any particular feature in Latex just leave me a comment and I will address it.
Hello...Thanx For Sharing Those Videos...It Really Helped Me Until I Started Using Tikz...I Copy Pasted Ur Code And Tried To Run It But My Latex Gave Me :
ReplyDeletetexify.exe: Permission denied: flow chart.log
texify.exe: Data: flow chart.log
Whats The Problem?
I'd Appreciate It If You Could Help Me :)
Hi,
DeleteCan you close all the files and Miktex and start from scratch again with a basic code? You might have permission issues due to some file conflict.
If that does not help, try restarting especially if you use a windows machine. This code just works fine for me. I haven't run into that problem so don't know much but I will try to help.
Regards,
Dinesh Agarwal