PlotInset¶
-
PlotInset(p::Tuple, q::Tuple, plot)¶ This
PlotComponentcan be used to embedplotin a different plot.pandqmust be tuples of length 2 giving the position of the upper and lower corner in the parent plot. The coordinates inpandqare normalized to range between 0 and 1. The parent plot is given by the third argumentplotand must be of typePlotContainer.
Example¶
x = linspace(0, 10)
p1 = plot(x, x.^2)
p2 = plot(x, sin.(x), color="red")
inset = PlotInset((0.1, 0.6), (0.7, 0.9), p2)
add(p1, inset)
