acorg/Racmacs

Assign different colors to difference clusters of dot in the map

Closed this issue · 3 comments

Hey Sam,

I am currently learning to use RACMACS to analysis influenza antigenic cartography.

I see that the original h3map2004 map has difference colors, but when I plot maps, all dots are green color. I wonder if there is a function to assign different colors to individual dots?

Thanks for taking time to answer my question!
Shaoyuan

You can use agFill() and srFill() to assign colours to antigens and sera respectively.

And agOutline() and srOutline() to colour their edges.

See the docs https://acorg.github.io/Racmacs/reference/index.html#point-plotting-styles for more details

Thank you so much, David!! This works!!

Shaoyuan

I also get the green graph from the example, and the graph is different each time I run it. Also, I notice that the graphs in the article are colored by clusters, and this function can only assign a color to a single point. Do you know a way to change colors by clusters like in the picture?