Saturday, August 15, 2020

Stata Tip: How to Make Multiple Graphs Side by Side

 Yes, I know you know how to make graphs. Yes, you can make them one by one using copy-paste like crazy! If you're a bit fancier, you can use a foreach loop. But these techniques will produce separate graphs which you will then need to copy-paste (?) individually into your paper. If you were only going to make these graphs once and they would then be published, that's perfectly fine. Chances are though that you will make these graphs many many times. For this reason, it's best to invest in writing a few more lines in code to save you time in the future..but even more importantly, decrease the probability of making a mistake in the future. The more you automate, the lower the probability of making a mistake. 

Thank you, SDAS Techtips, for the tip. 

Click here for the code

How to make this: 

Instead of many of these: 

No comments:

Post a Comment