Hello Everybody,
I have a data set that looks like that:
I would like to have a bar plot for year 2017 and an overlaying dot plot for year 2016. The real dataset is a large panel (wide and long) so the obvious reshape options are not very convenient. My code looks like that:
graph (bar trade if year==2017 & unit=="dollars", over(country)) (dot trade if year==2016 & unit=="dollars", over(country) vertical)
But it does not seem to work.
Any suggestion on how to go about it?
Thank you very much for your help!
Paolo
I have a data set that looks like that:
country | year | unit | trade |
USA | 2017 | dollars | 1 |
USA | 2017 | euros | 2 |
USA | 2016 | dollars | 3 |
USA | 2016 | euros | 4 |
China | 2017 | dollars | 5 |
China | 2017 | euros | 6 |
China | 2016 | dollars | 7 |
China | 2016 | euros | 8 |
graph (bar trade if year==2017 & unit=="dollars", over(country)) (dot trade if year==2016 & unit=="dollars", over(country) vertical)
But it does not seem to work.
Any suggestion on how to go about it?
Thank you very much for your help!
Paolo
Comment