score:3

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')
               .data(data)
               .enter().append('g')
               .attr('class','graph');

graph.append('path')
     .attr('d',function(dat,i){
         // 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