Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >
How to | Plot a Graph
Mathematica has many ways to plot functions and data. It automates many details of plotting such as sample rate, aesthetic choices, and focusing on the region of interest. While these default options have been carefully selected to suit the vast majority of cases, Mathematica also allows you to customize plots to fit your needs.
Use Plot to plot a function:
In[1]:=
Click for copyable input
Out[1]=
Use ListPlot to plot data:
In[2]:=
Click for copyable input
Out[3]=
Use ListLinePlot to plot the data joined by lines:
In[4]:=
Click for copyable input
Out[4]=
Use Plot3D to plot functions in three dimensions:
In[5]:=
Click for copyable input
Out[5]=
Customize your plots by adding options:
In[6]:=
Click for copyable input
Out[6]=
Use GraphPlot to plot networks:
In[7]:=
Click for copyable input
Out[7]=
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF