Saving multiple figures of loop in one subplot

1 view (last 30 days)
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 Comments
Geoff Hayes
Geoff Hayes on 18 Feb 2019
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 on 18 Feb 2019
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

Sign in to comment.

Accepted Answer

KSSV
KSSV on 18 Feb 2019
for i = 1:3
subplot(3,1,i)
plot(rand(10,1))
title(num2str(i))
end
  1 Comment
Ali
Ali on 18 Feb 2019
@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

Sign in to comment.

More Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!