-
Notifications
You must be signed in to change notification settings - Fork 7
/
plotGraph.m
49 lines (41 loc) · 1.52 KB
/
plotGraph.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function createfigure(X1, YMatrix1)
%CREATEFIGURE(X1, YMATRIX1)
% X1: vector of x data
% YMATRIX1: matrix of y data
% Auto-generated by MATLAB on 08-Apr-2017 20:59:00
% Create figure
figure;
% Create axes
axes1 = axes('Position',[0.3328125 0.11 0.374999999999999 0.815]);
hold(axes1,'on');
% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1,'LineWidth',1);
set(plot1(1),'DisplayName','GLCM',...
'MarkerFaceColor',[0.600000023841858 0.200000002980232 0],...
'Marker','square',...
'Color',[0.600000023841858 0.200000002980232 0]);
set(plot1(2),'DisplayName','CCV','MarkerFaceColor',[1 0 0],'Marker','v',...
'Color',[1 0 0]);
set(plot1(3),'DisplayName','LTP','MarkerFaceColor',[0 0 1],'Marker','o',...
'Color',[0 0 1]);
set(plot1(4),'DisplayName','GLCM+CCV','MarkerFaceColor',[1 0 1],...
'Marker','^',...
'Color',[1 0 1]);
set(plot1(5),'DisplayName','GLCM+LTP','MarkerFaceColor',[0 0 0],...
'Marker','pentagram',...
'Color',[0 0 0]);
set(plot1(6),'DisplayName','CCV+LTP','MarkerFaceColor',[0 1 1],...
'Marker','diamond',...
'Color',[0 1 1]);
set(plot1(7),'DisplayName','GLCM+CCV+LTP',...
'MarkerFaceColor',[0.164705887436867 0.384313732385635 0.274509817361832],...
'Marker','hexagram',...
'Color',[0.164705887436867 0.384313732385635 0.274509817361832]);
% Create xlabel
xlabel('No. of training images per class');
% Create ylabel
ylabel('Average Accuracy (%)');
box(axes1,'on');
% Create legend
legend1 = legend(axes1,'show');
set(legend1,'Location','best');