# NOT RUN {
library(ggplot2)
v <- reshape2::melt(volcano)
g <- ggplot(v, aes(Var1, Var2)) +
geom_contour(aes(z = value))
g + geom_text_contour(aes(z = value))
g + geom_text_contour(aes(z = value), stroke = 0.2)
g + geom_text_contour(aes(z = value), stroke = 0.2, stroke.colour = "red")
g + geom_text_contour(aes(z = value, stroke.colour = ..level..), stroke = 0.2) +
scale_colour_gradient(aesthetics = "stroke.colour", guide = "none")
g + geom_text_contour(aes(z = value), rotate = FALSE)
g + geom_text_contour(aes(z = value),
label.placement = label_placement_random())
g + geom_text_contour(aes(z = value),
label.placement = label_placement_n(3))
g + geom_text_contour(aes(z = value),
label.placement = label_placement_flattest())
g + geom_text_contour(aes(z = value),
label.placement = label_placement_flattest(ref_angle = 90))
# }
Run the code above in your browser using DataLab