【发布时间】:2012-08-21 04:38:04
【问题描述】:
我正在绘制一个箱线图,因此我在 MATLAB 中使用以下代码。我对matlab很陌生。
for k=1:N % running through k categories in the plot
patch(...); % The box
% now drawing the whiskers and percentiles
line(...); % the median
line(..); % the 25th percentile
line(..); % the 75th percentile
line(...); % the max
line(..); % the min
end
% THIS LINE ONLY IS DISPLAYED NOT THE BOX-PLOT, WHY??
% A poly-line passing median of each box
plot([1:N]-0.5, Ys, '-Xr', 'LineWidth', 4, 'MarkerSize', 12);
仅显示最终语句中绘制的线,而不显示箱线图 当我注释掉 plot 语句时,将显示箱线图。
但是,我怎样才能让它们在另一个之上显示呢?
【问题讨论】:
标签: matlab statistics plot boxplot