# How to enlarge a specific part of a graph using Plot Command? [duplicate]

How to enlarge the closed curves of any Graph and Show them in a separate Graph within the same big Graph? You can use any Function to Plot such type of Graph.Just_like_the_following_Fig.

## marked as duplicate by user9660, RunnyKine, m_goldberg, Öskå, MarcoBMay 1 '16 at 15:55

• Have you looked at how-to-insert-a-plot-into-another-plot? – Rashid Apr 30 '16 at 16:11
• One of ways, p1 = Plot[x Sin[1/x], {x, -1/2, 1/2}, PlotStyle -> {Red}, ImageSize -> {500}, Frame -> True, Axes -> None] after that restrict the PlotRange -> {{-0.02, 0.02} as p2 = Plot[x Sin[1/x], {x, -1/2, 1/2}, PlotRange -> {{-0.02, 0.02}, {-0.02, 0.02}} , PlotStyle -> {Red}] copy the p2 (by single click on it) and then double click on the p1, and paste p2 on it (p1). – kamran Apr 30 '16 at 16:47

plot =
Plot[x Sin[1/x], {x, -1/2, 1/2},
PlotStyle -> {Red},
ImageSize -> {500},
Frame -> True,
Axes -> None]


smallplot =
Plot[x Sin[1/x], {x, -1/10, 1/10},
PlotRange -> {{-0.02, 0.02}, {-0.02, 0.02}} ,
PlotStyle -> {Red},
Frame -> True,
Axes -> None]


Now you can combine these plot to make a final plot as follows

finalplot =
Plot[x Sin[1/x], {x, -1/2, 1/2},
PlotStyle -> {Red},
ImageSize -> {500},
Frame -> True,
Axes -> None,
Prolog ->Inset[smallplot, {0.0, .3}]]


I just showed how to combine two plots. You can play with plot and frame styles. To get "zoom-in' effect you need to plot the same function on a smaller domain, then combine them by using Prolog followed by Inset.