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.
我想创建一个旁边有一个颜色键的等高线图。
我会像这样制作等高线图:
data(volcano) image(volcano) contour(volcano, add = TRUE)
但是,image()据我所知,不支持传奇。我看到包中还有一个contourplot()功能lattice,但是,我无法弄清楚在使用时如何用等高线覆盖levelplot(volcano)地图contourplot(volcano)
image()
contourplot()
lattice
levelplot(volcano)
contourplot(volcano)
理想情况下,我希望我的情节看起来像这样,但有一个颜色键:
您可以image.plot从fields包装中使用。默认情况下,这会创建一个图例。
image.plot
fields
library(fields) image.plot(volcano) contour(volcano, add = TRUE)