I have a day/time dotplot a series of attributes. I'm changing the color of a specific attribute to make it stand out from the set. However, it seems like no matter what I do, most of the dots will "hide" behind the other "non-relevant" datapoints. How can I change the layer priority of the bluegreen dots to always be "on top"?
Here's what my plot looks like.
And here's the code i use to generate it in shiny.
output$timdat <- renderPlot({
pasx2$color <- factor(ifelse(pasx2$pasx.BFTYPE == input$BFTYPESEL,'Selection','Dataset'))
ggplot(pasx2, aes(pasx.day, pasx.time, colour=color)) +
geom_jitter() + scale_x_discrete("Day") +
scale_y_discrete("Time")})
BFTYPESEL is a list of possible "terms" to isolate from the main dataframe. One is selected. color is a factor with 2 levels in my dataframe that is updated to discriminate one term from the set.