#665 Qt terminal: Render to a file

open
None
5
2014-03-28
2014-03-20
No

This patch adds a "file" option to the Qt terminal that renders plots directly in a file (its file name is given by 'set output' ; PDF, SVG, PNG and BMP are supported), instead of renderding plots in a window. The output file is identical to the file that would be generated by using the "export" function in the plot window.

1 Attachments

Discussion

  • Ethan Merritt
    Ethan Merritt
    2014-03-28

    I wonder if it is worth making this transparent to the user when only qt support (rather than cairo or libgd) is present.

    For instance currently we have both "png" and "pngcairo", "pdf" and "pdfcairo". Most people don't have a separate pdf terminal in their build, so "set term pdf" gets you the pdfcairo terminal. If your new options were added to the terminal tables as pdfqt, pngqt, svgqt, then a gnuplot executable built without support for cairo would still handle scripts containing "set term pdf" by selecting pdfqt transparently. Similarly for png. I don't see any downside to this.

    svg is a little different since the current terminal does not require any external libraries. Furthermore the current svg terminal supports script-assisted mousing. That would be hard to duplicate via the qt path, right?