Graphs
My book about data visualization in R is available! The book covers many of the same topics as the Graphs and Data Manipulation sections of this website, but it goes into more depth and covers a broader range of techniques. You can preview it at Google Books.
Purchase it from Amazon, or direct from O'Reilly.
There are many ways of making graphs in R, each with its advantages and disadvantages. The focus here is on the ggplot2 package, which is based on the Grammar of Graphics (by Leland Wilkinson) to describe data graphics.
Graphs with ggplot2
- Bar and line graphs (ggplot2)
- Plotting means and error bars (ggplot2)
- Plotting distributions (ggplot2) - Histograms, density curves, boxplots
- Scatterplots (ggplot2)
- Titles (ggplot2)
- Axes (ggplot2) - Control axis text, labels, and grid lines.
- Legends (ggplot2)
- Lines (ggplot2) - Add lines to a graph.
- Facets (ggplot2) - Slice up data and graph the subsets together in a grid.
- Multiple graphs on one page (ggplot2)
- Colors (ggplot2)
Miscellaneous
- Output to a file - PDF, PNG, TIFF, SVG
- Shapes and line types - Set the shape of points and patterns used in lines.
- Fonts - Use different fonts in your graphs
- Antialiased bitmap output - If your plots look jagged or pixelated. (Not yet finished)
Basic graphs with standard graphics
Other interesting graphs
Useful links
当前内容版权归 cookbook-r.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 cookbook-r.com .