.. algorithm:: .. summary:: .. relatedalgorithms:: .. properties:: Description ----------- This algorithm is to extract plottable 1-D dataset(s) with metadata from a MatrixWorkspace, serialize it into json format, and dump the result to a file. It currently only support MatrixWorkspace **Note for usage with ORNL live monitor:** The output file needs to be named :literal:`__plot_data.json` to be cataloged and plotted. Usage ----- **Example:** .. testcode:: ExSave1DPlottableJson import os, numpy as np # prepare input E = np.arange(-50, 50, 10.0) I = 1000 * np.exp(-E**2/10**2) err = I ** .5 dataws = CreateWorkspace( DataX = E, DataY = I, DataE = err, NSpec = 1, UnitX = "Energy") # output path out_json = "myplot.json" # run algorithm SavePlot1DAsJson(InputWorkspace=dataws, JsonFilename=out_json, PlotName="myplot") .. testcleanup:: ExSave1DPlottableJson os.remove(out_json) .. categories:: .. sourcelink::