Read the complete article and download the code:

Key Points:

Load the ggplot2 package

ggplot2 Customization:

Create a bar chart with mpg as fill

Before We Start, Make sure you have Read these Articles:

Add scale_fill_gradient with low = “red” and high = “blue”

Change the color gradient from red to blue to green to Brown

Change the color space from Lab to rgb

Create a new dataset with some missing values

Change the color for missing values from grey to pink

Change the type of legend from colourbar to legend

Change the aesthetic mapping from fill to color

Add titles and labels with labs

Adjust the size and shape with theme

Create three plots with scale_fill_gradient