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.
我正在显示 3D 散点图,但 z 轴上的标签与颜色条重叠。如何将彩条向右或向左移动所需的像素数?
您可以使用findobj获取颜色条的句柄,通过查询其当前位置get,然后根据您的需要进行修改并使用以下方法进行更改set:
findobj
get
set
h = findobj('tag', 'Colorbar'); pos = get(h, 'position') % modify pos according to your needs set(h, 'position', pos)