1) I'd like to put a vertical line on the x-axis in my Stata Graph. I need this line to show when the Brexit occured (31.January.2020) to better describe the development before and after Brexit.
2) Furthermore I'd like to show my y-axis values in a 45° angle because they have to many digits. I know I can switch it in the "Graph-Editor" settings, but does anybody know if there is a appropriate command for it, so I can put it in my Do-File?
This is my Do-File so far
Code:
*Data import*
import excel "/Users/nicolasstappen/Desktop/Nico/Studium/Master/5. Semester/Masterarbeit/Daten/tESTall Data in one file nur ab 2019_MN.xlsx", sheet("Trade values") firstrow case(lower)
** Exceltabelle mit Daten bis August22:
//import excel "/Users/nicolasstappen/Desktop/Nico/Studium/Master/5. Semester/Masterarbeit/Daten/tESTall Data in one file nur ab 2019.xlsx", sheet("Trade values") firstrow case(lower)
codebook // entweder nur codebook oder codebook varname
drop classification // no information and/or variation
drop perioddesc // no info that is not within Period already
drop reportercode // no information and/or variation
drop partnercode // no added information
drop tradeflowcode // no added information
replace tradeflow="export" if tradeflow=="Export"
replace tradeflow="import" if tradeflow=="Import"
replace tradeflow="reimport" if tradeflow=="Re-import"
replace reporter="united kingdom" if reporter=="United Kingdom"
replace partner = lower(partner)
gen period_new=.
xtset tradevalueus
xtset tradevaluemilus
gen zeit = ym(floor(period/100), mod(period, 100))
format zeit %tmNN/CCYY
sort partner
sort zeit
**sort period_new
format %100.0g tradevalueus // um e's wegzubekommen
format %100.0g tradevaluemilus // um e's wegzubekommen
replace tradevalueus=round(tradevalueus,1)
graph twoway line tradevaluemilus zeit if tradeflow=="export" & partner=="germany", title("Germany Export") name(graph1) c(L) //Graph
graph twoway line tradevaluemilus zeit if tradeflow=="import" & partner=="germany", title("Germany Import") name(graph2) c(L) //Graph
graph combine graph1 graph2
graph twoway line tradevaluemilus zeit if tradeflow=="export" & partner=="germany", title("Germany Export") name(graph1) c(L) //Graph
graph twoway line tradevaluemilus zeit if tradeflow=="import" & partner=="germany", title("Germany Import") name(graph2) c(L) //Graph
graph combine graph1 graph2
graph drop graph1
graph drop graph2Thanks in advance and best regards
Nico
0 Response to vertical line graph two way
Post a Comment