Hello,
I am trying to create a horizontal bar graph (actually, I am not sure if I should call it a bar graph). The y-axis is going to be country and the x-axis should be year. The content of the graph is going to be based on a 'binary' variable. If 'binary' ==1, I want it to appear on the graph and if 'binary' ==0, it is not going to show on the graph.
To be more elaborate, let's say the sample period spans from 2000 to 2010. The binary for the US is 1 from 2000 to 2006 but 0 from 2007 to 2010. On the graph, for the US (found on y-axis), it will have a straight line/bar from period 2000 - 2006 (found on x-axis) but no line/bar from 2007 - 2010.
Could someone help me with coding this graph?
Thank you!
Best,
Soyoung
I am trying to create a horizontal bar graph (actually, I am not sure if I should call it a bar graph). The y-axis is going to be country and the x-axis should be year. The content of the graph is going to be based on a 'binary' variable. If 'binary' ==1, I want it to appear on the graph and if 'binary' ==0, it is not going to show on the graph.
To be more elaborate, let's say the sample period spans from 2000 to 2010. The binary for the US is 1 from 2000 to 2006 but 0 from 2007 to 2010. On the graph, for the US (found on y-axis), it will have a straight line/bar from period 2000 - 2006 (found on x-axis) but no line/bar from 2007 - 2010.
Could someone help me with coding this graph?
Thank you!
Best,
Soyoung
Comment