How can the Self Organizing Map function plotsomplanes be used to create different color schemes and custom labels?

4 次查看(过去 30 天)
What I mean is, when using the function plotsomplanes(net) to create the plots of SOM weights, the function makes a plot and using a color range of yellow to white to orange to dark brown to black; the designated colormap in the figure editor is "hot". I was wondering how to plot the map weights so that the maps are of a different color scheme, say autumn or summer, and how to do it directly from the command line (or in the matlab code that the line plotsomplanes would be located in).
In addition, the function plotsomplanes gives labels Input Weight 1, Input Weight 2 and so on for each map label. Is there a way, directly from the command line, to create a map of weights using plotsomplanes so that each map is automatically given a custom label once the map is plotted?
Thank you for any help you may have.
  1 个评论
Daniel Perez Rapela
Daniel Perez Rapela 2018-10-28
The only way I made this work is by modifying the plotsomplanes function itself. If you go to the bottom of it you can see where the color are defined. I modified this section slightly to:
% %%%%%HOT colormap
%%%%%level = (level-mn(i))/rng(i);
%%%%%red = min(1,level*2);
%%%%%green = max(0,level*2-1);
%%%%%blue = 0;
%%%%%c = [red green blue];
%%%%%set(plotData.patches{i}(j),'FaceColor',c);
%
%
% JET colormap
level = (level-mn(i))/rng(i);
c = jet(64);
c = c(max(1,ceil(64*level)),:);
set(plotData.patches{i}(j),'FaceColor',c);

请先登录,再进行评论。

回答(1 个)

Daniel Perez Rapela
Daniel Perez Rapela 2018-10-31
编辑:Daniel Perez Rapela 2018-10-31
In order to change the plot titles you can change this line in the same function:
title(a,['Weights from Input ' num2str(k)]);
An alternative is:
title(a,net.plotParams{k}.name);
In this way you can define the name of your plot in the specific net field (net.plotParams)

类别

Help CenterFile Exchange 中查找有关 Orange 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by