![]() ![]() The reason we love them is their ease of interpretation, transparency and relatively high data-to-ink ratio (i.e. they convey lots of information efficiently). Boxplots (or box-and-whisker plots to give them their full name) are very useful when you want to graphically summarise the distribution of a variable, identify potential unusual values and compare distributions between different groups. OK, we’ll just come and out and say it, we love boxplots and their close relation the violin plot. The top left plot is type = "l", the top right type = "b", bottom left type = "o" and bottom right is type = "c". See later in the Chapter for more details about this. We’re just using this to split the plotting device so we can fit all four plots on the same device to save some space. Don’t worry about the par(mfrow = c(2, 2)) line of code yet. For example, let’s use our skills from Chapter 2 to generate two vectors of numbers ( my_x and my_y) and then plot one against the other using different type = values to see what type of plots are produced. You can plot just the points ( type = "p", this is the default), just lines ( type = "l"), both points and lines connected ( type = "b"), both points and lines with the lines running through the points ( type = "o") and empty points joined by lines ( type = "c"). You can also specify the type of graph you wish to plot using the argument type =. Plot(flowers $shootarea ~ flowers $weight)īoth of these two approaches are equivalent so we suggest that you just choose the one you prefer and go with it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |