# Plotting Lists of Data

The Wolfram Language can be used to make plots of functions. You give the Wolfram Language a function, and it builds up a curve or surface by evaluating the function at many different points.

Here we describe how you can make plots from lists of data, instead of functions. ("Importing and Exporting Data" discusses how to read data from external files and programs.) The Wolfram Language commands for plotting lists of data are direct analogs of the ones for plotting functions.

 ListPlot[{y1,y2,…}] plot y1,y2,… at x values 1,2,… ListPlot[{{x1,y1},{x2,y2},…}] plot points (x1,y1),… ListLinePlot[list] join the points with lines ListPlot3D[{{z11,z12,…},{z21,z22,…},…}] make a three‐dimensional plot of the array of heights zyx ListPlot3D[{{x1,y1,z1},{x2,y2,z2},…}] make a three-dimensional plot with heights zi at positions {xi,yi} ListContourPlot[array] make a contour plot ListDensityPlot[array] make a density plot

Functions for plotting lists of data.

Here is a list of values:
 In:= Out= This plots the values:
 In:= Out= This joins the points with lines:
 In:= Out= When plotting multiple datasets, the Wolfram Language chooses a different color for each dataset automatically:
 In:= Out= This gives a list of pairs:
 In:= Out= This plots the points:
 In:= Out= This gives a rectangular array of values. The array is quite large, so we end the input with a semicolon to stop the result from being printed out:
 In:= This makes a threedimensional plot of the array of values:
 In:= Out= This gives a density plot of the array of values:
 In:= Out= 