double textWidth = text.getLayoutBounds().getWidth();
double textHeight = text.getLayoutBounds().getHeight();
double rectWidth = textWidth + 20;
Rectangle rect = new Rectangle(x, y, rectWidth, RECT_HEIGHT);
rect.setArcWidth(16);
rect.setArcHeight(16);
text.setX(x + (rectWidth / 2 - textWidth / 2));
// text plot from bottom left
text.setY(y + RECT_HEIGHT - STROKE_WIDTH - (RECT_HEIGHT - textHeight) / 2);
text.setFill(getColorForInlining(inlined));
rect.setStroke(Color.BLACK);
rect.setStrokeWidth(STROKE_WIDTH);
rect.setFill(getColourForCompilation(compiled));
pane.getChildren().add(rect);
pane.getChildren().add(text);
PlotNode result = new PlotNode();