--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
The problem I have is not due to wrongly scaled y-axis, but rather the overplotting of x-axis labels due to the small plot size, i.e. I would like to say facet 1 should have labels set1=c(-2,0,2) and facet 2 should have label set2=c(-200, 0, 200) for example.
Best regards,
Sebastian
--
Sebastian Weber
Group of Cell Communication and Control
Freiburg Institute for Advanced Studies - FRIAS
School of Life Sciences - LIFENET
Albert-Ludwigs-Universität Freiburg
Albertstr. 19
79104 Freiburg
T.: +49-761-203-97237
Fax:+49-761-203-97334
This is not really a solution as the x-axis title is shared between the plots when using facets. This is important to me in order to maintain a consistent look with other plots I use in the document I am writing. If worst comes to worst, I would hard code some ggplot functions myself, but which ones I have to alter then?
Thanks a lot in advance,
Sebastian
You could perhaps tweak grid.pretty(),
grid.pretty <- function(range, ...)
if(abs(diff(range)) > 100) pretty(range, n=3, min.n =3) else
grid::grid.pretty(range, ...)
last_plot()
I suggested recently that ggplot2 could use a different alias
defaulting to grid.pretty(), so that it could be overwritten more
cleanly with user-defined functions. Anyone would like to comment on
that idea?
baptiste
On Wed, Apr 6, 2011 at 1:02 AM, Sebastian Weber
Thank you so much! This solved it really elegantly!
And yes, the idea to have the possibility to override grid.pretty is great. I would even go further: Allow users to override things depending on the facet, i.e. provide a function which gets called with a facet number or something like this...
Thanks again,
Sebastian