Hello,
I wanted to kindly ask for your help regarding some bubble charts I am trying to create. (I tried to find solutions for my issue but have not managed to find anything..)
Code for bubble charts:
twoway scatter pov1 nyear1 [aw=npoor1] if region == "Arab States" & period == 1 || scatter pov2 nyear2 [aw=npoor2] if region == "Arab States" & period == 1
twoway scatter pov1 nyear1 [aw=npoor1] if region == "East Asia and the Pacific" & period == 1 || scatter pov2 nyear2 [aw=npoor2] if region == "East Asia and the Pacific" & period == 1
... (for all other world regions)
When plotting these graphs the size of the bubbles is relative to each other within each figure but not across the two figures and for both variables (npoor1 and npoor2). Is there any way of adjusting the code or preparing the data so that the bubble size if is relative to each other and across the different graphs?
Data looks more or less like this:
so Egypt's bubble for nyear1 should be bigger than Cambodia's nyear2 bubble but both should have the same size for year2.
I would be grateful for any help!
Alex
I wanted to kindly ask for your help regarding some bubble charts I am trying to create. (I tried to find solutions for my issue but have not managed to find anything..)
Code for bubble charts:
twoway scatter pov1 nyear1 [aw=npoor1] if region == "Arab States" & period == 1 || scatter pov2 nyear2 [aw=npoor2] if region == "Arab States" & period == 1
twoway scatter pov1 nyear1 [aw=npoor1] if region == "East Asia and the Pacific" & period == 1 || scatter pov2 nyear2 [aw=npoor2] if region == "East Asia and the Pacific" & period == 1
... (for all other world regions)
When plotting these graphs the size of the bubbles is relative to each other within each figure but not across the two figures and for both variables (npoor1 and npoor2). Is there any way of adjusting the code or preparing the data so that the bubble size if is relative to each other and across the different graphs?
Data looks more or less like this:
country | region | nyear1 | nyear2 | pov1 | pov2 | npoor1 | npoor2 | period |
Algeria | Arab States | 2006 | 2010 | 5 | 3 | 10 | 6 | 1 |
Cambodia | East Asia and the Pacific | 2008 | 2012 | 10 | 8 | 12 | 10 | 1 |
Egypt | Arab States | 2000 | 2005 | 9 | 6 | 15 | 10 | 1 |
Fiji | East Asia and the Pacific | 2010 | 2015 | 2 | 1 | 2 | 1 | 1 |
... |
I would be grateful for any help!
Alex
Comment