In this article, we are going to see the master data visualization with ggplot2 in R Programming Language. Generally, data visualization is the pictorial representation of a dataset in a visual format like charts, plots, etc.
These are the important graphs in data visualization with ggplot2,
 Bar Chart
 Violin Plots
 Density Plots
 Box Plots
 Pie Chart
 Stacked Bar Chart
 Scatter plots
 Frequency plots
 Use ggplot2 to visualize time series data and its components like seasonality, trends, and others.
Bar chart in R
A bar chart is a representation of the dataset in the format of a rectangular bar. Respectively, its height depends on the values of variables in a dataset. You can use geom_bar() to create bar charts with ggplot2.
R

Output:
Bar chart
Violin Plots in R
Violin plots are similar to box plots. It also shows the probability density at various values. In the violin plots, Denser areas indicate a higher probability at that value. The geom_violin() function is used to create violin plots in ggplot2.
R

Output:
Violin Plot
Density Plots in R
It is used to compute the density estimation. Also, It is a smoothed version of a histogram. The geom_density() function is used to create density plots in ggplot2.
R

Output:
Density Plot
Box Plots in R
It is a visual representation of the spread of data for a variable and displays the range of values along with the median and quartiles. The geom_boxplot() function is used to create box plots in ggplot2.
R

Output:
Box plot
Pie Chart in R
It is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. Each slice of the pie chart represents a proportion of the whole. In R, pie charts can be created using the pie function from the ggplot2 library.
R

Output:
Pie Chart
Stacked Bar Chart in R
It is a bar chart where the bars are divided into segments to represent the contribution of different categories to the total. In other words, each bar in a stacked bar c
hart represents the total value of multiple categories. The height of each segment of the bar represents the value of a particular category, and the segments are stacked on top of each other to represent the total value of the bar.
R

Output:
Stacked Bar chart in R – Geeksforgeeks
Scatter plots in R
In R, a scatter plot is a graphical representation of two sets of data on a Cartesian plane. It displays individual data points as dots, with the xaxis and yaxis representing two variables. The position of each data point on the xaxis and yaxis represents the values of the corresponding x and y variables. Scatter plots can be used to visualize the relationship between two variables and identify trends, patterns, and outliers in the data. To create a scatter plot in R, you can use the plot() or ggplot function.
R

Output:
Scatter Plot
Frequency plots in R
In R, a frequency plot, also known as a histogram, is a graphical representation of the distribution of a set of continuous or discrete data. It shows how frequently each data value or range of values occurs in the data set. The frequency plot is created by dividing the range of the data into equal intervals, called bins, and counting the number of data points that fall into each bin. The height of each bar in the histogram represents the frequency of the corresponding bin. To create a frequency plot in R, you can use the hist function. The hist function takes the data as input and generates the histogram plot.
R

Output:
Frequency Plot
In R, ggplot2 to visualize time series data and its components like seasonality, trends, and others.
ggplot2 is a powerful data visualization library in R that allows you to create various types of plots, including time series plots. Time series data refers to data that is collected and recorded over time, such as daily stock prices or monthly sales data. When visualizing time series data in R using ggplot2, you can use various techniques to identify and highlight the different components of the time series, such as trends, seasonality, and residuals. These components are important in understanding the behavior of the time series and making predictions.
R

Output:
Time Series Data