[R] Removing unused parameter in qqplot

Ista Zahn istazahn at gmail.com
Tue Jan 7 05:54:04 CET 2014


On Mon, Jan 6, 2014 at 7:36 PM, Peter Maclean <pmaclean2011 at yahoo.com> wrote:
> With these toy data, how can I remove unused empty space between the bars?

There is no unused space. It is very hard to see how you could remove
the empty space and still have a meaningful graph.

Best,
Ista
>
> #Toy data
> x1 <- as.data.frame(rep(1:3,   c(10,2,6)))
> colnames(x1) <- c("name")
> x2 <- as.data.frame(rep(5:7,   c(14,5,8)))
> colnames(x2) <- c("name")
> x3 <- as.data.frame(rep(10:12, c(5,5, 8)))
> colnames(x3) <- c("name")
> x4 <- as.data.frame(rep(18, 9))
> colnames(x4) <- c("name")
> dat <- rbind.data.frame(x1, x2, x3, x4)
> dat <- as.data.frame(dat)
> colnames(data) <- c("name")
> fix(dat)
> require(ggplot2)
> ggplot(dat , aes(x=name, y = ..density..)) +
>          geom_histogram(colour = "darkgreen", fill = "blue", binwidth = 0.5)
>
>
>
>
> Peter Maclean
> Department of Economics
> UDSM
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list