Reputation: 1360
How do I align an inset plot in multiplot so that the right and top frames of both plots coincide so that I get something like in this plot:
I tried to read the documentation on coordinates but I do not understand that at all and thus I cannot properly set origin and size.
Upvotes: 2
Views: 5411
Reputation: 4095
You specify the size of the inset relative to the main figure using set size
, and then move its bottom left corner using set origin
so that the top right corner is at (1,1). For example,
set multiplot
plot exp(-x) # plot main figure
set size 0.6, 0.5 # set size of inset
set origin 0.4, 0.5 # move bottom left corner of inset
plot cos(x) # plot inset
unset multiplot
gives
Of course you will have to adjust tick labels and legends to avoid overlaps in the composite figure.
Upvotes: 2