Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Represent an expression in an unevaluated form with a callout annotation
ResourceFunction["AnnotatedExpression"][expr,annotation] displays expr annotated with annotation below expr. | |
ResourceFunction["AnnotatedExpression"][expr,annotation,pos] displays expr with annotation in the position specified by pos. |
CalloutStyle | Directive[LightGray,Thin] | style used for strokes of the callout |
ImageSize | Automatic | the overall image size of the annotation expression displayed in the callout |
ImageSizeAction | "ShrinkToFit" | action to take if the annotation size does not match the image size |
ItemSize | 15 | width of the callout |
LeaderSize | 1 | length to use for the callout leader |
NeckSize | 1 | length to use for the callout neck |
Create a simple annotated expression:
In[1]:= | ![]() |
Out[1]= | ![]() |
Copy it and evaluate:
In[2]:= | ![]() |
Out[2]= | ![]() |
AnnotatedExpression returns an annotated version of the input without evaluating it:
In[3]:= | ![]() |
Out[3]= | ![]() |
Copying the output expression to an input cell results in each evaluation producing a new set of pseudo random numbers:
In[4]:= | ![]() |
Out[4]= | ![]() |
The annotation can be placed Above or Below the expression:
In[5]:= | ![]() |
Out[5]= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Copy the previous result and use it like the Entity it represents:
In[7]:= | ![]() |
Out[7]= | ![]() |
Annotate an expression with information about itself:
In[8]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
Annotate with a visual summary of the expression:
In[10]:= | ![]() |
Out[10]= | ![]() |
In[11]:= | ![]() |
Out[11]= | ![]() |
Annotate with a visualization of the expression:
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
Supply a graphics directive:
In[14]:= | ![]() |
Out[14]= | ![]() |
Combine multiple graphics directives with Directive:
In[15]:= | ![]() |
Out[15]= | ![]() |
Specify the image size of the annotation:
In[16]:= | ![]() |
Out[16]= | ![]() |
Use the "NeckSize" option to set the neck height of the annotation callout:
In[20]:= | ![]() |
Out[20]= | ![]() |
Several warning messages are generated when using a dynamic expression containing InputField:
In[21]:= | ![]() |
Out[21]= | ![]() |
The messages are issued when the expression is evaluated:
In[22]:= | ![]() |
Out[22]= | ![]() |
Use Quiet to suppress these messages:
In[23]:= | ![]() |
Out[23]= | ![]() |
Create a dynamic annotation to view the RulePlot of CellularAutomaton inline before evaluating the simulation:
In[24]:= | ![]() |
Out[24]= | ![]() |
Update the rule and press the key to update the RulePlot annotation before plotting:
In[25]:= | ![]() |
Out[25]= | ![]() |
Create dynamic annotations to view graphics primitives inline before evaluating the plot:
In[26]:= | ![]() |
Out[26]= | ![]() |
In[27]:= | ![]() |
Out[27]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License