PLOTTING and MULTIPLOTS
Math 1011  (Peh Ng)

Example: Data from problem on page 82

This is how you input a set of ordered pairs of data.
It is also convenient to give the input list a name, 
 in this case we call the first list womenlist.
Always hit Shift-Return simultaneously for a mathematica input.

womenlist={{0,35.7},{5,37.7},{10,39.3},{15,43.3},{20,46.3},{25,51.5},{30,54.5},{35,57.5},{40,58.9},{45,60.2}}

menlist={{0,85.4},{5,83.3},{10,80.7},{15,79.7},{20,77.9},{25,77.4},{30,76.3},{35,76.4},{40,75.0},{45,74.7}}

To plot the list of points, we use ListPlot - the command is case sensitive

ListPlot[womenlist]

ListPlot[menlist]

ListPlot[{womenlist,menlist}]

Usually it is helpful to identify the respective plots of two different input data sets. For instance, if we want to distinguish between the plots of the womenlist and that of the menlist, we can do the following.  PlotLabel and PlotStyle allow us to have a symbol index.

ListPlot[{womenlist, menlist},PlotLabel->{"Women%","Men%"}, PlotStyle->{Red, Blue},Joined->{False,False}]

ListPlot[{womenlist, menlist},PlotLabel->{"Women%","Men%"}, PlotStyle->{Darker[Green, .5], Blue},Joined->{False,False}]

It is very common to obtain an approximated algebraic model for the numerical model (numerical data) we  have. For instance, if we want to fit the  points given by womenlist with a 3rd degree polynomial function, we do the following:   (Recall that a third degree polynomial looks like ax^3 +bx^2 +cx +d where a,b,c,d are real numbers and a is non-zero).

W=Fit[womenlist,{x^3,x^2,x,1},x]

Plot[W,{x,0,45}]

W2=Fit[womenlist,{x,1},x]

Now, suppose we want to plot the curve of our approximated algebraic model, we do the following:

Wgraph=Plot[W,{x,0,45}]

Now, before we superimpose the given data points womenlist and the curve of our algebraic model, we need to name the ListPlot we did before by giving the list a name ie womengraph:

womengraph=ListPlot[womenlist]

Now, we can superimpose both the womengraph (of given data points) and Wgraph (the graph of the approximated algebraic model)

Show[womengraph, Wgraph]