# Zoom inset matplotlib with graphic instead of image

**URL:** <https://devforum.zoom.us/t/zoom-inset-matplotlib-with-graphic-instead-of-image/77604>\
**Category:** Web\
**Created:** [October 19, 2022, 10:39am UTC](https://devforum.zoom.us/t/zoom-inset-matplotlib-with-graphic-instead-of-image/77604 "2022-10-19T10:39:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![imranhasmi5434](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/imranhasmi5434/32/42365_2.png) [@imranhasmi5434](https://devforum.zoom.us/u/imranhasmi5434)\
**Post date:** [October 19, 2022, 10:39am UTC](https://devforum.zoom.us/t/zoom-inset-matplotlib-with-graphic-instead-of-image/77604/1 "2022-10-19T10:39:35Z")

</div>

I’m currently writing tool for handling MF4 files and plotting signals. I use asammdf for opening .mf4 files and getting info about the signals in them. I want to make a functionality that zooms in on a graphic whenever the signal reaches a certain value, exactly like in the link below: [Zoom region inset axes — Matplotlib 3.6.0 documentation](https://matplotlib.org/stable/gallery/subplots_axes_and_figures/zoom_inset_axes.html) but this I want to apply for my graphics. The signals I read from the file are each a structure that has a np.array of timestamps (x axis) and a np.array of samples (values that the signal reach). My question is how can I put the graph[i](https://www.lifepo4golfcartbattery.com/)c instead of the demo\_image in that code? I can’t really understand what each of the lines of code do in that example. Please help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 18, 2022, 8:39pm UTC](https://devforum.zoom.us/t/zoom-inset-matplotlib-with-graphic-instead-of-image/77604/2 "2022-11-18T20:39:40Z")

</div>

Closed on November 18, 2022, 8:39pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
