# Scientists are using artificial intelligence and large language models to rewrite old code in modern languages

> Source: <https://fortran-lang.discourse.group/t/scientists-are-using-artificial-intelligence-and-large-language-models-to-rewrite-old-code-in-modern-languages/9598?page=6#post_106>
> Published: 2026-08-31 04:49:46+00:00

Beautiful. I can see you are using your own [pyplot-fortran](https://github.com/jacobwilliams/pyplot-fortran), which is constructing a Python string and evaluating it in Python (right?).

I figured, let’s translate Matplotlib to Fortran, to be more consistent with this thread:

It is 100% pure Fortran, the usual pyplot-style API, and it has svg, png, pdf (and even gif!) backends, the backends are all in pure Fortran, they generate the svg text, or png/pdf/gif binary. I embed the glyphs of a font directly into Fortran sources, support latex-style math rendering, etc.

I needed something to use in the JupyterLite notebooks that LFortran now supports, so since it runs in the browser and must be fast, I needed to generate svg/png directly in pure Fortran.

Anyway, it was super easy to do this thanks to AI, so I think we can now have the full ecosystem from plotting, file formats everything in pure Fortran.
