# O que seria necessário para colocar uma figura Matplotlib ao vivo em uma postagem?

**URL:** https://meta.discourse.org/t/what-would-it-take-to-put-a-live-matplotlib-figure-in-a-post/327939
**Category:** Development
**Created:** [24 Setembro , 2024 15:33 UTC](https://meta.discourse.org/t/what-would-it-take-to-put-a-live-matplotlib-figure-in-a-post/327939 "2024-09-24T15:33:59Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [24 Setembro , 2024 17:11 UTC](https://meta.discourse.org/t/what-would-it-take-to-put-a-live-matplotlib-figure-in-a-post/327939/4 "2024-09-24T17:11:13Z")

</div>

Oh! Eu entendi completamente errado como o HTML seria gerado. Se o usuário estiver pré-gerando o HTML, você poderia fazê-lo em iframe de um site externo, com o domínio na lista de permissões.

> [@Supporting iframe embeds from different domains?](https://meta.discourse.org/t/supporting-iframe-embeds-from-different-domains/30930/61?u=alteras):
>
> iframes can now be whitelisted through the allowed iframes Site Setting.

Por exemplo, codepen, que deve ser permitido por padrão:

```html
<iframe height="300" width="800" style="width: 100%;" scrolling="no" title="mplD3 example, actually working" src="https://codepen.io/gully/embed/BawMGr?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
  See the Pen <a href="https://codepen.io/gully/pen/BawMGr">
  mplD3 example, actually working</a> by gully (<a href="https://codepen.io/gully">@gully</a>)
  on <a href="https://codepen.io">CodePen</a>.
</iframe>

```

```html
<iframe height="300" width="800" style="width: 100%;" scrolling="no" title="mplD3 example, actually working" src="https://codepen.io/gully/embed/BawMGr?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
  See the Pen <a href="https://codepen.io/gully/pen/BawMGr">
  mplD3 example, actually working</a> by gully (<a href="https://codepen.io/gully">@gully</a>)
  on <a href="https://codepen.io">CodePen</a>.
</iframe>

```

---

_[View the full topic](https://meta.discourse.org/t/what-would-it-take-to-put-a-live-matplotlib-figure-in-a-post/327939)._
