Filter löschen
Filter löschen

Saving multiple figures of loop in one subplot

1 Ansicht (letzte 30 Tage)
Ali
Ali am 18 Feb. 2019
Kommentiert: Ali am 18 Feb. 2019
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 Kommentare
Geoff Hayes
Geoff Hayes am 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 am 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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by