Customizing the Matlab figure appearance in Release 2018b - How to bring back plot browser icon, zoom icon etc.?

8 visualizzazioni (ultimi 30 giorni)
Hi,
in my workflow, I need the plot browser very often. Mainly, to easily enable und disable visibility of single/multiple plots while exploring my data. Having to go first to the 'view' menu and then to look for the 'plot browser' needs more clicks and considerably more time than it was with the plot browser icon in the preveaous releases of Matlab. That is very annoying.
The same applies to the toolbar for the zoom icon, datapoints icon etc. Since Release 2018b I have to wait for the fading in animation of the toolbar icons. This is very annoying and slows me down (e.g. when I just need the zoom-tool to enable the zoomfunction that is restricted only to x- or y- axes).
I know, there are some tricky hacks using the 'startup.m' file to customize some appearances of the matlab figure toolbar. This workaround does not always work and maybe needs the knowledge of a mathworks developer. I don't have that knowledge. I would be thankful, if mathworks would provide a patch/update that allows users to easily customize the matlab figure toolbars, icons, etc. like it is in other programms, for example in 'MS Visual Studio'.
Customziablitity would be great, but for now, does anybody knows how to bring back the plot browser icon?
  2 Commenti
Johann
Johann il 10 Mag 2019
This solution helped me to get back to the good old exploration toolbar and plot tools icons in Releases 2018b and 2019a.
Matlab2019a_Figure_Icons.JPG
Add this to 'startup.m' file:
%% Reverting to pre 2018b figure exploration
try
if ~verLessThan('matlab','9.5')
% Hide Ax Toolbar:
set(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','off'))
% Preparing the PlotTools icons:
icon_PT_show = double(imread(fullfile(matlabroot,'toolbox','matlab','icons','tool_plottools_show.png')))/2^16;
icon_PT_show(icon_PT_show==0)=NaN; %Adjust Transparency in icon
icon_PT_hide= double(imread(fullfile(matlabroot,'toolbox','matlab','icons','tool_plottools_hide.png')))/2^16;
icon_PT_hide(icon_PT_hide==0)=NaN;%Adjust Transparency in icon
% Reverting the
%1. 'Hide Plot Tools' icon;
%2. 'Show Plot Tools' icon;
%3. Icons of the pre 2018b toolbar
set(groot,'defaultFigureCreateFcn',@(h,e)(cellfun(@(x)feval(x,h,e), ...
{...
@(h,e) uipushtool(findall(gcf, 'type', 'uitoolbar'),'TooltipString','Hide Plot Tools','ClickedCallback',...
@(x,y) plottools('off'),'CData',icon_PT_hide), ...
@(h,e)uipushtool(findall(gcf, 'type', 'uitoolbar'),'TooltipString','Show Plot Tools','ClickedCallback',...
@(x,y) plottools('on'),'CData',icon_PT_show), ...
@(h,e)addToolbarExplorationButtons(h)...
})))
end
catch
warning('Something went wrong.');
end
clearvars('icon_PT_show', 'icon_PT_hide');

Accedi per commentare.

Risposte (2)

imrankhan ajees
imrankhan ajees il 21 Feb 2019
customize it again.

Sturla Kvamsdal
Sturla Kvamsdal il 5 Set 2019
This looks promising. What part restores only the plot tools buttons? I am quite happy with having the navigation-stuff by the axis.
Thanks,
Sturla
  1 Commento
Johann
Johann il 5 Set 2019
In order to restore the navigation-stuff at the axis, just delete or comment this one line and make a restart of matlab:
>> set(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','off'))
Instead of restart, you can also enable the navigation at the axis by executing this line once:
>> set(groot,'defaultAxesCreateFcn',@(ax,~)set(ax.Toolbar,'Visible','on'))

Accedi per commentare.

Categorie

Scopri di più su Specifying Target for Graphics Output in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by