Rectangle2D tbounds = t2.createTransformedShape(plotBounds).getBounds2D();
BufferedImage img = new BufferedImage((int)tbounds.getWidth()+2, (int)tbounds.getHeight()+2, BufferedImage.TYPE_INT_ARGB);
Graphics2D g = (Graphics2D)img.getGraphics();
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
plot.paint(g, t2);
TransferableImage ti = new TransferableImage(img);
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
c.setContents( ti, null );
System.out.println("An image of plot has been copied to the clipboard.");