capture.plot function

Capture the current R plot device as a cimg image