CreateImageChartItem Method (Python)
Returns an SpssOutputItem
object
for a new chart item associated with an external image. This allows
you to insert an external image of type png, jpg, or gif into an output document. To insert the chart item
into the output document, use the InsertChildItem method
in the SpssHeaderItem
class.
Syntax
SpssOutputItem=SpssOutputDoc.CreateImageChartItem(fileName,label)
Parameters
fileName. Full path to the image file.
label. A string specifying the label for the chart item. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.
On Windows, it is recommended to use raw strings for file paths, or replace backslashes with forward slashes (IBM® SPSS® Statistics accepts a forward slash for any backslash in a file specification). Raw strings are specified by prefacing the string with r, as in r'c:\examples\mydata.sav'. In raw mode, Python treats all backslashes in the string as the backslash character and not as the start of an escape sequence.