# Subplots with FigureWidget

**URL:** <https://community.plotly.com/t/subplots-with-figurewidget/22007>\
**Category:** 📊 Plotly Python\
**Created:** [April 8, 2019, 7:52am UTC](https://community.plotly.com/t/subplots-with-figurewidget/22007 "2019-04-08T07:52:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ursus](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@ursus](https://community.plotly.com/u/ursus)\
**Post date:** [April 8, 2019, 7:52am UTC](https://community.plotly.com/t/subplots-with-figurewidget/22007/1 "2019-04-08T07:52:59Z")

</div>

Is it possible to create subplots with `FigureWidget()` or is it only possible with `tools.make_subplots()`? In my experience `FigureWidget()` is faster and in JupyterLab the image is displayed scaled instantly to the width of the notebook.

A more general question: What is `FigureWidget()`? Is it aimed to replace the traditional way (with traces, data and iplot…) or was it mainly created to facilitate new interactivity features?

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [April 8, 2019, 12:40pm UTC](https://community.plotly.com/t/subplots-with-figurewidget/22007/2 "2019-04-08T12:40:37Z")

</div>

Hi @ursus,

You can create a `FigureWidget` with subplots using `tools.make_subplots` by passing the `Figure` produced by `make_subplots` to the `FigureWidget` constructor. For example.

```auto
...
fig = go.FigureWidget(make_subplots(...))

```

> A more general question: What is `FigureWidget()` ? Is it aimed to replace the traditional way (with traces, data and iplot…) or was it mainly created to facilitate new interactivity features?

`FigureWidget` is a custom ipywidget ([Building a Custom Widget - Email widget — Jupyter Widgets 8.1.1 documentation](https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html)) designed to take advantage of the jupyter widgets protocol to synchronize the displayed figure properties between the JavaScript display and the Python object. It doesn’t replace `Figure`, but I’d think of it as a specialized version of `Figure` that’s optimized for use in the Jupyter notebook / JupyterLab. For more background, see the 3.0 announcement post at [🌟 Introducing plotly.py 3.0.0 🌟 | by Plotly | Plotly | Medium](https://medium.com/@plotlygraphs/introducing-plotly-py-3-0-0-7bb1333f69c6). And if you’d like to learn even more, you can check out my SciPy 2018 paper at [PROC. OF THE 17th PYTHON IN SCIENCE CONF. (SCIPY 2018)](http://conference.scipy.org/proceedings/scipy2018/jon_mease.html).

-Jon

---

<div class="post-metadata">

**Author:** ![ursus](https://avatars.discourse-cdn.com/v4/letter/u/e99b99/32.png) [@ursus](https://community.plotly.com/u/ursus)\
**Post date:** [October 3, 2019, 10:32pm UTC](https://community.plotly.com/t/subplots-with-figurewidget/22007/3 "2019-10-03T22:32:09Z")

</div>

@jmmease can `FigureWidget()` be used outside of Jupyter environments?  
I’ve tried it in VS-Code but it does not show anything, so I’m wondering if that’s possible.
