loans <- dplyr::select(loans_full_schema, loan_amount, interest_rate, term,
grade, state, annual_income, homeownership, debt_to_income)
ggplot(loans, aes(x = interest_rate)) +
geom_density(color = "blue", fill = "green", linetype = "dashed", linewidth = 1.5)
ggplot(data = mpg) +
geom_point(aes(x = cty, y = hwy)) +
labs(title = "Fuel Economy Data", x = "miles per gallon in city", y = "miles per gallon in highway" ) +
theme(plot.title = element_text(color = "blue", size = rel(2)), axis.title = element_text(size = rel(1.5)), plot.margin = margin(1,1,1,1,unit = "cm") ) +
#Change the aspect ratio of your graph to be 1
coord_fixed(ratio = 1)
ggplot(data = diamonds) +
geom_point(mapping = aes(x = carat, y = price, color = clarity)) +
scale_y_continuous(name = "price in US dollars ", labels = scales::dollar) + scale_x_continuous(name = "weight of the diamond") +
facet_grid(cut~color) +
#To be a grid of scatter plots
theme_linedraw()
I think this plot is too informative, you can see 5 variables according this plot