# How to create an inset zoom plot for function visualization?

**URL:** <https://community.wolfram.com/t/how-to-create-an-inset-zoom-plot-for-function-visualization/26415>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [February 3, 2026, 11:48pm UTC](https://community.wolfram.com/t/how-to-create-an-inset-zoom-plot-for-function-visualization/26415 "2026-02-03T23:48:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmamathes](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mmamathes](https://community.wolfram.com/u/mmamathes)\
**Post date:** [February 3, 2026, 11:48pm UTC](https://community.wolfram.com/t/how-to-create-an-inset-zoom-plot-for-function-visualization/26415/1 "2026-02-03T23:48:20Z")

</div>

![2026-02-04_073627.jpg](https://global.discourse-cdn.com/wolfram/original/2X/e/e695be95c3e28ac61b96bb1a009f87816e62b268.jpeg)

The overall image is the same as above, but the details are not clear in the full view. How can I, like in the image above, display an enlarged view of a specified local region alongside the main plot when drawing the complete image?

Here is a current example: when plotting the overall function image, it is impossible to clearly show the size relationship of the function values when the independent variable takes 7 and 8. The code is as follows:

```
Plot[Log[x]/Sqrt[x], {x, 0, 10}, PlotRange -> {Automatic, Automatic}, 
 AxesOrigin -> {0, 0}, 
 Epilog -> {Red, Dashed, InfiniteLine[{#, 0}, {0, 1}] & /@ {7, 8}}]

```

 ![2026-02-04_074334.png](https://global.discourse-cdn.com/wolfram/original/2X/a/a76d373b5d96958bffae678a47d20c066a33a213.png)

Below is the narrowed plotting range of the function, which is equivalent to locally magnifying the function image between the independent variables 7 and 8.

```
Plot[Log[x]/Sqrt[x], {x, 0, 10}, 
 PlotRange -> {Automatic, {0.733, 0.737}}, AxesOrigin -> {0, 0}, 
 Epilog -> {Red, Dashed, InfiniteLine[{#, 0}, {0, 1}] & /@ {7, 8}}]

```

 ![2026-02-04_074552.png](https://global.discourse-cdn.com/wolfram/original/3X/b/3/b3c030a8ff30a319b247f95326c156f16eeda040.png)

My current idea is, how can I combine these two figures together, just like shown in the very first image above? For this example function, when plotting the overall image, display a locally magnified function image of the independent variable between 7 and 8 alongside it, so that the clear size relationship between the function values corresponding to these two independent variables can be distinctly shown.

---

<div class="post-metadata">

**Author:** ![mroge02](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mroge02/32/28775_2.png) [@mroge02](https://community.wolfram.com/u/mroge02)\
**Post date:** [February 4, 2026, 12:18am UTC](https://community.wolfram.com/t/how-to-create-an-inset-zoom-plot-for-function-visualization/26415/2 "2026-02-04T00:18:23Z")

</div>

Re style: _De gustibus_ and all that. I changed the dashed lines to `Prolog` so they wouldn’t go over the inset. Maybe you don’t want that. (For best control, use `Show[graphics1, plot, graphics2,...]`, but it can be more work.)

```
With[{base = 
   Plot[Log[x]/Sqrt[x], {x, 0, 10}, 
    PlotRange -> {Automatic, Automatic}, AxesOrigin -> {0, 0}, 
    Prolog -> {Red, Dashed, InfiniteLine[{#, 0}, {0, 1}] & /@ {7, 8}}]},
 Show[
  base,
  Graphics[{Inset[Show[base
      , Frame -> True, Background -> LightGray, Ticks -> Automatic, 
      Axes -> Automatic, PlotRange -> {{6.5, 8.5}, {0.733, 0.737}}, 
      ImageSize -> 120], Scaled[{0.8, 0.6}]]}]]
 ]

```

 ![4379Untitled.png](https://global.discourse-cdn.com/wolfram/original/2X/8/8a7869667263b3bfbbc889338434efcdfcd78663.png)
