public void plot(AbstractDrawer draw) {
if (!visible) return;
TeXFormula formula = new TeXFormula(label);
TeXIcon icon = formula.createTeXIcon(TeXConstants.STYLE_DISPLAY, size);
icon.setTeXIconColor(plotColor);
//icon.setInsets(new Insets(5, 5, 5, 5));
Graphics2D g2 = draw.getGraphics();
g2.setColor(plotColor);
JLabel jl = new JLabel();
jl.setForeground(plotColor); // GlobalValues.defaultFormulaColor);
if (useLogical == false) // do not use logical coordinates
icon.paintIcon(jl, g2, coordx, coordy);
else // use logical coordinates to place the formula
{
double [] logicalCoords = { logicalx, logicaly};
int [] screenCoords = draw.project(logicalCoords[0], logicalCoords[1]);
icon.paintIcon(jl, g2, screenCoords[0], screenCoords[1]);
}
}