How modify the number of rows and columns of plots, when I plot a sbiopredictionci object?

6 ビュー (過去 30 日間)
When the number of groups are so high, using plot with sbiopredictionci object, it plots all the groups left to righ in a single column, is it possible to change this output?.
Thanks
  4 件のコメント
Florian Augustin
Florian Augustin 2023 年 12 月 5 日
Hi,
starting in R2023b, the internals of the prediction confidence interval plots have changed and the selectivePlotCI function from my previous comment is not working in R2023b or later releases of MATLAB.
Here is an updated version that works in R2023b or later:
function hFig = selectivePlotCI(ciObj, rowIndices, colIndices)
% Plot confidence intervals to get the data.
ciH = plot(ciObj);
ciH.Visible = false;
cleanupObj = onCleanup(@()close(ciH));
ax = reshape(ciH.Children.Children, ...
[], numel(ciObj(1).ResponseNames))';
numCols = numel(colIndices);
numRows = numel(rowIndices);
% Select axes
selectedAxes = ax(rowIndices, colIndices);
% Create a new figure
hFig = figure;
for i = 1 : numRows
for j = 1 : numCols
% Copy confidence interval plot data to new axes:
subAxes = subplot(numRows, numCols, (i-1)*numCols+j);
copyobj(selectedAxes(i, j).Children, subAxes);
xlabel(selectedAxes(i, j).XLabel.String);
if j == 1
ylabel(ax(rowIndices(i), 1).YLabel.String);
end
if i == 1
title(ax(1, colIndices(j)).Title.String);
end
end
end
end
-Florian
Adolfo Garcia Perez
Adolfo Garcia Perez 2023 年 12 月 11 日
Hi Florian,
Thanks for the update
Adolfo

サインインしてコメントする。

回答 (0 件)

コミュニティ

その他の回答  SimBiology コミュニティ

カテゴリ

Help Center および File ExchangeExtend Modeling Environment についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by