Scatter Plot using R


A scatter plot (also called a scatterplot, scatter graph, scatter chart, scattergram, or scatter diagram)
[3] is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically
two variables for a set of data. If the points are color-coded, one additional variable can be displayed.
The data are displayed as a collection of points, each having the value of one variable determining the
position on the horizontal axis and the value of the other variable determining the position on the
vertical axis.[4]


R is a programming language and free software environment for statistical computing and graphics
supported by the R Foundation for Statistical Computing.[6] The R language is widely used among
statisticians and data miners for developing statistical software[7] and data analysis.[8] Polls, data
mining surveys, and studies of scholarly literature databases show substantial increases in popularity in
recent years.[9] As of January 2019, R ranks 12th in the TIOBE index, a measure of popularity of
programming languages.[10]

A GNU package,[11] source code for the R software environment is written primarily in C, Fortran and R
itself,[12] and is freely available under the GNU General Public License. Pre-compiled binary versions
are provided for various operating systems. Although R has a command line interface, there are several
graphical user interfaces, such as RStudio, an integrated development environment.[13][14]


> plot(1,2,3)
Error in plot.xy(xy, type, ...) : invalid plot type
> plot(12,45,55,67))
Error: unexpected ')' in "plot(12,45,55,67))"
> plot(12,45,55,67)
Error in plot.window(...) : invalid 'xlim' value
> plot(12)
> png(file="basic.png")
> plot(12)
null device
> plot(12,32)
> plot(12,55,99)
Error in plot.xy(xy, type, ...) : invalid plot type
> plot(12,b,55)
Error in xy.coords(x, y, xlabel, ylabel, log) : object 'b' not found

<!– basic –>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s