A simple example of pgfplot application. This plot uses data from a text file where data are organized in columns. You can see how to draw the most straightforward way and a few methods for data manipulation in your tex file.
This is an example paper for manuscripts for the journal Solar Physics, downloaded from the journal's support page for LaTeX authors. It contains the basic commands to write an article as well as some explanations for defining equations, figures, tables, and references.