/** * Draw the vectors at the data points. If this data has been attached to an Axis then scale the * data based on the axis maximum/minimum otherwise scale using the data's maximum/minimum * * @param g Graphics state * @param bounds The data window to draw into */ public void draw_data(Graphics g, Rectangle bounds) { Color c; if (xaxis != null) { xmax = xaxis.maximum; xmin = xaxis.minimum; } if (yaxis != null) { ymax = yaxis.maximum; ymin = yaxis.minimum; } xrange = xmax - xmin; yrange = ymax - ymin; /* ** draw the legend before we clip the data window */ draw_legend(g, bounds); /* ** Clip the data window */ if (clipping) g.clipRect(bounds.x, bounds.y, bounds.width, bounds.height); c = g.getColor(); if (linecolor != null) g.setColor(linecolor); else g.setColor(c); drawVectors(g, bounds); g.setColor(c); }