malfunctioning ggplot::theme(legend) in a quite a big function

25 views
Skip to first unread message

Mehmet Gültaş

unread,
Jun 24, 2016, 4:02:41 PM6/24/16
to ggplot2
Hi,


You can skip this part:
The function within the attached R file creates a scatter plot and box plots and combines them.
It was once nice little script, and I played with it nicely. Now, it is out of my control and beating me to death.
It is quite long and not very organized code and I am not sure if I can ask anyone of you to read and understand it, but I am desperate, so here it comes.


My problem:
When you are using the function in the attach file, if there is a moderator variable, in the scatter plot different color and shapes of dots signifies moderator variable.
I cab be able to show moderator variable with differently shaped and colored dots (or triangles).
But I cannot be able to append legend with ggplot2::theme(legend.position) by using lines 294-297 of the file.


Basic used is like that:
crosshairs(pub_z, dis_z, pub_z_se, dis_z_se, mod = mod)


Thank you for your time,
Mehmet Gültas
FergusonBrannick2012.rda
crosshairs.R

Mehmet Gültaş

unread,
Jun 28, 2016, 3:05:09 PM6/28/16
to ggplot2
Solved that one. No need any effort, it was just a typo.
Reply all
Reply to author
Forward
0 new messages