diff --git a/projekt.R b/projekt.R index 9d3a1eb..31b3240 100644 --- a/projekt.R +++ b/projekt.R @@ -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) +