# PlotGrids and GridFunctions in Google Colab

**URL:** https://bempp.discourse.group/t/plotgrids-and-gridfunctions-in-google-colab/167
**Category:** Bempp
**Created:** [8 January 2023 08:40 UTC](https://bempp.discourse.group/t/plotgrids-and-gridfunctions-in-google-colab/167 "2023-01-08T08:40:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![marc.jofre](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@marc.jofre](https://bempp.discourse.group/u/marc.jofre)
#### Post date: [8 January 2023 08:40 UTC](https://bempp.discourse.group/t/plotgrids-and-gridfunctions-in-google-colab/167/1 "2023-01-08T08:40:47Z")

</div>

Hi,

I could not plot grids in Google Colab. I amanaged to show them with the below code:

```auto
def Bempp_configure_plotly_browser_state():
    import IPython
    display(IPython.core.display.HTML('''
          <script src="/static/components/requirejs/require.js"></script>
          <script>
            requirejs.config({
              paths: {
                base: '/static/base',
                plotly: 'https://cdn.plot.ly/plotly-1.5.1.min.js?noext',
              },
            });
          </script>
          '''))
    bempp.api.PLOT_BACKEND = "jupyter_notebook"
    plotly.io.renderers.default = 'colab'

```

Then, before plotting insert the following lines:

```auto
Bempp_configure_plotly_browser_state()
grid.plot()

```

---

<div class="post-metadata">

### Author: ![timo](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/timo/32/7_2.png) [@timo](https://bempp.discourse.group/u/timo)
#### Post date: [24 January 2023 18:22 UTC](https://bempp.discourse.group/t/plotgrids-and-gridfunctions-in-google-colab/167/2 "2023-01-24T18:22:36Z")

</div>

Apologies. I overlooked this message. Thanks for this code snippet!
