You are on page 1of 12

scatter mpg weight

scatter mpg weight, color(black) title("Lighter cars get better mileage") ///
graphregion(color(white))
scatter mpg weight, color(black) title("Lighter cars get better mileage") ///
graphregion(color(white))

graph export "scatterplot_mpg_weight.pdf", replace


histogram price

histogram price, percent

kdensity price
graph bar, over(carsize)

graph box mpg, over(carsize)


scatter mpg weight if foreign == 1

scatter mpg weight, by(foreign)


twoway (scatter mpg weight if foreign == 1) ///
(scatter mpg weight if foreign == 0), ///
legend(label(1 Foreign) label(2 Domestic))

graph twoway (scatter turn length, color(navy%60)) ///


(scatter trunk length, color(maroon%60) yaxis(2)), ///
graphregion(color(white)) title("Turn Radius and Trunk Size by Car Length")
lowess

lowess mpg weight


lfit twoway

twoway (lfit mpg weight) (scatter mpg weight)


binscatter

x y

binscatter mpg weight

You might also like