LineVisible

Toggle visibility or delete plot objects by interacting with the item names displayed in a legend.

您现在正在关注此提交

Allows the user to interact with items displayed within plot legends to easily toggle visibility (left mouse-click) or delete from the axes (right mouse-click). This function uses publicly available code to toggle visibility using the ItemHitFcn callback for legend objects. However, it also utilizes undocumented MATLAB functionality to create context menus and delete unwanted items from the legend's parent axes.
Designed to work with plots generated using plot, loglog, semilogx, and semilogy, it will likely work with most other plot functions that incorporate the use of legends.
This function also work in conjuction with the DragDataTip (v4.4+) function also available on File Exchange.

引用格式

Allen (2026). LineVisible (https://ww2.mathworks.cn/matlabcentral/fileexchange/111950-linevisible), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: DragDataTip

启发作品: DragDataTipMode

一般信息

MATLAB 版本兼容性

  • 与 R2016a 及更高版本兼容

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.1.0