# Matplotlib in a fortran jupyter notebook

**URL:** <https://fortran-lang.discourse.group/t/matplotlib-in-a-fortran-jupyter-notebook/4285>\
**Category:** Uncategorized\
**Created:** [September 8, 2022, 9:40am UTC](https://fortran-lang.discourse.group/t/matplotlib-in-a-fortran-jupyter-notebook/4285 "2022-09-08T09:40:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveen](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@praveen](https://fortran-lang.discourse.group/u/praveen)\
**Post date:** [September 8, 2022, 9:40am UTC](https://fortran-lang.discourse.group/t/matplotlib-in-a-fortran-jupyter-notebook/4285/1 "2022-09-08T09:40:55Z")

</div>

If I have a fortran notebook that generates some result, and I want to make a figure using that, it would be nice to use matplotlib. Is this possible ? If not what other ways are there ?

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [September 8, 2022, 9:55am UTC](https://fortran-lang.discourse.group/t/matplotlib-in-a-fortran-jupyter-notebook/4285/2 "2022-09-08T09:55:10Z")

</div>

Welcome to our Discourse @praveen! Could you clarify what you mean by “Fortran jupyter notebook”?

Are you using lfortran’s jupyter functionality or are you using Jupyter notebooks calling to Fortran in some other way?

---

<div class="post-metadata">

**Author:** ![praveen](https://avatars.discourse-cdn.com/v4/letter/p/3ec8ea/32.png) [@praveen](https://fortran-lang.discourse.group/u/praveen)\
**Post date:** [September 8, 2022, 10:09am UTC](https://fortran-lang.discourse.group/t/matplotlib-in-a-fortran-jupyter-notebook/4285/3 "2022-09-08T10:09:06Z")

</div>

I installed lfortran using conda and then created a jupyter notebook by selecting New → Fortran.

If I now generate some data, I am not able to plot it using matplotlib in the same notebook.

Is there a way to compute with fortran code and analyze/plot with python/matplotlib in the same notebook ?

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [September 8, 2022, 10:12am UTC](https://fortran-lang.discourse.group/t/matplotlib-in-a-fortran-jupyter-notebook/4285/4 "2022-09-08T10:12:15Z")

</div>

This repo [GitHub - jacobwilliams/pyplot-fortran: For generating plots from Fortran using Python's matplotlib.pyplot 📈](https://github.com/jacobwilliams/pyplot-fortran) should do it but I’m not sure if you’ll be able to use modules. Last time I checked, which was a while back, lfortran jupyter had not implemented that feature yet.
