Issue with box plot code or something else?????
이전 댓글 표시
I have two sets of mat files. In 1st set, I have 2sn0_sorted, 3sn0_sorted and 4sn0_sorted. In 2nd set, these are 2sn0, 3sn0 and 4sn0. I have the following Matlab code to plot box plot:
clear all
close all
clc
load 2sn0_sorted
fitness2sn0=one;
load 3sn0_sorted
fitness3sn0=one;
load 4sn0_sorted
fitness4sn0=one;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Descending Order
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fitness2sn0=sort(fitness2sn0,'descend');
fitness3sn0=sort(fitness3sn0,'descend');
fitness4sn0=sort(fitness4sn0,'descend');
figure
h1=boxplot([fitness2sn0; fitness3sn0; fitness4sn0].');
set(h1,{'linew'},{2})
grid
Ax = gca;
Ax.XLabel.String = '\bf No. of Sources';
Ax.YLabel.String = '\bf fitness';
Ax.YScale = 'log';
Ax.XTickLabel = compose('%ds',2:4);
Ax.YLim = [1E-30 10];
title('\bf Fitness of different sources with no noise')
set(gca,'linew',2)
When I run the above program and it works well. But when I load my 2nd set of mat files and run the same program, it only displays one plot.
Whats the problem? My mat files are attached herewith.
채택된 답변
추가 답변 (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!