Update 'projekt.R'

This commit is contained in:
Patrycja Łaźna 2021-04-14 15:23:03 +02:00
parent b3791c903c
commit 35c23bd352

View File

@ -30,6 +30,17 @@ ggplot(german_credit_risk, aes(x=Purpose, y=Age, fill=Sex)) +
theme_minimal() +
theme(legend.position="bottom")
# ridge plot
german_credit_risk <- na.omit(german_credit_risk)
ggplot(german_credit_risk, aes(x=Credit.amount,y=Checking.account,fill=Checking.account))+
geom_density_ridges_gradient(scale = 8, show.legend = TRUE, rel_min_height = 0.00) + theme_ridges() +
scale_fill_brewer(palette = 4)+
scale_y_discrete(expand = c(0.01, 0)) +
scale_x_continuous(expand = c(0.01, 0)) +
labs(x = "Credit amount [DM]",y = "Checking account", fill="Checking account status") +
ggtitle("Credit amount density estimation by checking account status ") +
theme(plot.title = element_text(hjust = 0.5))
ggplot(german_credit_risk, aes(x = Duration, y = Credit.amount, color = Sex)) +
geom_point(size = 1.5) +