\(\renewcommand\AA{\unicode{x212B}}\)
StringToPng v1¶
Summary¶
Creates an image file containing a string.
See Also¶
Properties¶
Name |
Direction |
Type |
Default |
Description |
---|---|---|---|---|
String |
Input |
string |
Mandatory |
String to plot |
OutputFilename |
Input |
string |
Mandatory |
Name of the image file to savefile. Allowed values: [‘png’] |
Description¶
Saves a string as a png file, as part of autoreduction.
Note
Requires matplotlib.
Usage¶
#write to a file
try:
import mantid
filename=mantid.config.getString("defaultsave.directory")+"StringToPngTest.png"
StringToPng("This is a string\nAnd this is a second line",OutputFilename=filename)
except:
pass
Output:
The file should look like
Categories: AlgorithmIndex | DataHandling\Plots
Source¶
Python: StringToPng.py