필터 지우기
필터 지우기

Figure editing shortcut missing

조회 수: 8 (최근 30일)
Jacqueline
Jacqueline 2019년 5월 16일
댓글: Rik 2020년 10월 20일
I recently installed 2018b and the plot tools are very different. There used to be an icon on the very right of the toolbar that I could press to open figure palette, plot browser, and property editor. Now I have to click view > figure palette, then view > plot browser, then view > property editor. Is there an easy way to open all of these at the same time?
Screen Shot 2019-05-16 at 1.25.57 PM.png

채택된 답변

Rik
Rik 2019년 5월 16일
편집: Rik 2019년 5월 17일
Edit:
You can open the plot tools with the plottools function. You can probably add this as a custom button, but otherwise the code below should work.
hFig=figure;
plottools(hFig)
%or put this in your startup.m (untested, might need modification)
%make sure add_plottools_button is on your Matlab path
try %#ok
if ~verLessThan('matlab','9.5')
set(groot,'defaultFigureCreateFcn',...
@(fig,~)add_plottools_button(fig));
end
end
function add_plottools_button(fig)
persistent icon
if isempty(icon)
% Read an image
img = imread(fullfile(matlabroot,...
'toolbox','matlab','icons','tool_plottools_show.png'));
icon = double(img)/double(uint16( inf));
end
t = findall(fig,'type','uitoolbar','tag','FigureToolBar');
if isempty(t)
%no toolbar exists, create one
t = uitoolbar('Parent',fig);
end
% Create a uipushtool in the toolbar
uipushtool(t,'TooltipString','Open plot tools',...
'ClickedCallback',...
@(obj,~)plottools(ancestor(obj,'figure')),...
'CData',icon)
end
Original answer:
You probably mean the controls that you can add back to your figure with addToolbarExplorationButtons.
Alternatively, you could add the code below to your startup.m to reverse the change by default.
try %#ok
if ~verLessThan('matlab','9.5')
set(groot,'defaultFigureCreateFcn',...
@(fig,~)addToolbarExplorationButtons(fig));
set(groot,'defaultAxesCreateFcn', ...
@(ax,~)set(ax.Toolbar,'Visible','off'));
end
end
  댓글 수: 5
Rik
Rik 2019년 5월 17일
See my adapted answer. And if you are wondering: in my copy of R2019a the tool_plottools_show.png file can be found in that folder, so that should keep working, at least for some time. Props to undocumented Matlab for suggesting findall to get the handle to the default uitoolbar object.
Jacqueline
Jacqueline 2019년 5월 19일
Excellent! Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jeffrey Gruneich
Jeffrey Gruneich 2020년 10월 20일
What a joke!
  댓글 수: 1
Rik
Rik 2020년 10월 20일
To one person this is cleaning up the UI, to another it is removing a useful tool. For the second category my answer should work to put it back.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by