Once you've added the necessary layers, you can view your plot by simply running the code in R or RStudio. # Run the plot code to view the scatter plot plot
Part of R Language Collective. 38. I'm trying to save a ggplot within a function using graphics devices. But I found the code produces empty graphs. Below is a very very simple example. library (ggplot2) ff 7. Plotting with ggplot2. Graphics are very important for data analysis. On the one hand, we can use it for exploratory data analysis to discover any hidden relationships or simply to get an overview. On the other hand, we need graphics to present results and communicate them to others. There are several ways to create graphics in R. If you want to control all style parameters including arrow-color indipendently from label-color etc. I recommend you using ggplot rather than factomineR for plotting. (Packages needed: factomineR, factoextra, ggplot, ggrepel) This is part 1 of a three part tutorial on ggplot2, an aesthetically pleasing (and very popular) graphics framework in R. This tutorial is primarily geared towards those having some basic knowledge of the R programming language and want to make complex and nice looking charts with R ggplot2.