Skip to content

Commit 7b014a8

Browse files
committed
Add visual tests for stat_density2d
1 parent 8d6ffd0 commit 7b014a8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

visual_test/geom-polygon.r

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
vcontext("geom-polygon")
2+
3+
ggplot(faithful, aes(x = eruptions, y = waiting)) +
4+
stat_density2d(aes(colour = ..level..), geom="path") +
5+
xlim(0.5, 6) + ylim(40, 110)
6+
save_vtest("stat_density2d with paths")
7+
8+
ggplot(faithful, aes(x = eruptions, y = waiting)) +
9+
stat_density2d(aes(fill = ..level..), geom="polygon", colour="white") +
10+
xlim(0.5, 6) + ylim(40, 110)
11+
save_vtest("stat_density2d with filled polygons")
12+
13+
end_vcontext()

0 commit comments

Comments
 (0)