geom_jitter

25 views
Skip to first unread message

Husen Zhang

unread,
Jul 11, 2016, 2:25:56 PM7/11/16
to ggplot2
Dear ggplot users:

My dataframe (see below) has 8 rows, but geom_jitter plotted 10 (attached).  I appreciate an explanation from fellow users.


variable value
Observed   171
Observed   143
Observed   200
Observed   184
Observed   173
Observed   181
Observed   369
Observed   111

my system Mac OS 10.10.5
packageVersion('ggplot2')  ‘2.1.0’
R version 3.2.4 (2016-03-10) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
jitter.jpeg

Richard Zijdeman

unread,
Jul 11, 2016, 3:55:22 PM7/11/16
to Husen Zhang, ggplot2
Hi Husen,

ggplot2 works with layers. In the main statement, ggplot(...), you define things like the datasets.
then you define layers on top with the geom_’s.

Now, it’s always a good idea to send along your code with some data, but without those, my best guess is that you’ve done:
- a geom_jitter() showing 8 data points
- a geom_boxplot() which shows 2 outliers (although there could be other one’s that coincidentally overlap with the geom_jitter).

just try one geom at a time. and check [1] if you don’t want the geom_boxplot to show the outliers.

Best,

Richard



--  
Dr. R.L. Zijdeman | CDO | International Institute of Social History | Cruquiusweg 31 | 1019 AT Amsterdam | +31 20 668 5 866

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<jitter.jpeg>

Reply all
Reply to author
Forward
0 new messages