Exporting a figure in Igor Pro
SavePICT writes what is on screen; the flags decide the format and the resolution.
Function ExportFigure(String windowName)
if (!WinType(windowName))
Print "no window called", windowName
return -1
endif
SavePICT/O/WIN=$windowName/E=-2/B=300 as windowName + ".png"
SavePICT/O/WIN=$windowName/E=-8 as windowName + ".svg"
return 0
End
How it works
/E=-2is PNG,-8is SVG,-3is EPS./B=sets the resolution in dpi, which matters for a raster format./Ooverwrites and/P=names an Igor symbolic path.
Keywords and builtins used here
EndFunctionPrintSavePICTStringWinTypeendififreturn
The run, in numbers
- Lines
- 11
- Characters to type
- 250
- Tokens
- 52
- Three-star pace
- 90 tpm
At the three-star pace of 90 tokens a minute, this run takes about 35 seconds.
Step 2 of 3 in Off the screen, step 17 of 19 in Graphs & presentation.