Each parameter make online friends over the world function is grouped inside curly brackets and the three parameters are delimited with parenthesis.

Nevertheless, the default options usually give very good result, so all you have to do is feed the data and LaTeX will do the rest: edit Plotting mathematical expressions To plot mathematical expressions is really easy: begintikzpicture beginaxis axis lines left, xlabel x, ylabel f(x.

Again, don't forget to put a semicolon ; at the end of the command.

If anything, change the value of -0.2 to locate the legend closer/farther from the x-axis.This will set the axis only on the left and bottom sides of the plot, instead of the default box.Below the description of the code: enlarge limitsfalse This will shrink the axes so the point with maximum and minimum values lay on the edge of the plot.Note: It's recommended as a good practice to indent the code - see the second plot in the example above - and to add a comma, at the end of each option passed to addplot.Addlegendentryx2 - 2x -.1 meaning the bars will be one next to the other with no gaps and 0 meaning there will be no bars, but only vertical lines.In this example when we combine a 0 rotation around the z-axis and a 90 rotation around the x-axis we end up with a view of the plot from top.

This adds the legend to identify the function.

Here is the link.

Notice the ylabel value in between curly brackets, this brackets tell pgfplots how to group the text.

The title will be displayed above the plot.If the data is in a file, which is the case most of the time; instead of the commands addplot and coordinates you should use addplot table file_with_the_data.Let's see: begintikzpicture beginaxis view6030, addplot3 domain0:5*pi, samples 60, samples y0, (sin(deg(x cos(deg(x x endaxis endtikzpicture There are only two new things in this example: first, the samples y0 to prevent pgfplots from joining the extreme points of the spiral and; second, the way the.This will add a 3dplot, and the option surf inside squared brackets declares that it's a surface plot.The rest of the syntax is the same, except for the addplot3 surf, exp(-x2-y2 x;.First of all, let me say I'm using LyX, though I have no problem using ERT.Check the reference guide for more colour schemes.Coordinates of the points to be plotted.

The parameter is passed to the axis environment, which means this can be used in any other type of 3d plot.