You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: plotSignatures.m
    path of file: ./repos/Image-Harmonization-Dataset-iHarmony4/Lalonde and Efros/utils/mycode/histogram
    
    the code of the file until where you have to start completion: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function plotSignatures(figureHandle, centers, weights, colorSpace)
%   Plot the signatures with points
    
function plotSignatures(figureHandle, centers, weights, colorSpace)
%   Plot the signatures with points of size proportional to the weights of each center.
% 
% Input parameters:
%   - figureHandle: handle of figure where to draw the signature
%   - centers: cluster centers (typically obtained by k-means clustering)
%   - weights: weight of each cluster (nb of points associated with them, normalized)
%   - colorSpace: color space used to represent the centers (need inverse transformation to RGB)
%
% Output parameters:
%    
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function plotSignatures(figureHandle, centers, weights, colorSpace)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright 2006-2007 Jean-Francois Lalonde
% Carnegie Mellon University
% Do not distribute
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if strcmp(colorSpace, 'rgb')
    r = centers(:,1); g = centers(:,2); b = centers(:,3);
elseif strcmp(colorSpace, 'lab')
    [r,g,b] = lab2rgb(centers(:,1), centers(:,2), centers(:,3));
else
    error('Unsupported color space');
end