Eric Wruck <[email protected]> asks about deleting a line that he has
just added using the Graph Editor,
> I've just begun fooling around with the editing/annotating
> capabilities of Stata 10's graphics editor. If I draw a line on the
> graph to demarcate a period of time, I am unable to delete it with
> either of my Mac keyboard delete keys. Instead, I have to go up to
> the menu bar, select Object & then Delete. This seems rather
> inconvenient. [...]
Eric has uncovered an inconsistency in the Graph Editor, but he will be
surprised to learn what that inconsistency is.
When using the Add Lines, Add Text, and Add Markers tools the Graph Editor
could work in one of three ways.
1) When a line is added the line could become selected and you could
then perform some edits on the line; e.g., you could use the Contextual
Toolbar or line dialog box to change its properties, or you could
delete it.
You couldn't perform all edits, such as dragging one of its end
points, because you are still using the Add Line tool, and clicking on
the graph in this tool signifies starting a new line.
2) As an alternative, adding a line could revert to using the Pointer tool
where all edits are available, but to add another line you would have
to reselect the Add Line tool.
3) When a line is added the line is NOT selected so that any changes to
the Contextual Toolbar or the the line dialog box change the properties
of the Add Line tool itself, meaning they change the appearance of all
subsequently drawn lines.
There are times when you would like behavior 1, times when you would like
behavior 2, and times when you would like behavior 3. We considered both
along with a few variations when developing the Editor. In fact, we did
testing under each of the two behaviors. In the end, we chose 3 because it
provides consistent behavior and consistent visual feedback. When something
is selected it can always be changed with the Contextual Toolbar or dialog
boxes, it can be deleted, and it can be repositioned. Selection occurs only
with the Pointer tool.
The inconsistency that Eric uncovered is that he should not have been able to
delete the newly drawn line from the Object menu while still using the Add
Line tool. Because nothing is shown as selected on the graph, you have to
guess that the newly drawn line is what will be deleted.
When you are adding lines all edits affect the Add Line tool itself. The same
is true for adding text or markers. To edit an added line, select the Pointer
tool. All edits then affect the selected object, including pressing the
Delete key.
-- Vince
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/