b) Box Plot
diabetes$Outcome = as.character(diabetes$Outcome)
ggplot(diabetes, aes(x = Outcome, y = Pregnancies, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "Pregnancies",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = Glucose, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "Glucose",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = BloodPressure, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "BloodPressure",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = SkinThickness, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "SkinThickness",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = Insulin, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "Insulin",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = BMI, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "BMI",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = DiabetesPedigreeFunction, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "DiabetesPedigreeFunction",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))

ggplot(diabetes, aes(x = Outcome, y = Age, fill = Outcome)) +
geom_boxplot() +
labs(title = "Bloxplot using ggplot",
x = "Age",
y = "value",
caption = "Source: Iskulghar") +
theme(
legend.position = "top",
text = element_text(colour = 'black', size = 14))
