forked from plotly/plotly_matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextractLineLine.m
More file actions
44 lines (31 loc) · 1.21 KB
/
extractLineLine.m
File metadata and controls
44 lines (31 loc) · 1.21 KB
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
function line = extractLineLine(line_data)
% EXTRACTS THE LINE STYLE USED FOR MATLAB OBJECTS
% OF TYPE "LINE". THESE OBJECTS ARE USED IN LINESERIES,
% STAIRSERIES, STEMSERIES, BASELINESERIES, AND BOXPLOTS
%-------------------------------------------------------------------------%
%-INITIALIZE OUTPUT-%
line = struct();
%-------------------------------------------------------------------------%
if(~strcmp(line_data.LineStyle,'none'))
%-SCATTER LINE COLOR (STYLE)-%
col = 255*line_data.Color;
line.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')'];
%---------------------------------------------------------------------%
%-SCATTER LINE WIDTH (STYLE)-%
line.width = line_data.LineWidth;
%---------------------------------------------------------------------%
%-SCATTER LINE DASH (STYLE)-%
switch line_data.LineStyle
case '-'
LineStyle = 'solid';
case '--'
LineStyle = 'dash';
case ':'
LineStyle = 'dot';
case '-.'
LineStyle = 'dashdot';
end
line.dash = LineStyle;
%---------------------------------------------------------------------%
end
end