Thanks to the ever-energetic Kit Baum, a new command multiline is now available on SSC for Stata 11+. (It may even be portable to Stata 8+, but I have not tried.)
Install with
The main application of multiline is to plot time series (especially but not only those measured in different units or on very different scales) in separate panels.
This can be a good alternative to the usual superimposed or spaghetti plot if the latter appears unclear or absurd.
The help file says more, but some examples give the flavour. On second thoughts, I would remove the redundant x-axis title "year" and explain "Price" as "(USD)". There's always something to tweak.
Install with
Code:
ssc install multiline
This can be a good alternative to the usual superimposed or spaghetti plot if the latter appears unclear or absurd.
The help file says more, but some examples give the flavour. On second thoughts, I would remove the redundant x-axis title "year" and explain "Price" as "(USD)". There's always something to tweak.
Code:
webuse grunfeld, clear multiline invest mvalue kstock year if company == 1, recast(connected) graph export ml1.png multiline invest mvalue kstock year if company == 1, recast(connected) /// mylabels(`" `" "Gross" "investment" "' `" "Market" "value" "' `" "Plant and" "equipment value" "' "') graph export ml2.png
Code:
sysuse auto, clear multiline mpg weight length displacement price, recast(scatter) c(none) by(col(2)) ms(Oh) subtitle(, orient(vertical)) graph export ml3.png
Comment