Plot.SaveToFile

Prototypes

void SaveToFile( String sPathName <, int nWidth, int nHeight> )

Parameters

String sPathName
The path and filename of the graphics file you want to create. The filename extension of sPathName determines the format of the graphics file. See Remarks for further details.

int nWidth
The desired width of the image in pixels. This parameter must be less than 32768. See Remarks for further details.

int nHeight
The desired height of the image in pixels. This parameter must be less than 32768. See Remarks for further details.

Remarks

This method saves a static image of the plot in a graphics file. The format of the graphics file is determined by the filename extension of the sPathName parameter. Refer to the topic Graphics File Formats for information about the graphics file formats that IML Studio supports.

Calling this method without specifying the nWidth and nHeight parameters is equivalent to calling it with nWidth and nHeight equal to -1.

If nWidth and nHeight are both greater than or equal to one, the dimensions of the stored image are nWidth pixels wide by nHeight pixels tall. If either nWidth or nHeight is less than one, the dimensions of the stored image are the same as those of the plot as shown on the screen.

Example
x = 1:5;
y = x;
declare ScatterPlot plot;
plot = ScatterPlot.Create( "Example", x, y );
run GetPersonalFilesDirectory( pathname );
pathname = pathname + "ScatterPlot.BMP";
plot.SaveToFile( pathname, 800, 533 );
See Also

Plot.CopyToOutputDocument