Tool: 2D Labels and Arrows
2D Labels and Arrows is a graphical interface for adding text labels
and straight arrows to the display for presentation-quality images and movies.
The command-line implementation is
2dlabels.
These 2D labels exist in the X,Y plane of the screen and do not move
along with the 3D scene, but can be repositioned by dragging
(at either end, if an arrow) with:
- the Use mouse... setting in the 2D Labels and Arrows dialog
- the move label
mouse mode
.
For “3D” labels that move along with the associated atoms,
see the label command.
The move label
mouse mode
works for both 2D labels and 3D labels.
Dragging a 2D label echoes the corresponding command with X and Y positions
to the Log, which may be useful
for scripting.
2D labels are models that can be acted on by general commands such as
close,
show/hide, and
color.
They are saved in scenes and
sessions.
To fade 2D labels in/out or reposition them gradually over a specified
number of frames, see the
2dlabels command.
See also:
Scenes,
Color Key,
Scale Bar,
making images,
making movies
2D Labels and Arrows can be started from the Depiction
section of the Tools menu and manipulated like other panels
(more...).
With the tool dialog shown and the Use mouse... option activated:
- clicking in the graphics window creates a 2D Label with
the specified settings:
- Text – label contents, initially “New label,”
overwritten by entering different text
- Size (default 24)
- Color – label color, default white or black
depending on the color of the label background,
or if there is no label background, depending on the color of
the window background.
Further, explicitly setting the color to white when the background
is dark or black when the background is light actually sets it to
the default behavior of adjusting black ↔ white as needed if
the background color is subsequently changed.
- Font (default Arial)
- Style – whether normal (default),
bold, italic, or bold italic
- Background – whether to draw a rectangular background
behind the text of the label, and if so, in what color
(default off and black)
- clicking and dragging creates a 2D Arrow with
the specified settings:
- Color – arrow color, default white or black
depending on the color of the
window background.
Further, explicitly setting the color to white when the background
is dark or black when the background is light actually sets it to
the default behavior of adjusting black ↔ white as needed if
the background color is subsequently changed.
- Weight – a scale factor
for the overall thickness of the arrow (default 1.0)
- Style – whether arrowhead style should be solid
(default), blocky, pointy, or pointer
- click-dragging a pre-existing 2D label or either end of a pre-existing
2D arrow repositions it
Creating a 2D Label or Arrow adds its model number to the
pulldown menu of choices. The settings of any existing 2D label or arrow
can be changed by choosing its model number and adjusting the options in
the dialog. If all is chosen rather than a specific model number:
- changes in label settings other than Text will apply to all
2D labels
- changes in arrow settings will apply to all 2D arrows
Buttons:
- Delete label – delete the currently chosen 2D label model
(does not apply to all)
- Delete arrow – delete the currently chosen 2D arrow model
(does not apply to all)
- Help – show this page in the
Help Viewer
UCSF Resource for Biocomputing, Visualization, and Informatics /
October 2025