Skip to content

Commit

Permalink
legend fix in hddisp_new
Browse files Browse the repository at this point in the history
  • Loading branch information
ebenetce committed Dec 16, 2024
1 parent 9c91ec2 commit fdf4769
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions tbx/bear/+bear/hddisp_new.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,8 @@ function hddisp_new(hd_estimates,const,exo,n,m,Y,T,IRFt,pref,decimaldates1,strin
hd=figure('Tag','BEARresults');
set(hd,'name',strcat('historical decomposition (',endo{ii,1},')'));
% clear previous variables
clear contributions;
clear contributions2;
clear contributions3;
clear contribpos;
clear contribneg;
clear out
clear in
clear residual
clear colorm

clear contributions contributions2 contributions3 contribpos contribneg out in residual colorm;

if length(labels)>14
colorm=jet;
% colormap=hsv;
Expand Down Expand Up @@ -254,11 +246,7 @@ function hddisp_new(hd_estimates,const,exo,n,m,Y,T,IRFt,pref,decimaldates1,strin
title(endo{ii,1},'Interpreter','none')
set(gca,'XLim',[decimaldates1(1,1) decimaldates1(end,1)],'FontName','Times New Roman');
box off
hL=legend(labels2);
LPosition = [0.47 0.00 0.1 0.1];
set(hL,'Position', LPosition, 'orientation', 'horizontal','Interpreter','none');
%annotation('textbox',[0.39 0.92 0.0 0.08],'String',' ','FitBoxToText','on','FontSize',8,'Linestyle','none');
%set(gcf,'PaperPositionMode','Auto')
legend(labels2, 'orientation', 'horizontal', 'Interpreter','none', 'Location','southoutside');
legend boxoff
end
end
Expand Down

0 comments on commit fdf4769

Please sign in to comment.