Thank you Jared for your response. I took a look at the documentation you provided and am trying my best to follow along, but can't seem to figure this out. I went ahead and created a plot similar to the one I did on ggplot using baseR (not exactly what I want it to look like yet, but almost):
unique_families <- unique(justPicorna_contiginfo$family)
family_colors <- rainbow(length(unique_families))
family_colors[match("Not assigned", unique_families)] <- "darkgrey"
# Define sizes for legend
legend_sizes <- c(5, 10, 15, 20)
# Scale factor for size
scale_factor <- 3
myplot <- plot(justPicorna_contiginfo$kmer_cov, justPicorna_contiginfo$percid,
xlab = "kmer coverage", ylab = "percent identity (%)",
col = family_colors[match(justPicorna_contiginfo$family, unique_families)],
pch = 19,
cex = justPicorna_contiginfo$querylength / max(justPicorna_contiginfo$querylength) * scale_factor,
main = "Interactive Graph",
log = "x")
legend("topright", legend = unique_families,
col = family_colors,
pch = 19,
title = "family",
cex = 1.2)
legend("bottomright", legend = legend_sizes,
pch = 19,
pt.cex = legend_sizes / max(legend_sizes) * scale_factor,
title = "query length",
cex = 1.2)
myplot
However, the issue once again arises when I try to make the graph interactive and am lost with how to add traces and markers for my situation. I have a class presentation for this research on Thursday so my main concern is not having enough time to work on my presentation if I keep troubleshooting this. With that said, I'd appreciate any additional feedback regarding my code, and already appreciate the help so much!
Thanks :)