\(\renewcommand\AA{\unicode{x212B}}\)
StringToPng v1¶
![../_images/StringToPng-v1_dlg.png](../_images/StringToPng-v1_dlg.png)
StringToPng dialog.¶
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
![StringToPngTest.png](../_images/StringToPngTest.png)
Categories: AlgorithmIndex | DataHandling\Plots
Source¶
Python: StringToPng.py