Basic scatterplot

Scatterplots are used for showing the joint values of two quantitative variables. Here we use a subset of the data of the National Health and Nutrition Examination Survey (NHANES) that are available in the package NHANES. You must select appropriate variables to be represented (only numerical) and a grouping variable (categorical). Lines can be added to show the trend on the data. Prediction intervals are an option.



          

How to represent several variables


You can add several variables in a scatter plot. Is this example we use the Gapminder data base and represent the variation of Life Expentancy as a function of the GPD in a given year and for different countries. Color and size of the bubbles represent the country's continent and population. This example is taken from the Gapminder pages.

Scatterplot for three continous variables


3D scatterplots are used for representing values of three continous variables. You can add information on other variables through the color and size of points. Here we use color for each gender. You can point at each point to retrieve its information.