For example:
require(ggplot2)
require(reshape2)
volcano3d <- melt(volcano)
names(volcano3d) <- c("x", "y", "z")
v <- ggplot(volcano3d, aes(x, y, z = z))
v1 = v + stat_contour(aes(colour=..level..,size=..level..))

There are two legends on the side, can I remove one of them?
See here: http://www.cookbook-r.com/Graphs/Legends_(ggplot2)/
The line you'll need is
v1 = v + stat_contour(aes(colour=..level..,size=..level..)) +
scale_colour_continuous(guide=FALSE)
Use scale_size_continuous to turn off the size legend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With