Saving multiple figures of loop in one subplot

1 次查看(过去 30 天)
Is it possible to save figures of different loops in 1 sub plot?For example:there are 3 different training and testing datasets.I want to save the results of all three datasets in 1 subplot.Thank you.
Suppose dataset of 3 homes
data1 =Home 1;
date2=Home 2;
date3=Home 3;
i=data1+data2+data3;
for j=1:i
-----
end
% After training a model;
results_home1=actual Vs Predicted ; % suplot 1
results_home2=actual Vs Predicted ; % suplot 2
results_home3=actual Vs Predicted ; % suplot 3
% All the above suplots in 1 figure
  2 个评论
Geoff Hayes
Geoff Hayes 2019-2-18
Ali - do you want a subplot for each of the three data sets (results_home*), or one plot for all three? Please show us how you have generated the actual and predicted values for each dataset - do you call a function three times to generate this data, or something else?
Ali
Ali 2019-2-18
I am using 3 datesets of 3 different home and after that i am using this example .I want to save every home results in 1 subplot.Example is attached in figure.figure.png
clc
clear
load HomeAmeter22016
load HomeBmeter12016
load HomeCmeter12016

请先登录,再进行评论。

采纳的回答

KSSV
KSSV 2019-2-18
for i = 1:3
subplot(3,1,i)
plot(rand(10,1))
title(num2str(i))
end
  1 个评论
Ali
Ali 2019-2-18
@KSSV.....Thank you for this.I will try this.Besides ,i couldnt able to plot a time series data which shows cases on my Y-axis and moving time and date with x-axis.The sample of graph i want is attached.data (.xlsx) is also attached.I want to use coloumn 1 and coloumn 3 for plotting.sample_plot.png

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by