InterviewSolution
Saved Bookmarks
| 1. |
Please consider built-in “PlantGrowth” dataset in R. Goal is to remove the legend which is shown in the box plot below (legend for a group with 3 values). Select all correct options that can be used to remove the legend in the boxplot. |
|
Answer» Response: OPTIONS a, b, c, d is all correct. All of these can be used to remove the legend. We use legendTest + guides(fill=FALSE) to remove legend for a particular aesthetic. This can also be possible in OPTION b which is using the scale_fill_discrete() function when SPECIFYING the scale. The third option in option c which is legendTest + theme(legend.position="none") will remove all legends in the plot. Option d also has SIMILAR syntax format as in option a which will enable to remove the legend. |
|