How to Plot a Function and Data in LaTeX

Plotting functions and data in LaTeX is quiet easy and this is possible thanks to the TikZ and Pgfplots packages. In this tutorial, we will learn how to plot functions from a mathematical expression or from a given data. Moreover, we will learn how to create axes, add labels and legend and change the graph style.

How to use the Foreach Loop in LaTeX

clock in Tikz

Loops are among the most basic and powerful of programming concepts and LaTeX is not an exception. In this laTeX tutorial, we will learn how to use foreach…

Free Body Diagram of Atwoods Machine in TikZ

Atwood Machine in TikZ

In this post, we will learn how to draw the free body diagram of Atwood’s Machine in LaTeX using TikZ package. At the end of this tutorial, we will be able to: 1) draw a circle, a rectangle and a trapezium; 2) fill a shape with patterns and create smooth corners. 3) draw arrows and add labels.