-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreatefigure.m
63 lines (52 loc) · 2.12 KB
/
createfigure.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
function createfigure(Parent1, X1, YMatrix1)
%CREATEFIGURE(PARENT1,X1,YMATRIX1)
% PARENT1: axes parent
% X1: vector of x data
% YMATRIX1: matrix of y data
% Auto-generated by MATLAB on 22-Nov-2011 13:52:43
% Create figure
figure;
% uipanel currently does not support code generation, enter 'doc uipanel' for correct input syntax
% In order to generate code for uipanel, you may use GUIDE. Enter 'doc guide' for more information
% uipanel(...);
% uipanel currently does not support code generation, enter 'doc uipanel' for correct input syntax
% In order to generate code for uipanel, you may use GUIDE. Enter 'doc guide' for more information
% uipanel(...);
% Create axes
axes1 = axes('Parent',Parent1);
box(axes1,'on');
hold(axes1,'all');
% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1,'LineWidth',2,'Parent',axes1);
set(plot1(1),'Color',[1 0 0]);
set(plot1(2),'Color',[1 0.2 0]);
set(plot1(3),'Color',[1 0.4 0]);
set(plot1(4),'Color',[1 0.6 0]);
set(plot1(5),'Color',[1 0.8 0]);
set(plot1(6),'Color',[1 1 0]);
set(plot1(7),'Color',[0.8 1 0]);
set(plot1(8),'Color',[0.6 1 0]);
set(plot1(9),'Color',[0.4 1 0]);
set(plot1(10),'Color',[0.2 1 0]);
set(plot1(11),'Color',[0 1 0]);
set(plot1(12),'Color',[0 1 0.2]);
set(plot1(13),'Color',[0 1 0.4]);
set(plot1(14),'Color',[0 1 0.6]);
set(plot1(15),'Color',[0 1 0.8]);
set(plot1(16),'Color',[0 1 1]);
set(plot1(17),'Color',[0 0.8 1]);
set(plot1(18),'Color',[0 0.6 1]);
set(plot1(19),'Color',[0 0.4 1]);
set(plot1(20),'Color',[0 0.2 1]);
set(plot1(22),'Color',[0.199999999999999 0 1]);
set(plot1(23),'Color',[0.399999999999999 0 1]);
set(plot1(24),'Color',[0.600000000000001 0 1]);
set(plot1(25),'Color',[0.800000000000001 0 1]);
set(plot1(26),'Color',[1 0 1]);
set(plot1(27),'Color',[1 0 0.8]);
set(plot1(28),'Color',[1 0 0.6]);
set(plot1(29),'Color',[1 0 0.4]);
set(plot1(30),'Color',[1 0 0.2]);
% uicontrol currently does not support code generation, enter 'doc uicontrol' for correct input syntax
% In order to generate code for uicontrol, you may use GUIDE. Enter 'doc guide' for more information
% uicontrol(...);