How to plot individual concentration vs time plot by group?

12 ビュー (過去 30 日間)
voZnW
voZnW 2022 年 10 月 3 日
コメント済み: Cheliza 2023 年 4 月 20 日
My data has 12 individual concentration data, they were divided into three dose groups with four individuals in each group. I want to plot individual concentration vs time plot by different dose group. But the "creat set" function can only separate by different species like concentration in central compartment or concentration in peripheral compartment. How to plot individual concentration vs time plot by dose group?
  1 件のコメント
Cheliza
Cheliza 2023 年 4 月 20 日
You can plot individual concentration vs time plot by different dose groups by using the 'hold on' command to plot each individual data set separately.
Here's an example code that shows how to plot individual concentration vs time plot by dose group:
% Sample data
dose_group_1 = [1 2 3 4];
dose_group_2 = [5 6 7 8];
dose_group_3 = [9 10 11 12];
time = [0 1 2 3];
% Plot individual concentration vs
time plot for dose group 1
plot(time, dose_group_1(1,:), '-o')
hold on
plot(time, dose_group_1(2,:), '-o')
plot(time, dose_group_1(3,:), '-o')
plot(time, dose_group_1(4,:), '-o')
xlabel('Time (hours)')
ylabel('Concentration')
title('Individual concentration vs time plot for dose group 1')
legend('Individual 1', 'Individual 2', 'Individual 3', 'Individual 4')
% Plot individual concentration vs time plot for dose group 2
figure
plot(time, dose_group_2(1,:), '-o')
hold on
plot(time, dose_group_2(2,:), '-o')
plot(time, dose_group_2(3,:), '-o')
plot(time, dose_group_2(4,:), '-o')
xlabel('Time (hours)')
ylabel('Concentration')
title('Individual concentration vs time plot for dose group 2')
legend('Individual 1', 'Individual 2', 'Individual 3', 'Individual 4')
% Plot individual concentration vs time plot for dose group 3
figure
plot(time, dose_group_3(1,:), '-o')
hold on
plot(time, dose_group_3(2,:), '-o')
plot(time, dose_group_3(3,:), '-o')
plot(time, dose_group_3(4,:), '-o')
xlabel('Time (hours)')
ylabel('Concentration')
title('Individual concentration vs time plot for dose group 3')
legend('Individual 1', 'Individual 2', 'Individual 3', 'Individual 4')
In this example, each dose group is represented by a row in a matrix, with each column corresponding to an individual's data. The 'hold on' command is used to plot each individual's data on the same graph. The 'figure' command is used to create a new figure for each dose group. The 'xlabel', 'ylabel', 'title', and 'legend' commands are used to label the plot and provide a legend for the individual data sets.

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

回答 (1 件)

Fulden Buyukozturk
Fulden Buyukozturk 2022 年 10 月 3 日
編集済み: Fulden Buyukozturk 2022 年 10 月 3 日
If you have a column in your dataset with the dose info, you can use this column to slice the data using Visual Channels. Please see the screenshot below. Here the column with dose information is "Dose_nanomole".

コミュニティ

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

カテゴリ

Help Center および File ExchangeImport Data についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by