
// Script function: Create an image document

// Unless named starting with GlobalSino, EM, My, Self, the function commands are defined 
//by Gatan DM, please see at link: http://www.globalsino.com/EM/page2597.html


ImageDocument GlobalSinoDocument = CreateImageDocument( "" ) 
number EMWidth = 500
number EMHeight = 2
image EMImage := RealImage("GlobalSino Line Plot", 4, EMWidth, EMHeight )
EMImage = cos(irow*icol/20) 

// Add LinePlotImageDisplay to ImageDocument
ImageDisplay EMImageDisplay = GlobalSinoDocument.ImageDocumentAddImageDisplay( EMImage, 3 )
EMImageDisplay.LinePlotImageDisplaySetDoAutoSurvey( 0, 0 )
EMImageDisplay.LinePlotImageDisplaySetContrastLimits( -1.5, 1.5)

// Draw fill and line for slice 1
EMImageDisplay.LinePlotImageDisplaySetSliceDrawingStyle(1, 2) // ==========
// Set fill color to green
EMImageDisplay.LinePlotImageDisplaySetSliceComponentColor(0, 1, 0, 1, 0) // ========

GlobalSinoDocument.ImageDocumentShow()