FigureBase.saveToFile

Saves this figure to a file. The file type can be one of either the raster formats .png, .jpg, .tiff, and .bmp, or the vector formats .pdf, .svg and .eps. The width and height parameters allow you to specify explicit width and height parameters for the image file. If width and height are left at their default values of 0, the default width and height of the subclass being saved will be used.

  1. void saveToFile(string filename, string type, double width = 0, double height = 0)
    class FigureBase
    void
    saveToFile
    (
    string filename
    ,
    string type
    ,
    double width = 0
    ,
    double height = 0
    )
  2. void saveToFile(string filename, double width = 0, double height = 0)

Bugs

.jpg, .tiff and .bmp formats rely on Pixmap objects, meaning you can't save them to a file unless you have a screen and have called Main.init(), even though saving should have nothing to do with X or screens.

Meta