Plotting Binary Variables using Heat Map
显示 更早的评论
I do need assitance plotting binary variables using heatmap. Please attached data sheet
The plot generated from the code below is not what want.
Mpower4 = readtable('file.xls','Sheet','Connectivity','ReadRowNames',true,'EmptyValue',0,"TextType","string" );
Vars = {{'g1','g2','g3'},{'G2crank','G3crank'},{'n1','n2','n3','n4','n5','n6','n7','n8','n9'},{'l1','l2','l3','l4','l5','l6','l7','l8','l9'}};
s5=stackedplot(Mpower4,Vars);
s5.LineProperties(1).PlotType = "stem";
s5.LineProperties(2).PlotType = "stairs";
s5.LineProperties(3).PlotType = "stairs";
s5.LineProperties(4).PlotType = "stairs";
ax3 = findobj(s5.NodeChildren, 'Type','Axes');
set(ax3, 'YTick', [0 1]);
s5.AxesProperties(1).YLimits = [-0.5 1.5];
s5.AxesProperties(2).YLimits = [-0.5 1.5];
s5.AxesProperties(3).YLimits = [-0.5 1.5];
s5.AxesProperties(4).YLimits = [-0.5 1.5];
s5.LineWidth = 2;
s5.XLabel ='Minutues'
grid on
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
