This lesson is being piloted (Beta version)

Ploting with qplot

Overview

Teaching: 10 min
Exercises: 0 min
Questions
  • How to quick plot in R using ggplot2 package

Objectives
  • Learn professional plotting tool in R using qplot

  • Learn multiple way to use qplot

What is qplot

In this episode, we gonna learn how to quickly visualize data using qplot

Basic qplot: Scatter plot

Basic qplot: Histogram

qplot(Sepal.Length,fill=Species, data=iris)
qplot(Sepal.Length,data=iris,geom="density")
qplot(Sepal.Length,data=iris,geom="density",
      color=Species)

image

Basic qplot: Facets

qplot(Sepal.Length,Petal.Length,facets=.~Species, data=iris)

image

Key Points

  • ggplot2

  • qplot