-
-
Save Swarchal/b938933ae9ded94b3c14d6485b27cf69 to your computer and use it in GitHub Desktop.
Hi Lucas,
It's possible (but ugly) to to this with ggplot functions.
My idea was to plot squares over the top of the wells with another geom_point()
call, and set the stroke conditionally on another column in the dataframe.
library(platetools)
library(ggplot2)
# create example data with 10% wells highlighted
df <- data.frame(
vals = rnorm(384),
well = num_to_well(1:384, plate=384),
highlight = sample(c(TRUE, FALSE), prob=c(0.1, 0.9), 384, replace=TRUE)
)
raw_map(
data=df$vals,
well=df$well,
plate=384,
size=5
) +
geom_point(
aes(stroke=df$highlight),
color="red",
pch=22,
size=5
) +
theme_dark()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dear Dr. Warchal, thanks for the amazing tool! It has been helping me a lot!
As I am relatively new in coding, I wonder if it would be possible to highlight the border of specific wells (based on a separate variable, for exemple). I tried to modify the final plot using common ggplot2 functions, without success. I wonder if you ever had a similar issue.
Thanks a lot in advance for the feedback!