My understanding of the question is that multiple categories in a table need to be merged into one category. In MATLAB categories can be merged with "margecats" function. Here is an example of how this can be done.
T = table([1; 2; 3;4;5], {'A'; 'B'; 'C';'D';'E'}, 'VariableNames', {'NumericColumn', 'CategoricalColumn'});
T.CategoricalColumn = categorical(T.CategoricalColumn);
T.CategoricalColumn = mergecats(T.CategoricalColumn, {'A', 'B','C'}, 'ABC');
%% Use the plot function to plot the data with the merged categories column
Further information can be found in the following MATLAB documentation: https://www.mathworks.com/help/releases/R2021a/matlab/ref/categorical.mergecats.html
Hope this helps resolve the query.