SimplePlot.mult constructor

SimplePlot.mult(List<Float64List> arrays, List<Map<PyA, String>> plotAttr, Map<AxA, String> xaxisAttr, Map<AxA, String> yaxisAttr, Map<LegA, String> legendAttr, List<String> poly_colors, PlotLayoutSVG pl, int plotnum)

Plots arrays as polylines (curves), along with coordinate axes, a coordinate grid and legend text. plotDiv - the html DivElement that will contain the plot. plotAttr - plot attributes controlling the appearance and layout of the polylines. If null, internal defaults are used. xaxisAttr - x axis attributes controlling the appearance and layout of the x (horizontal) coordinate axis. If null, internal defaults are used. yaxisAttr - y axis attributes controlling the appearance and layout of the y (vertical) coordinate axis. If null, internal defaults are used. legendAttr - attributes controlling the appearance and layout of the text legend. If null, internal defaults are used. poly_colors - these are the color in which arrays get displayed. This list may be bigger than the list a arrays, but not smaller. If null, internal default colors are used. pl - the containers where the graphics is to be drawn See the example provided with this package how simple is it is to generate the plot. NOTE 1: Displaying more than a single array only makes sense if the value ranges in the different arrays are commensurable, otherwise a simultaneous plot is not meaningful. NOTE 2: The sizes of the arrays may be different. The width of the plot is computed from plotDiv.

Implementation

SimplePlot.mult(
    this.arrays,
    this.plotAttr,
    this.xaxisAttr,
    this.yaxisAttr,
    this.legendAttr,
    this.poly_colors,
    this.pl,
    this.plotnum) {
  createPolylines();

  // Compute x and y axis for the first polyline
  createAxes(polylines[0]);

  legend = createLegend(legendAttr, poly_colors);

  // append  polylines to the "data area" of the layout
  for (int i = 0; i < arrays.length; i++) {
    pl.dataAreas[plotnum].append(polylines[i].polylineContainer);
  }

  if (legendAttr != null) {
    // append  the legend to the "data area" of the layout
    pl.dataAreas[plotnum].append(legend.legendContainer);
  }

  // append x axis, y axis and axes grid to the "plot area"  of the layout
  pl.plotAreas[plotnum].append(xaxis.labelsContainer);
  pl.plotAreas[plotnum].append(yaxis.labelsContainer);
  pl.plotAreas[plotnum].append(xaxis.xyGrid.gridContainer);
  pl.plotAreas[plotnum].append(yaxis.xyGrid.gridContainer);
}