Graph equivalent of "Open RBG image window ->Export view as image"

You can try to use the pconvert tool. Type pconvert -h to get some help about the tool.

For python you can find some examples in the forum which might help you to write your own script.

RGB image/geotiff python - development / python - STEP Forum (esa.int)