[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572745-105":53,"doc-detail-572745-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","r-ggplot2-cheatsheet-data-visualization-with-ggplot2-cheat-sheet","R ggplot2 cheatsheet - Data Visualization with ggplot2 - CHEAT SHEET","","ggplot2 cheat sheet summarizing how to build plots from the grammar of graphics: a dataset, a coordinate system, and geoms as visual marks. Covers core setup with ggplot(data, aes()) and adding layers via geom_* functions, plus optional stat, position, coordinates, facets, scales, and themes. Lists graphical primitives, common aesthetics, continuous and discrete variables, and many geom types including points, lines, areas, histograms, labels, jitter, smooth, violin, maps, error visualization, and multi-variable plots like contours and tiles.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/r-ggplot2-cheatsheet-data-visualization-with-ggplot2-cheat-sheet/572745/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/r-ggplot2-cheatsheet-data-visualization-with-ggplot2-cheat-sheet/572745.png","ImageObject",442,249,{"name":88,"@type":89},"Rizky","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":79},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"How do you start building a ggplot2 chart from a dataset?","Question",{"text":108,"@type":109},"Use ggplot(data = \u003CDATA>, aes(...)) to begin a plot, then add one geom_* layer at a time. Each geom function returns a layer that you can further configure.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"What are the common components you can add to ggplot2 plots?",{"text":113,"@type":109},"You can add required layers with geom functions, then optionally include coordinate functions, facet functions, scale functions, and theme functions to complete the visualization.",{"name":115,"@type":106,"acceptedAnswer":116},"How can you visualize statistical uncertainty or error bars in ggplot2?",{"text":117,"@type":109},"Create a data frame containing fit and standard error bounds, then use geoms such as geom_crossbar(), geom_errorbar(), geom_linerange(), and geom_pointrange() to draw uncertainty intervals.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},572745,1792337868,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":79,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":73,"language":135,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":61,"update_tm":139,"read_time":9},962085564807,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Basics  \nggplot2 is based on the grammar of graphics, the idea that you can build every graph from the same components: a data set, a coordinate system, and geoms—visual marks that represent data points.  \ndata geom  \nx = F · y = A  \n+  \ndata geom  \nx = F · y = A color = F size = A  \nComplete the template below to build a graph.  \nggplot (data = \u003CDATA> ) +  required  \n \u003CGEOM_FUNCTION> (mapping = aes( \u003CMAPPINGS> ),  \nstat = \u003CSTAT> , position = \u003CPOSITION> ) +  \u003CCOORDINATE_FUNCTION> +  \u003CFACET_FUNCTION> +  \u003CSCALE_FUNCTION> +  \u003CTHEME_FUNCTION>  \nNot required, sensible defaults supplied  \nggplot(data = mpg, aes(x = cty, y = hwy)) Begins a plot that you finish by adding layers to. Add one geom function per layer.  \ndata  geom   \nqplot(x = cty, y = hwy, data = mpg, geom = “point\") Creates a complete plot with given data, geom, and mappings. Supplies many useful defaults. last_plot() Returns the last plot  \nggsave(\"plot.png\", width = 5, height = 5) Saves last plot as 5’ x 5’ file named \"plot.png\" in working directory. Matches file type to file extension.  \nData Visualization with ggplot2 : : CHEAT SHEET   \n+ =  \ncoordinate system  \nTo display values, map variables in the data to visual properties of the geom (aesthetics) like size, color, and x and y locations.  \ncoordinate system  \nGeo ms Use a geom function to represent data points, use the geom’s aesthetic properties to represent variables.  \nEach function returns a layer.  \nGRAPHICAL PRIMITIVES  \na \u003C-ggplot(economics, aes(date, unemploy))  \nb \u003C-ggplot(seals, aes(x = long, y = lat))  \na + geom_blank()  \n(Useful for expanding limits)  \nb + geom_curve(aes(yend = lat + 1, xend=long+1,curvature=z)) -x, xend, y, yend, alpha, angle, color, curvature, linetype, size a + geom_path(lineend=\"butt\", linejoin=\"round\", linemitre=1)  \nx, y, alpha, color, group, linetype, size a + geom_polygon(aes(group = group)) x, y, alpha, color, fill, group, linetype, size  \nb + geom_rect(aes(xmin = long, ymin=lat, xmax= long + 1, ymax = lat + 1)) -xmax, xmin, ymax, ymin, alpha, color, fill, linetype, size  \na + geom_ribbon(aes(ymin=unemploy-900, ymax=unemploy + 900)) -x, ymax, ymin, alpha, color, fill, group, linetype, size  \nLINE SEGMENTS  \ncommon aesthetics: x, y, alpha, color, linetype, size b + geom_abline(aes(intercept=0, slope=1))  \nb + geom_hline(aes(yintercept = lat))  \nb + geom_vline(aes(xintercept = long)) b + geom_segment(aes(yend=lat+1, xend=long+1)) b + geom_spoke(aes(angle = 1:1155, radius = 1))  \nONE VARIABLE continuous  \nc \u003C-ggplot(mpg, aes(hwy)); c2 \u003C-ggplot(mpg)  \nc + geom_area(stat = \"bin\")  \nx, y, alpha, color, fill, linetype, size  \nc + geom_density(kernel = \"gaussian\")  \nx, y, alpha, color, fill, group, linetype, size, weight c + geom_dotplot()  \nx, y, alpha, color, fill  \nc + geom_freqpoly() x, y, alpha, color, group, linetype, size  \nc + geom_histogram(binwidth = 5) x, y, alpha, color, fill, linetype, size, weight  \nc2 + geom_qq(aes(sample = hwy)) x, y, alpha, color, fill, linetype, size, weight  \ndds-creteggplot(mpg, aes(fl))  \nd + geom_bar()  \nx, alpha, color, fill, linetype, size, weight  \ne + geom_label(aes(label = cty), nudge_x = 1, nudge_y = 1, check_overlap = TRUE) x, y, label, alpha, angle, color, family, fontface, hjust, lineheight, size, vjust  \ne + geom_jitter(height = 2, width = 2)  \nx, y, alpha, color, fill, shape, size  \ne + geom_point(), x, y, alpha, color, fill, shape, size, stroke  \ne + geom_quantile(), x, y, alpha, color, group, linetype, size, weight  \ne + geom_rug(sides = \"bl\"), x, y, alpha, color, linetype, size  \ne + geom_smooth(method = lm), x, y, alpha, color, fill, group, linetype, size, weight  \ne + geom_text(aes(label = cty), nudge_x = 1, nudge_y = 1, check_overlap = TRUE), x, y, label, alpha, angle, color, family, fontface, hjust, lineheight, size, vjust  \ndiscrete x , continuous y  \nf \u003C-ggplot(mpg, aes(class, hwy))  \nf + geom_col(), x, y, alpha, color, fill, group, linetype, size  \nf + geom_boxplot(), x, y, lower, middle, upper, ymax, ymin, alpha, color, fi","cbCaidxpHgabm2zT","https://ap.wps.com/l/cbCaidxpHgabm2zT","pdf",934997,"English","# Basics\n## Plot construction with ggplot2 layers\n## Graphical primitives and aesthetics\n# Geoms by data type\n## One variable (continuous)\n## Discrete variables\n## Line segments and segments\n# Advanced examples\n## Visualizing error\n## Maps\n## Three variables (contour, raster, tile)","[{\"question\":\"How do you start building a ggplot2 chart from a dataset?\",\"answer\":\"Use ggplot(data = \\u003cDATA\\u003e, aes(...)) to begin a plot, then add one geom_* layer at a time. Each geom function returns a layer that you can further configure.\"},{\"question\":\"What are the common components you can add to ggplot2 plots?\",\"answer\":\"You can add required layers with geom functions, then optionally include coordinate functions, facet functions, scale functions, and theme functions to complete the visualization.\"},{\"question\":\"How can you visualize statistical uncertainty or error bars in ggplot2?\",\"answer\":\"Create a data frame containing fit and standard error bounds, then use geoms such as geom_crossbar(), geom_errorbar(), geom_linerange(), and geom_pointrange() to draw uncertainty intervals.\"}]","R ggplot2 cheatsheet - Data Visualization with ggplot2 - CHEAT SHEET | PDF",1791929110]