The inset graph is inherently a second layer. Suppose you have two layers on one graph, and set the second layer as the inset of the first layer.
You can link the second layer to the first layer, set the layer size/position unit to be % of the first layer. This allows you to accurately control the size of the inset layer. Here is a sample LabTalk script:
page.active=2; // activate the second layer
layer.link=1; // link the second layer to the first layer
layer.unit=7; // set the layer position/size unit to be % of linked layer
layer.left=0;
layer.top = 0;
layer.width = 25;
layer.height = 20;
The Python script example
import originpro as op
gp = op.find_graph()
gl = gp[1]
gl.set_int("link",1)
gl.set_int("unit",7)
gl.set_int("left", 0)
gl.set_int("top",0)
gl.set_int("width",25)
gl.set_int("height",20)
James