[] = MAKE_CUSTOM_PATCH_LEGEND(colors, labels)
MAKE_CUSTOM_PATCH_LEGEND will plot a custom legend on the current figure.
It uses a hack involving invisible patch objects that I don't understand.
COLORS: either a cell array of n MATLAB color strings ('r', 'b', 'k', etc.);
or a column vector of n scalars, which will index into the current colormap;
or a n x 3 matrix of RGB values for each patch.
LABELS: a cell array of n string labels for your legend.
VARARGIN: name/value arguments to pass to legend().
인용 양식
Jonah Pearl (2026). make_custom_patch_legend (https://kr.mathworks.com/matlabcentral/fileexchange/74952-make_custom_patch_legend), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
개발 환경:
R2018b
모든 릴리스와 호환
