11. How do you change the default colors for the bars in question 10 above? Write the R command to change the default colors to red, green and blue respectively for the three drv levels in the above plot corresponding to question 10. Your plot must look as shown below:
12. Which plot will you use to compare the diamond prices across categories of diamonds based on their cut quality for the diamonds dataset? This dataset is available within the R environment. (Hint: use cut on the x-axis and price on the y-axis)
13. Write R code to create the following plot for the cabbage_exp dataset from the gccokbook package.
14. Write the R code to create the following stacked bar plot for the mpg dataset. This dataset is available within the R environment.
15. Write the R code to create the following proportional stacked bar graph for the mpg dataset. This dataset is available within the R environment.
16. Demonstrate the use of xlim() and ylim() functions for the line plot for any dataset available within the R environment. Write the corresponding R command using ggplot function of the ggplot2 package. Also show your output graph.
17. Write the R code to create the following multi-line line plot for the Orange dataset. This dataset is available within the R environment.
18. Demonstrate the use of size, shape, color and fill attributes of geom_point() within a multiline line graph for any dataset available within the R environment.
19. Demonstrate the use of linetype, size and color attributes of geom_line() within a multiline line graph for any dataset available within the R environment.
20. Demonstrate the use of geom_area() to plot stacked area or proportional stacked area graph
for any meaningful dataset which can be plotted using geom_area() geometric method
within the R environment.
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.