diff --git a/projekt.R b/projekt.R index 31b3240..67a3ef3 100644 --- a/projekt.R +++ b/projekt.R @@ -79,3 +79,12 @@ german_credit_risk %>% ) + ylab("Credit amount") + theme_bw() + +#Histogram przedstawiający ilość wziętych kredytów w zależności od wieku i z przeznaczeniem na co z linią gęstości +german_credit_risk %>% + ggplot(aes(x=Age, fill = Purpose)) + + geom_histogram(color = 'white', binwidth = 1) + + scale_x_continuous(name="Age", breaks = scales::pretty_breaks(n = 10)) + + ylab('Number of credits') + + stat_density(aes(x=Age, y=..count..), geom = "line", inherit.aes = FALSE, size = 1.10, color = '#555555', adjust = 1) +