RE: facet_wrap Problem misplaced points

17 views
Skip to first unread message

Ito, Kaori (Groton)

unread,
Mar 27, 2013, 9:39:34 AM3/27/13
to Che Martin, ggp...@googlegroups.com

Dear Che,

I tried to see what you are getting, but it looks fine to me……(I also get a similar plot with lattice)

Could you explain little more what is problem with you?

 

ggplot(data=d1, aes(x=c2, y=c3)) + geom_point() + facet_wrap(~c5)

 

library(lattice)

xyplot(c3~c2 | c5, data=d1)

 

-Kaori

 

From: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] On Behalf Of Che Martin
Sent: Tuesday, March 26, 2013 8:04 PM
To: ggp...@googlegroups.com
Subject: facet_wrap Problem misplaced points

 

Hello All,

I am using ggplot2 to plot the following  data col2 vs col3.... i then do a facet_wrap on col5...but it plots my l-within points under the graph labeled c-within...I am not sure what is happening?? Please help.

col1     col2         col3         col4           col5

A73 0.0144 0.0472 0.36630 l-within
A74 0.0033 0.1119 0.36630 l-within
A76 0.0202 0.1001 0.35622 l-within
Q01 0.0139 0.1767 0.36496 c-within
Q02 0.0276 0.1663 0.38108 c-within
Q03 0.0119 0.1933 0.38108 c-within
Q04 0.0078 0.2597 0.38108 c-within

 

--
--
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/groups/opt_out.
 
 

test_ggplot.png
test_lattice.png

Che Martin

unread,
Mar 28, 2013, 12:25:28 PM3/28/13
to ggp...@googlegroups.com
Thank you for your response I figured out the issue....I was plotting the data along with a subset of the data in order to create different colored points.....facet_ wrap does not like that.....a simple created a color column in the df and that resolved the issue.

Thanks,
Che

Reply all
Reply to author
Forward
0 new messages