Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating multiple line plots for each country with panel data


    Hi,

    I am working with panel data and I am trying to make a plot similar to the one included below (This is an excerpt of a graph in the appendix, page 16 of Hanson, J & Sigman, R. "Leviathan’s Latent Dimensions: Measuring State Capacity for Comparative Political Research." Journal of Politics, forthcoming.). I would like to create an image that has line plots of the value of a variable for each country (approximately 150) in the dataset for a particular year (say 1960). Is it possible to include a large number of line plots together in one image like this using Stata?

    What would be the correct code to use? Any suggestions would be greatly appreciated.

    Best wishes,

    Daniel
    Click image for larger version

Name:	Screen Shot 2021-12-09 at 7.28.22 AM.png
Views:	1
Size:	30.4 KB
ID:	1640169

    Last edited by Daniel Schulte; 09 Dec 2021, 06:53.

  • #2
    You can do this with twoway but the difficulty would be doing this readably for 150 categories. How big is your paper size or monitor?

    Comment


    • #3
      I was planning to use standard portrait A4 paper size. The example image above uses two columns: with 50 countries in each column with a total of 100 countries covered in 1 A4 page. So I guess the example doesn't use 150 countries, but it still covers a lot: 100. It would be fine to cover 100 or even 80 (if necessary) in one page if that would help with the readability issue.

      Comment

      Working...
      X