0

Question

I know this question (or similar questions) have been posted, though I cannot seem to find what is going on.

I am doing a strip chart and I have tried using both geom_jitter(position = position_jitter(0.065)) and geom_point(position = position_jitter(0.065)), but I cannot seem to put a border around each of my points.

I have been only able to fill them with a colour, regardless of whether I use fill = or colour =.

Code:

ggplot(Titanic.Data, aes(x = as.factor(Survive),
                         y = Age,
                         colour = Survive)) +
  
  geom_jitter(position = position_jitter(0.065)) +
        
  labs(x = "Survive",
       y = "Age",
       title = "Strip Chart of Age vs Survive") +
        
  scale_colour_manual(values = c("DarkBlue", "DarkRed")) +
        
  theme_test() +
  
  theme(plot.title = element_text(hjust = 0.5,
                                  face = "bold",
                                  size = 18)) +
  
  theme(legend.position = "none")

Graph:

Here is what the graph will look like

Code

The data set is huge, and I do not know how to add the file to this thread so here is a small portion of it.

Titanic Data

Anonymous
  • 1
  • 1

0 Answers0