EconPapers    
Economics at your fingertips  
 

A note on creating inset plots using graph twoway

Matthew Tibbles () and Eric Melse
Additional contact information
Matthew Tibbles: WPI Economics

Stata Journal, 2023, vol. 23, issue 1, 265-275

Abstract: Inset plots can be used to “zoom in” on densely populated areas of a graph or to add extra relevant data in the form of, for example, distribution plots. However, the standard Stata command for combining plots, graph combine, does not permit this type of seamless integration. Each plot within a graph combine object is allocated a grid cell that cannot be placed within another grid cell— at least not without certain (invariably unwanted) graphical complications. We present a fairly simple work-around to this issue using reproducible examples. The main idea is to plot insets along a second axis and then artificially modify the range of this axis to constrain the inset plot within a specified area of the main graph. Additional tips are included for producing more intricate, multilayered inset graphs.

Keywords: twoway; graph combine; inset plots; scatterplots; graphics (search for similar items in EconPapers)
Date: 2023
Note: to access software from within Stata, net describe http://www.stata-journal.com/software/sj23-1/gr0093/
References: Add references at CitEc
Citations:

Downloads: (external link)
http://hdl.handle.net/10.1177/1536867X231162022

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:23:y:2023:i:1:p:265-275

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

DOI: 10.1177/1536867X231162022

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-20
Handle: RePEc:tsj:stataj:v:23:y:2023:i:1:p:265-275