Learn R Programming

ggplot2 (version 0.9.1)

xlim: Convenience function to set the limits of the x axis.

Description

Convenience function to set the limits of the x axis.

Usage

xlim(...)

Arguments

...
if numeric, will create a continuous scale, if factor or character, will create a discrete scale.

Examples

Run this code
xlim(15, 20)
xlim(20, 15)
xlim(c(10, 20))
xlim("a", "b", "c")
qplot(mpg, wt, data=mtcars) + xlim(15, 20)

Run the code above in your browser using DataLab