class: center, middle, inverse, title-slide # continuous x continuous ### Gina Reynolds --- --- --- # 'Nouns': The geom_*() line up --- class: inverse, center, middle name: cc # continous x and y --- class: split-40 count: false .left-panel-continuous_continuous_build-auto[ ```r *ggplot(data = gapminder_2002) ``` ] .right-panel-continuous_continuous_build-auto[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_build_auto_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + * aes(x = gdpPercap/1000) ``` ] .right-panel-continuous_continuous_build-auto[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_build_auto_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + * aes(y = lifeExp) ``` ] .right-panel-continuous_continuous_build-auto[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_build_auto_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + * coord_cartesian(xlim = c(0,50), ylim = c(35,90)) ``` ] .right-panel-continuous_continuous_build-auto[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_build_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + * geom_point() ``` ] .right-panel-continuous_continuous_build-auto[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_build_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous_build-auto[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * theme_minimal() ``` ] .right-panel-continuous_continuous_build-auto[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_build_auto_6_output-1.png" width="100%" /> ] <style> .left-panel-continuous_continuous_build-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-continuous_continuous_build-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-continuous_continuous_build-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + geom_rug() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_1_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_tile(width = 3, height = 3, fill = "green", alpha = .25) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_2_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_segment(aes(xend = 0, yend = 40), alpha = .2) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_curve(aes(xend = 0, yend = 40), linetype = "dotted") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_rect(aes(xmin = 20, xmax = gdpPercap/1000, ymin = 40, ymax = lifeExp), alpha = .02, fill = "magenta", color = "grey") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_text(aes(label = country)) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_label(aes(label = country)) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_7_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * stat_density_2d(aes(fill = ..density..), geom = "raster", contour = FALSE, alpha = .5) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_8_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_density2d() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_9_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_10_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_bkde2d(bandwidth=c(0.5, 4)) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_11_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_smooth() + # theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_12_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_smooth(method = lm) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_13_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_smooth(orientation = "y", method = lm) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_14_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_hex(alpha = .5,color = "white") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_15_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_hex(bins = 12, alpha = .9, color = "white") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_16_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_segment() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_17_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_tile(fill = "green", color = "white", alpha = .5) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_18_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_tile(aes(fill = continent, group = -1L), color = "white", alpha = .5, normalize = TRUE) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_19_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_voronoi_tile(aes(fill = continent, group = -1L), colour = 'black', max.radius = 3, alpha = .5) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_20_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_delaunay_tile(fill = "magenta", alpha = 0.3, colour = 'black') + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_21_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_delaunay_segment2(aes(color = continent, group = -1L), size = 3, lineend = 'round') + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_22_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_bspline_closed(alpha = 0.5, fill = "cadetblue") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_23_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_bspline_closed(alpha = 0.5, fill = "cadetblue") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_24_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_diagonal(aes(xend = 20, yend = lifeExp - 3), color = "goldenrod4") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_25_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggbump::geom_sigmoid(aes(group = country, xend = 20, yend = lifeExp - 3), color = "firebrick") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_26_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_path(color = "plum4") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_27_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * geom_polygon(alpha = 0.5, fill = "plum4") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_28_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(s_shape=0.5, expand=0.1, colour="purple") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_29_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(aes(color = continent), s_shape=0.5, expand=0.1) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_30_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(s_shape=1, expand=0.1, colour="purple") + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_31_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggalt::geom_encircle(aes(color = continent), s_shape=1, expand=0.1) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_32_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_33_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull(concavity = 7) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_34_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull(aes(fill = continent)) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_35_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_hull(aes(fill = continent, filter = continent == "Europe")) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_36_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_circle() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_37_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_circle(aes(fill = continent)) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_38_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_ellipse(aes(fill = continent, filter = continent == "Europe")) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_39_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_rect() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_40_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggforce::geom_mark_rect(aes(fill = continent)) + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_41_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-continuous_continuous-rotate[ ```r ggplot(data = gapminder_2002) + aes(x = gdpPercap/1000) + aes(y = lifeExp) + coord_cartesian(xlim = c(0,50), ylim = c(35,90)) + geom_point() + * ggpointdensity::geom_pointdensity() + theme_minimal() ``` ] .right-panel-continuous_continuous-rotate[ <img src="geoms_bivariate_continuous_files/figure-html/continuous_continuous_rotate_42_output-1.png" width="100%" /> ] <style> .left-panel-continuous_continuous-rotate { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-continuous_continuous-rotate { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-continuous_continuous-rotate { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> --- ## dense x and y geom_point density isn't easy to appreciate w/o dense data --- class: split-40 count: false .left-panel-dense-auto[ ```r *set.seed(2022) ``` ] .right-panel-dense-auto[ ] --- class: split-40 count: false .left-panel-dense-auto[ ```r set.seed(2022) *tibble(my_x = rnorm(2000), * my_y = my_x + rnorm(2000)) ``` ] .right-panel-dense-auto[ ``` # A tibble: 2,000 x 2 my_x my_y <dbl> <dbl> 1 0.900 0.355 2 -1.17 -0.387 3 -0.897 -0.599 4 -1.44 0.0747 5 -0.331 0.582 6 -2.90 -2.70 7 -1.06 1.40 8 0.278 -0.248 9 0.749 -0.0528 10 0.242 0.926 # … with 1,990 more rows ``` ] --- class: split-40 count: false .left-panel-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% * ggplot() ``` ] .right-panel-dense-auto[ <img src="geoms_bivariate_continuous_files/figure-html/dense_auto_3_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + * aes(x = my_x) ``` ] .right-panel-dense-auto[ <img src="geoms_bivariate_continuous_files/figure-html/dense_auto_4_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + aes(x = my_x) + * aes(y = my_y) ``` ] .right-panel-dense-auto[ <img src="geoms_bivariate_continuous_files/figure-html/dense_auto_5_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + * ggpointdensity::geom_pointdensity() ``` ] .right-panel-dense-auto[ <img src="geoms_bivariate_continuous_files/figure-html/dense_auto_6_output-1.png" width="100%" /> ] --- class: split-40 count: false .left-panel-dense-auto[ ```r set.seed(2022) tibble(my_x = rnorm(2000), my_y = my_x + rnorm(2000)) %>% ggplot() + aes(x = my_x) + aes(y = my_y) + ggpointdensity::geom_pointdensity() + * scale_color_viridis_c() ``` ] .right-panel-dense-auto[ <img src="geoms_bivariate_continuous_files/figure-html/dense_auto_7_output-1.png" width="100%" /> ] <style> .left-panel-dense-auto { color: #777; width: 38.6138613861386%; height: 92%; float: left; font-size: 80% } .right-panel-dense-auto { width: 59.4059405940594%; float: right; padding-left: 1%; font-size: 80% } .middle-panel-dense-auto { width: 0%; float: left; padding-left: 1%; font-size: 80% } </style> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 55%} </style>