MATLAB: How to remove the border surrounding the legend box in MATLAB borderboxlegendMATLAB I would like to remove the border surrounding the legend box in MATLAB. Best Answer The following example demonstrates how to remove the legend border and legend background for MATLAB 5.3 (R11):plot(rand(10,10)); % Generate a plot.legend('a1', 'a2','a3','a4','a5','a6','a7','a8','a9','a10') % Add a legendh = findobj('type', 'axes'); % Find all sets of axesset(h(1), 'visible', 'off') % Hides the legend's axes (legend border and background)The following example demonstrates how to remove the legend border and legend background for MATLAB 6.0 (R12) and later versions:plot(rand(10,10)); % Generate a plot.legend('a1', 'a2','a3','a4','a5','a6','a7','a8','a9','a10') % Add a legendlegend boxoff % Hides the legend's axes (legend border and background) Related SolutionsMATLAB: How to create a legend with multiple colored squares % Create an axehAxe = axes(...);% Get your patches handleshGreen = patch(hAxe, ...);hYellow = patch(hAxe, ...);hRed = patch(hAxe, ...); % Add legendlegend(hAxe, [hGreen hYellow hRed], {'Green', 'Yellow', 'Red'}) MATLAB: How to plot the switching signal in matlab t=0:0.01:25; %time vectorwidth = 4; % train widthdela = width/2:width*2:25; % delayspulse_vect=pulstran(t,dela,'rectpuls',width) + 1; % 1 is offset% Plottigfigure, plot(t,pulse_vect, 'LineWidth', 2);ylim([0, 2.5]), title('Not given')xlabel('Time(s)'); ylabel('\sigma') Related QuestionWhat are all of the effects of setting a LEGEND to ‘boxon’ or ‘boxoff’HI, i want to do this type of graphic, but i do not how and if it is possible.Errorbar + multiple plots + one legend
Best Answer