# Announcing fplotlib: Pure Fortran Plotting, Animations, TeX Math, and Scientific Reports

> Source: <https://fortran-lang.discourse.group/t/announcing-fplotlib-pure-fortran-plotting-animations-tex-math-and-scientific-reports/11339?page=2#post_23>
> Published: 2026-11-27 09:09:55+00:00

**Key takeaway:** fplotlib ships as an fpm dependency that renders plots, animations and LaTeX-style math in pure Fortran, and a Mistral AI Code prompt combining it with gtk-fortran produced a GTK4 window plotting the Weierstrass function (a=0.5, b=3) over [-5, +5].

Beautiful!

A short prompt in Mistral AI Code:

```
Create a Fortran project using two fpm (Fortran Package Manager) dependencies:
https://github.com/fortran-lang/fplotlib/
https://github.com/vmagnin/gtk-fortran/

The program will plot the Weierstrass function (with a=0.5 and b=3) in the [-5 ; +5] range using fplotlib:
https://en.wikipedia.org/wiki/Weierstrass_function_(nowhere-differentiable_function)

It will display that plot in a GTK4 window.
```

The result:

@vmagnin tell your AI to format the math correctly in the plot title, axes and legend using $$ and latex syntax. It will look beautiful!
