I want a minimal example of plotting data using pure Julia code

I do not want to know how using Gadfly I can plot a line. From a programming point of view I want to know how Gadfly using pure Julia can plot a line. I do not have a background in computer science and I am just curious to know what tools Julia provides that allows someone to make a plotting library such as Gadfly.