Make renderPlot print result if visible

Reviewed by @wch