I am using a third-parter utility named gnuplot-iostream to invoke gnuplot from C++ in the back-end of a web application. That web application is executed under CGI, so anything that goes to STDOUT is the result to browser. In this case, the web request will be for the image itself, so the output will be preceded by some HTTP headers including a Content-Type of image/png.
Instead of having gnuplot write to a temporary file, then read that file back into memory and stream its contents to STDOUT, I'd like to be able to directly pipe GNUPlot's output through STDOUT, but I cannot see a way to ask gnuplot to do anything other than write to an image file on disk, or to open an X11 window.
Is this possible?