Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为美国的不同州添加不同的颜色。但是,当我map("state",."insert coloring condition"...)按顺序运行所有命令时,我没有得到叠加图,它只是更新地图但不保持着色(如预期的那样)。绘制图时,您可以访问lines(),points()但它不适用于地图.. 那么我该怎么做呢?
map("state",."insert coloring condition"...)
lines()
points()
If you read the documentation for ?map you'll see that there is an add argument:
?map
add
logical flag that specifies whether to add to the current plot. If FALSE, a new plot is begun, and a new coordinate system is set up.
that should do what you describe.