/** * Define a data legend in the graph window * * @param x data position of the legend. * @param y data position of the legend. * @param text text to display in the legend */ public void legend(double x, double y, String text) { if (text == null) { legend_text = null; return; } if (legend_text == null) legend_text = new TextLine(text); else legend_text.setText(text); legend_text.setJustification(TextLine.LEFT); legend_dx = x; legend_dy = y; legend_ix = 0; legend_iy = 0; }