I'm having the same problem as Stephan (see below), but what I'm trying to jitter is not a numeric vector, but a factor. How do I proceed? (Naively jittering a factor makes it numeric, no longer factor, so I don't get the custom ordering which conveniently comes with using a factor. I'm not sure how I would simulate that custom ordering with the jittered vector ... I couldn't find anything online about jittering factors, but maybe I just wasn't searching cleverly enough.)
Incidentally, the reason I need to synchronize jittering, so to speak, is because I am using two geom_points to create the effect of a filled circle with a solid outline but a transparent fill. E.g., ggplot(data, aes(x_factor, y_numeric)) + geom_point(shape = 21) + geom_point(alpha = 0.5)
Is there a more elegant way to accomplish this goal, or is using two geom_points the way I'm supposed to do it?
hadley wickham wrote:
>
> On Sat, Sep 12, 2009 at 1:34 PM, Stephan Kolassa <Stephan.Kolassa_at_gmx.de>
> wrote:
>> Dear guRus, >> >> I am starting to work with the ggplot2 package and have two very dumb >> questions: >> >> 1) deterministic position_jitter - the jittering is stochastic; is there >> any >> way to get a deterministic jittering? For instance:
>> 2) geom_line with position_jitter - when I call multiple geoms with >> position_jitter, each geom gets its own jittering. For example >> (continuing
-- View this message in context: http://r.789695.n4.nabble.com/ggplot2-deterministic-position-jitter-geom-line-with-position-jitter-tp905378p2267909.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.Received on Fri 25 Jun 2010 - 04:32:22 GMT
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jun 2010 - 17:50:34 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.