This is an example of a scatterplot in which the data themselves exist in Perl-generated arrays. The trick is to translate the Perl representation of the array data into a format that conforms to the display jquery/flot wants to use. We do so with a loop that designed to extract the array data in Perl and 'format' it in a way that dumps it into the javascript code being sent to the user's browswer.