For research, lecture notes, tutorials, examinations, and online quizzes we often need to simply generate high quality graphs. The LATEX package pgfplots does a beautiful and exible job such as the following. This document concisely summarises some useful basics of 2D pgfplots (3D is available but not addressed here).