1.9.10 Some Special PlotsAs discussed in Section 2.10, Mathematica includes a full graphics programming language. In this language, you can set up many different kinds of plots. A few of the common ones are included in standard Mathematica packages.
| <<Graphics` | load a package to set up additional graphics functions | LogPlot[f, {x, , }] | generate a log-linear plot | LogLogPlot[f, {x, , }] | generate a log-log plot | | LogListPlot[list] | generate a log-linear plot from a list of data | | LogLogListPlot[list] | generate a log-log plot from a list of data | PolarPlot[r, {t, , }] | generate a polar plot of the radius r as a function of angle t |
ErrorListPlot[{{ , , }, ... }]
| | generate a plot of data with error bars |
TextListPlot[{{ , , " "}, ... }]
| | plot a list of data with each point given by the text string | | BarChart[list] | plot a list of data as a bar chart | | PieChart[list] | plot a list of data as a pie chart |
PlotVectorField[{ , }, {x, , }, {y, , }]
| | plot the vector field corresponding to the vector function f | | ListPlotVectorField[list] | plot the vector field corresponding to the two-dimensional array of vectors in list |
SphericalPlot3D[r, {theta, min, max}, {phi, min, max}]
| | generate a three-dimensional spherical plot |
Some special plotting functions defined in standard Mathematica packages. | This loads a standard Mathematica package to set up additional graphics functions. | | |
| This generates a log-linear plot. | |
In[2]:=
LogPlot[ Exp[-x] + 4 Exp[-2x], {x, 0, 6} ]
|
Out[2]=
|
|
| Here is a list of the first 10 primes. | |
In[3]:=
p = Table[Prime[n], {n, 10}]
|
Out[3]=
|
|
| This plots the primes using the integers 1, 2, 3, ... as plotting symbols. | |
Out[4]=
|
|
| Here is a bar chart of the primes. | |
Out[5]=
|
|
| This gives a pie chart. | |
Out[6]=
|
|
|