y-axis padding

23 views
Skip to first unread message

Willem

unread,
Mar 14, 2012, 12:11:59 PM3/14/12
to ggplot2
Hi,

I have noticed that ggplot2 normally adds some extra padding below and
above the minimum and maximum values that should be plotted.
Is there a way to specify the width or percentage of this padding?
I would like to plot some text underneath my data points, but they
currently fall beneath the x-axis.
Since I want this to work in facets as well (with different scales) I
cannot just adjust the y-axis.

Kind regards,

Willem

Jean-Olivier Irisson

unread,
Mar 14, 2012, 4:26:20 PM3/14/12
to Willem, ggplot2

Look at the expand argument of scale_y_***

Jean-Olivier Irisson
---
Observatoire Océanologique
Station Zoologique, B.P. 28, Chemin du Lazaret
06230 Villefranche-sur-Mer
Tel: +33 04 93 76 38 04
Mob: +33 06 21 05 19 90
http://jo.irisson.com/

Willem

unread,
Mar 15, 2012, 3:48:11 AM3/15/12
to ggplot2
That works perfectly!
Thanks,

Willem

On Mar 14, 9:26 pm, Jean-Olivier Irisson <iris...@normalesup.org>
wrote:
Reply all
Reply to author
Forward
0 new messages