Evolution of Network/SOM/Scatterplot in R

I am relatively new to data visualisation using R. However, I would like to use R to provide a visual demonstration of how a self-organising map (SOM) learns.

I wondered if someone could help with how to reproduce this types of examples in R, or direct me to reproducible code?

Any help would be greatly appreciated. Just even simple pointers on packages, and arguments within certain packages.