Draggable Data Tips
Jiro‘s pick this week is DragDataTip by Allen.
Here’s a simple, but quite useful utility to use in conjunction with MATLAB’s data tips. It customizes the data tips so that you can drag the labels to any location for better visibility.
The entry requires you to also download and install draggable by Francois Bouffard. It is also worth noting that Allen’s entry was inspired by an earlier entry, Draggable data tips, by the famous Yair Altman. (Note that Yair’s entry does not run on R2014b or newer.)
Here’s an example of Allen’s entry in action.
hFig = figure; hLin = plot(peaks); grid on title('Draggable Data Tips') xlabel('Data Index Values') ylabel('Acceleration (g''s)') hFig.KeyPressFcn = {@DragDataTip,gca};
Then create some data tips using the built-in feature. Once you’re done (and turned off the datacursor mode), press Ctrl-M. This converts the standard data tips to Drag Data Tips. Then you can move the data tips to any location.
See this in action.
You can find other examples in the help of DragDataTip.
help DragDataTip
Comments
Give it a try and let us know what you think here or leave a comment for Allen.
- 범주:
- Picks
댓글
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.