How to use setLegend #174
-
I'm mostly a Python programmer getting started with R. I used Racmacs to do an antigenic cartography plot, but can't figure out how to get the setLegend function to work. I need a little more help than what's in the docs, and I haven't been able to find any example code anywhere online to play with. Does anyone have a sample of code that uses setLegend that I can look at? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Does this help? I've not used the function before, so there might be a smarter way to do things. If you want a legend on a plot, then you can use the R
|
Beta Was this translation helpful? Give feedback.
-
You beat me to it Sarah, thanks for taking the time to post your question here for others to see, here's some other example code demonstrating the same thing: map <- setLegend(
map = map,
legend = c(
"egg-passaged viruses",
"cell-passaged viruses"
),
fill = c(
"red",
"blue"
)
)
view(map) |
Beta Was this translation helpful? Give feedback.
Does this help? I've not used the function before, so there might be a smarter way to do things. If you want a legend on a plot, then you can use the R
legend
function.