IDEAS home Printed from
   My bibliography  Save this article

A note on adding objects to an existing twoway graph


  • Ben Jann

    () (University of Bern)


In Stata, graphs are usually generated by one call to the graph command. Sometimes, however, it would be convenient to be able to add objects to a graph after the graph has been created. In this article, I provide a command called addplot that offers such functionality for twoway graphs, capitalizing on an undocumented feature of Stata’s graphics system. Copyright 2015 by StataCorp LP.

Suggested Citation

  • Ben Jann, 2015. "A note on adding objects to an existing twoway graph," Stata Journal, StataCorp LP, vol. 15(3), pages 751-755, September.
  • Handle: RePEc:tsj:stataj:v:15:y:2015:i:3:p:751-755
    Note: to access software from within Stata, net describe

    Download full text from publisher

    File URL:
    File Function: link to article purchase
    Download Restriction: no

    References listed on IDEAS

    1. Donald W. K. Andrews & Xiaoxia Shi, 2013. "Inference Based on Conditional Moment Inequalities," Econometrica, Econometric Society, vol. 81(2), pages 609-666, March.
    2. Charles F. Manski, 1997. "Monotone Treatment Response," Econometrica, Econometric Society, vol. 65(6), pages 1311-1334, November.
    3. Victor Chernozhukov & Sokbae Lee & Adam M. Rosen, 2013. "Intersection Bounds: Estimation and Inference," Econometrica, Econometric Society, vol. 81(2), pages 667-737, March.
    4. Pedro Carneiro & James J. Heckman & Edward J. Vytlacil, 2011. "Estimating Marginal Returns to Education," American Economic Review, American Economic Association, vol. 101(6), pages 2754-2781, October.
    5. Andrews, Donald W.K. & Shi, Xiaoxia, 2014. "Nonparametric inference based on conditional moment inequalities," Journal of Econometrics, Elsevier, vol. 179(1), pages 31-45.
    6. Victor Chernozhukov & Han Hong & Elie Tamer, 2007. "Estimation and Confidence Regions for Parameter Sets in Econometric Models," Econometrica, Econometric Society, vol. 75(5), pages 1243-1284, September.
    7. Arie Beresteanu & Francesca Molinari, 2008. "Asymptotic Properties for a Class of Partially Identified Models," Econometrica, Econometric Society, vol. 76(4), pages 763-814, July.
    8. Ben Jann, 2005. "MOREMATA: Stata module (Mata) to provide various functions," Statistical Software Components S455001, Boston College Department of Economics, revised 31 May 2017.
    9. Guido W. Imbens & Charles F. Manski, 2004. "Confidence Intervals for Partially Identified Parameters," Econometrica, Econometric Society, vol. 72(6), pages 1845-1857, November.
    10. Charles F. Manski & John V. Pepper, 2000. "Monotone Instrumental Variables, with an Application to the Returns to Schooling," Econometrica, Econometric Society, vol. 68(4), pages 997-1012, July.
    11. repec:cwl:cwldpp:1840rr is not listed on IDEAS
    12. Carneiro, Pedro & Lee, Sokbae, 2009. "Estimating distributions of potential outcomes using local instrumental variables with an application to changes in college enrollment and wage inequality," Journal of Econometrics, Elsevier, vol. 149(2), pages 191-208, April.
    13. Joseph P. Romano & Azeem M. Shaikh, 2010. "Inference for the Identified Set in Partially Identified Econometric Models," Econometrica, Econometric Society, vol. 78(1), pages 169-211, January.
    Full references (including those not matched with items on IDEAS)

    More about this item


    addplot; graph twoway; graphics; graph editing;


    Access and download statistics


    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:15:y:2015:i:3:p:751-755. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F. Baum) or (Lisa Gilmore). General contact details of provider: .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.