exponenta event banner

sbiotrellis

Данные графика или результаты моделирования на решетчатом графике

Описание

пример

trellisplot = sbiotrellis(data,groupCol,xCol,yCol) строит графики для каждой группы в data как определено переменной столбца группы groupCol в свой собственный вложенный график. Данные, определенные столбцом xCol отображается в соответствии с данными, определенными столбцами yCol.

пример

trellisplot = sbiotrellis(data,groupCol,xCol,yCol,Name,Value) использует дополнительные параметры, указанные одним или несколькими Name,Value аргументы пары, которые поддерживаются plot команда.

пример

trellisplot = sbiotrellis(data,fcnHandle,groupCol,xCol,yCol) строит графики для каждой группы в data как определено переменной столбца группы groupCol в свой собственный вложенный график. sbiotrellis создает вложенный график путем вызова дескриптора функции, fcnHandle, с входными аргументами, определенными data колонки xCol и yCol. fcnHandle не может быть пустым и должен быть указан.

fcnHandle должна иметь подпись fcnHandle(x,y), где x является числовым вектором столбца и y является матрицей с тем же количеством строк, что и x.

Например, если требуется создать решетчатый график с логарифмической осью y, используйте @semilogy в качестве дескриптора функции, где semilogy - функция, отображающая данные с логарифмическим масштабом для оси Y.

пример

trellisplot = sbiotrellis(simData,fcnHandle,xCol,yCol) строит графики для каждой группы в simData в свой собственный вложенный график. sbiotrellis создает вложенный график путем вызова дескриптора функции, fcnHandle с входными аргументами, определенными столбцами xCol и yCol. fcnHandle может быть пустым ('' или []). Если поле пустое, график времени по умолчанию создается с помощью маркера @plot.

fcnHandle должна иметь подпись fcnHandle(simDataI,xCol,yCol), где simDataI является одиночным SimData объект, и xCol и yCol являются соответствующими входными аргументами для sbiotrellis.

Совет

Используйте plot способ наложения объекта sbiotrellis SimData объект или dataset на существующем sbiotrellis график. Например, plot(trellisplot,...) добавление графика к объекту trellisplot. SimData или dataset , который печатается, должен иметь то же количество элементов или групп, что и trellisplot объект. plot метод имеет те же входные аргументы, что и sbiotrellis.

Входные аргументы

свернуть все

Данные, указанные как dataset (Статистика и инструментарий машинного обучения), содержащий сгруппированные данные, groupedData object, или table.

Имя столбца группы, указанное как символьный вектор или строка, которая является именем столбца в data содержит информацию о группировке или пустое имя '' или ""что подразумевает наличие только одной группы в data.

Имя столбца для печати по оси X, заданного как символьный вектор или строка.

Если data является groupedData, то xCol также может быть пустым именем '' или ""и координаты X данных определяются переменной, указанной в DATA.Properties.IndependentVariableName.

Если data является dataset (инструментарий для статистики и машинного обучения) или table, то xCol не может быть пустым.

Имя столбца для построения графика по оси Y, заданного как символьный вектор, строка, строковый вектор или массив ячеек символьных векторов.

Дескриптор функции, указанный как дескриптор функции.

Если первым аргументом является dataset (инструментарий для статистики и машинного обучения) или groupedData object, fcnHandle должна иметь подпись fcnHandle(x,y), где x является числовым вектором столбца и y является матрицей с тем же количеством строк, что и x.

Если это SimData object, fcnHandle должна иметь подпись fcnHandle(simDataI,xCol,yCol), где simDataI является одиночным SimData объект, и xCol и yCol являются соответствующими входными аргументами для sbiotrellis.

Данные моделирования, указанные как SimData object.

Выходные аргументы

свернуть все

Объект печати, указанный как объект sbiotrellis. Объект имеет следующие свойства.

  • hFig - Объект фигуры MATLAB ®. Этот объект используется для управления внешним видом и поведением фигуры. Например, чтобы изменить цвет фона окна фигуры на белый, введитеtrellisplot.hFig.Color = 'white'. Список свойств см. в разделе Свойства фигуры.

  • nPlots - Это свойство указывает общее количество участков на рисунке.

  • plots - это вектор осей объектов длиной, равной nPlots. Это свойство используется для управления внешним видом и поведением объектов осей. Например, если требуется изменить ось Y на масштаб журнала, введите set(trellisplot.plots,'YScale','log'). Список свойств см. в разделе Свойства осей.

Примеры

свернуть все

Загрузите образец набора данных. Данные содержат измерения концентрации лекарственного средства в центральном и периферическом отделениях для 30 субъектов.

load('sd5_302RAgeSex.mat');

Создайте решетчатый график центральных концентраций для каждого субъекта.

t = sbiotrellis(data, 'ID', 'Time', 'CentralConc',...
               'Marker', 'o','LineStyle','--','MarkerFaceColor','b');
% Resize the figure.
t.hFig.Position(:) = [100 100 1200 800];

Figure contains 30 axes. Axes 1 with title ID 1 contains an object of type line. This object represents CentralConc. Axes 2 with title ID 6 contains an object of type line. Axes 3 with title ID 11 contains an object of type line. Axes 4 with title ID 16 contains an object of type line. Axes 5 with title ID 21 contains an object of type line. Axes 6 with title ID 26 contains an object of type line. Axes 7 with title ID 2 contains an object of type line. Axes 8 with title ID 7 contains an object of type line. Axes 9 with title ID 12 contains an object of type line. Axes 10 with title ID 17 contains an object of type line. Axes 11 with title ID 22 contains an object of type line. Axes 12 with title ID 27 contains an object of type line. Axes 13 with title ID 3 contains an object of type line. Axes 14 with title ID 8 contains an object of type line. Axes 15 with title ID 13 contains an object of type line. Axes 16 with title ID 18 contains an object of type line. Axes 17 with title ID 23 contains an object of type line. Axes 18 with title ID 28 contains an object of type line. Axes 19 with title ID 4 contains an object of type line. Axes 20 with title ID 9 contains an object of type line. Axes 21 with title ID 14 contains an object of type line. Axes 22 with title ID 19 contains an object of type line. Axes 23 with title ID 24 contains an object of type line. Axes 24 with title ID 29 contains an object of type line. Axes 25 with title ID 5 contains an object of type line. Axes 26 with title ID 10 contains an object of type line. Axes 27 with title ID 15 contains an object of type line. Axes 28 with title ID 20 contains an object of type line. Axes 29 with title ID 25 contains an object of type line. Axes 30 with title ID 30 contains an object of type line.

Используйте plot способ объекта sbiotrellis для наложения данных периферийной концентрации на тот же график.

plot(t,data,'ID','Time','PeripheralConc','Marker','d',...
            'LineStyle',':','MarkerFaceColor','r');

Figure contains 30 axes. Axes 1 with title ID 1 contains 2 objects of type line. These objects represent CentralConc, PeripheralConc. Axes 2 with title ID 6 contains 2 objects of type line. Axes 3 with title ID 11 contains 2 objects of type line. Axes 4 with title ID 16 contains 2 objects of type line. Axes 5 with title ID 21 contains 2 objects of type line. Axes 6 with title ID 26 contains 2 objects of type line. Axes 7 with title ID 2 contains 2 objects of type line. Axes 8 with title ID 7 contains 2 objects of type line. Axes 9 with title ID 12 contains 2 objects of type line. Axes 10 with title ID 17 contains 2 objects of type line. Axes 11 with title ID 22 contains 2 objects of type line. Axes 12 with title ID 27 contains 2 objects of type line. Axes 13 with title ID 3 contains 2 objects of type line. Axes 14 with title ID 8 contains 2 objects of type line. Axes 15 with title ID 13 contains 2 objects of type line. Axes 16 with title ID 18 contains 2 objects of type line. Axes 17 with title ID 23 contains 2 objects of type line. Axes 18 with title ID 28 contains 2 objects of type line. Axes 19 with title ID 4 contains 2 objects of type line. Axes 20 with title ID 9 contains 2 objects of type line. Axes 21 with title ID 14 contains 2 objects of type line. Axes 22 with title ID 19 contains 2 objects of type line. Axes 23 with title ID 24 contains 2 objects of type line. Axes 24 with title ID 29 contains 2 objects of type line. Axes 25 with title ID 5 contains 2 objects of type line. Axes 26 with title ID 10 contains 2 objects of type line. Axes 27 with title ID 15 contains 2 objects of type line. Axes 28 with title ID 20 contains 2 objects of type line. Axes 29 with title ID 25 contains 2 objects of type line. Axes 30 with title ID 30 contains 2 objects of type line.

Укажите дескриптор функции @semilogy для изменения оси Y на масштаб журнала.

t2 = sbiotrellis(data,@semilogy,'ID','Time','CentralConc');
%Resize the figure
t2.hFig.Position(:) = [100 100 1200 800];

Figure contains 30 axes. Axes 1 with title ID 1 contains an object of type line. This object represents CentralConc. Axes 2 with title ID 6 contains an object of type line. Axes 3 with title ID 11 contains an object of type line. Axes 4 with title ID 16 contains an object of type line. Axes 5 with title ID 21 contains an object of type line. Axes 6 with title ID 26 contains an object of type line. Axes 7 with title ID 2 contains an object of type line. Axes 8 with title ID 7 contains an object of type line. Axes 9 with title ID 12 contains an object of type line. Axes 10 with title ID 17 contains an object of type line. Axes 11 with title ID 22 contains an object of type line. Axes 12 with title ID 27 contains an object of type line. Axes 13 with title ID 3 contains an object of type line. Axes 14 with title ID 8 contains an object of type line. Axes 15 with title ID 13 contains an object of type line. Axes 16 with title ID 18 contains an object of type line. Axes 17 with title ID 23 contains an object of type line. Axes 18 with title ID 28 contains an object of type line. Axes 19 with title ID 4 contains an object of type line. Axes 20 with title ID 9 contains an object of type line. Axes 21 with title ID 14 contains an object of type line. Axes 22 with title ID 19 contains an object of type line. Axes 23 with title ID 24 contains an object of type line. Axes 24 with title ID 29 contains an object of type line. Axes 25 with title ID 5 contains an object of type line. Axes 26 with title ID 10 contains an object of type line. Axes 27 with title ID 15 contains an object of type line. Axes 28 with title ID 20 contains an object of type line. Axes 29 with title ID 25 contains an object of type line. Axes 30 with title ID 30 contains an object of type line.

plot(t2,data,@semilogy,'ID','Time','PeripheralConc');

Figure contains 30 axes. Axes 1 with title ID 1 contains 2 objects of type line. These objects represent CentralConc, PeripheralConc. Axes 2 with title ID 6 contains 2 objects of type line. Axes 3 with title ID 11 contains 2 objects of type line. Axes 4 with title ID 16 contains 2 objects of type line. Axes 5 with title ID 21 contains 2 objects of type line. Axes 6 with title ID 26 contains 2 objects of type line. Axes 7 with title ID 2 contains 2 objects of type line. Axes 8 with title ID 7 contains 2 objects of type line. Axes 9 with title ID 12 contains 2 objects of type line. Axes 10 with title ID 17 contains 2 objects of type line. Axes 11 with title ID 22 contains 2 objects of type line. Axes 12 with title ID 27 contains 2 objects of type line. Axes 13 with title ID 3 contains 2 objects of type line. Axes 14 with title ID 8 contains 2 objects of type line. Axes 15 with title ID 13 contains 2 objects of type line. Axes 16 with title ID 18 contains 2 objects of type line. Axes 17 with title ID 23 contains 2 objects of type line. Axes 18 with title ID 28 contains 2 objects of type line. Axes 19 with title ID 4 contains 2 objects of type line. Axes 20 with title ID 9 contains 2 objects of type line. Axes 21 with title ID 14 contains 2 objects of type line. Axes 22 with title ID 19 contains 2 objects of type line. Axes 23 with title ID 24 contains 2 objects of type line. Axes 24 with title ID 29 contains 2 objects of type line. Axes 25 with title ID 5 contains 2 objects of type line. Axes 26 with title ID 10 contains 2 objects of type line. Axes 27 with title ID 15 contains 2 objects of type line. Axes 28 with title ID 20 contains 2 objects of type line. Axes 29 with title ID 25 contains 2 objects of type line. Axes 30 with title ID 30 contains 2 objects of type line.

См. также

|

Представлен в R2009a