r - cut off density plot in ggplot2 -


i use

frame <- read.table(paste('data', fname, sep="/"), sep=",", header=true) colnames(frame) <- c("pos", "word.length") plot <- ggplot(frame, aes(x=pos, y=word.length)) + xlim(0,20) + ylim(0,20) + geom_density2d() + stat_density2d(aes(color=..level..)) png(paste("graphs/", fname, ".png", sep=""), width=600, height=600) print(plot) dev.off() 

to create plots, cut off. how fix this?

http://ompldr.org/vztn0eq

the data used create plot: http://sprunge.us/gkil

according ggplot2 book, use scale_x_continuous(limits=c(1,20)) instead of xlim(1,20) that.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -