Ascii art plotting in Fortran

I would like to have a library like Julia has for ascii art plotting and I would like to be able to do this in Fortran:

There is a whole animation on the link above, but one still image looks like this:

The original plot from 1973 is done in F66 I assume:

I don’t have time to do this myself, but if anyone is looking for a project, this would be very useful!


@certik , I have found that Fortran small library (160 lines):

The code is a the bottom of the page (text_viz.f90.gz). I have not tested it and don’t know if you can make an animation (but probably).

This is the header of the module:

! small module to do text mode graphics using ANSI terminal escape sequences
! Copyright (c) 2013 Axel Kohlmeyer
! v0.1 2013-06-22, initial public version
! v0.2 2013-06-24, better autoscale and overflow protection

MODULE text_viz


Clever, it just normalizes the value and chooses a proper character for it from

  CHARACTER, PARAMETER :: plot(0:maxplot) = (/ &
      ' ', '.', ',', ':', '=', '+', 'o', 'x', 'X', '#', '@' /)

There’s a copy of the paper available at

The calculations were done on a CDC 6400, but there is no mention of the programming language (the paper does say the computer program is available from the author).


It was most probably Fortran 66 (Fortran IV with some extensions). The CDC 6000 series were excellent computers for obtaining numerical solutions of physical problems. Some of the CDC installations had, in addition, the student oriented MNF computer, which was faster to compile, and gave better diagnostic messages. Users typically developed and debugged their programs using MNF first, and then switched to the CDC Fortran compilers (RUN, FUN and FTN) for faster execution.

The assembly language was COMPASS. (Note the peculiar dedication note in page 3 of the manual. Address registers A6 and A7 were used for writing the contents of registers into central memory. Setting an address into A6 caused the contents of register X6 to be stored into that address.)

Some of the CDC 6000 series computers had Wirth’s Pascal compiler. Some even had an Algol compiler. Unfortunately, Algol programs ran extremely slowly compared to the corresponding Fortran programs.

1 Like

Something like this will be super useful:

For publication ready figures, we can use Matlab, etc. Having a Unicode plot package in Fortran will be fantastic.



“Lawrence Berkeley Laboratory Annual Report (1976)”


1 Like

ANSI Art and ASCII Art: The world around us - Text Art Animation - ASCII Art - YouTube

1 Like