Output anchors are used to add artifacts generated by your code during runtime to your Archive. We provide a broad range of output types to visualize your code artifacts of all forms, including but not limited to tables, text, images, graphs, and 3D models. These can be used to showcase input datasets, intermediate values, and final results.
You can create outputs in single-line using the following syntax:
# @output output_type data=output_variable
For example, here we create a table output which displays the numpy array x as a table
x = np.array([1,2,3]) # @output table data=x
Below, you can find a preview of all of the different types of outputs that you can generate with the output anchor.
Below, you can find detailed documentation on all of the different types of outputs available to visualize variables in your code.
This displays your variable as in string form as text.
text = 'Text Output' # @output heading data=text
This displays your variable as a table. This supports dictionaries, lists, and 1D/2D numpy arrays.
x = np.array([[1,2,3],[4,5,6]]) # @output table data=x
This plots and displays your Matplotlib figure as a static image.
fig = plt.figure() x = np.array([1,2,3,4,5,6]) y = np.array([1,2,3,4,5,6]) plt.scatter(x, y) # @output graph data=fig
This renders your 3D GLB file in an interactive 3D environment.
# @output model data="./rover.glb"
Updated about 2 months ago