Accepted answer

Not sure if this answers your question completely but can you combine the three 2D arrays into a single array and then pass that array into your plotting function? E.g. something like this:

var data = [data1,data2,data3];
var graph = svg.append('g').selectAll('graph')

         // dat in this case will correspond to the data for
         // for a single curve.
         // This will return the path for
         // graphing a single curve.    

Related Query

More Query from same tag