# Zooming plots in SWAN Notebook

**URL:** <https://swan-community.web.cern.ch/t/zooming-plots-in-swan-notebook/445>\
**Category:** General chat\
**Created:** [June 16, 2021, 9:43am UTC](https://swan-community.web.cern.ch/t/zooming-plots-in-swan-notebook/445 "2021-06-16T09:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![agchmiel](https://swan-community.web.cern.ch/letter_avatar_proxy/v4/letter/a/41988e/32.png) [@agchmiel](https://swan-community.web.cern.ch/u/agchmiel)\
**Post date:** [June 16, 2021, 9:43am UTC](https://swan-community.web.cern.ch/t/zooming-plots-in-swan-notebook/445/1 "2021-06-16T09:43:25Z")

</div>

Hi,

I have a question about presenting results in SWAN notebooks. Is there any possibility to add an interactive zoom to matplotlib plots in SWAN? I would like to have a possibility to zoom the results similarly, as when producing matplotlib plots in LiClipse, where this occurs automatically. Or should I use another package for plotting?

I will be grateful for your suggestions.  
Kind regards,  
Agnieszka

---

<div class="post-metadata">

**Author:** ![etejedor](https://swan-community.web.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://swan-community.web.cern.ch/u/etejedor)\
**Post date:** [June 16, 2021, 12:41pm UTC](https://swan-community.web.cern.ch/t/zooming-plots-in-swan-notebook/445/2 "2021-06-16T12:41:24Z")

</div>

Hello,  
It is possible to interactively zoom in matplotlib plots from a notebook, by adding `%matplotlib widget` at the beginning of a cell.

Unfortunately that feature has now a bug in SWAN with the newest software stack (100) that we are trying to solve:

> [@Bug in interactive matplotlib plots in SWAN notebooks](https://swan-community.web.cern.ch/t/bug-in-interactive-matplotlib-plots-in-swan-notebooks/419/4):
>
> Hi Chris, I just tried with LCG 99 and widget as Phil did and I don’t see the behaviour you describe (the reported cursor position coincides with the actual position). This is with Chromium. Is this something you can reproduce outside of SWAN? EDIT: I now read you don’t have this behaviour in a normal notebook. It’s definitely not something we are aware as a bug and it’s weird that we can’t reproduce consistently.

You can still use 97a as software stack and the interactive zoom should still work.
