Skip to content
Back to formatted view

Raw Message

Message-ID: <1819010636.3252551.1483023558354@mail.yahoo.com>
Date: 2016-12-29T14:59:18Z
From: Fix Ace
Subject: ggplot2 package: argument of expand with scale_x_discrete()
In-Reply-To: <1696757755.2866913.1482950990817@mail.yahoo.com>

Hello, there,
What exactly does "expand" do for this function?
I followed the examples from the manual to get a plot: 

d <- ggplot(subset(diamonds, carat > 1), aes(cut, clarity)) +geom_jitter()

I would like to have all the dots in a square instead of rectangular range. When I applied d + scale_x_discrete(expand=c(1,1)) and d + scale_x_discrete(expand=c(1,0)), I got the same plot (different from the original one though).
Could anyone help me to figure out how to use this argument?
Thank you very much!
Ace
 



   
	[[alternative HTML version deleted]]