Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 MATLAB 图中固定图例的位置?
我目前正在构建一个供公众使用的 GUI,当生成 GUI 内的图形时,我不希望用户能够通过单击和拖动来移动图例。任何人?
您必须从图例中删除 buttonDownFcn 。
片段:
line(rand(1,3),rand(1,3)) l=legend('location','ne') set(l,'ButtonDownFcn',[])