Output Anchor


The second category of decorators is output anchors. These occur in the format @output type. Output anchors can be placed above variables to generate textual or visual representations of the variable.

Many output anchors can be provided named arguments to customize the anchor. These occur after the output decorator in the format arg1=value1

Artemis provides a number of default types for the @output anchor, but we also allow people to build custom outputs.

Default Output Types




@output heading

Textual representation of a variable

@output heading data=a

@output table

Table representation of a variable

arr = np.array([[1,2],[3,4],[5,6]])

@output table data=arr

@output line-graph

Line graph using a variable's data

arr = np.array([[1,2],[3,4],[5,6]])

@output line-graph data=arr

@output scatter-graph

Scatter graph using a variable's data

arr = np.array([[1,2],[3,4],[5,6]])

@output scatter-graph data=arr

@output graph

Graph from a matplotlib figure

fig = plt.figure()

@output graph data=fig

@output model

Interactive rendering of a GLB 3D model

@card title="3D Model"

@output model data="./rover.glb"


Example 1: Here is a basic example of using an output decorator to display a numpy array as a table:

arr = np.array([[1,2,3],[4,5,6],[7,8,9]])
# @output table data=arr

When this card appears, the program will pause until the Continue button is pressed.

Custom Output Types

Artemis allows you to create Custom Outputs anchors to display or visualize variables in custom ways. For example, if you want to use the output anchor to display a variable in the form of a specialized graph not offered by Artemis, you can create your own custom output anchor to accomplish this.

Did this page help you?