encapsulating plot render to let it be a widget on the screen