-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolor_line3m.m
43 lines (40 loc) · 1.15 KB
/
color_line3m.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
function h = color_line3m(lat, lon, z, c, varargin)
% color_line3 plots a 3-D "line" with c-data as color
%
% h = color_line(x, y, z, c)
% by default: 'LineStyle','-' and 'Marker','none'
%
% or
% h = color_line(x, y, z, c, mark)
% or
% h = color_line(x, y, z, c, 'Property','value'...)
% with valid 'Property','value' pairs for a surface object
%
% in: lat latitude data
% lon longitude data
% z z-data
% c 4th dimension for colouring
% mark for scatter plots with no connecting line
%
% out: h handle of the surface object
h = surfacem(...
[lat(:) lat(:)], ...
[lon(:) lon(:)], ...
[z(:) z(:)], ...
[c(:) c(:)]);
% , c(:),...
% 'FaceColor','none',...
% 'EdgeColor','flat',...
% 'Marker','none');
% [h,msg] = surfacem(varargin)
%
if nargin ==5
switch varargin{1}
case {'+' 'o' '*' '.' 'x' 'square' 'diamond' 'v' '^' '>' '<' 'pentagram' 'p' 'hexagram' 'h'}
set(h,'LineStyle','none','Marker',varargin{1})
otherwise
error(['Invalid marker: ' varargin{1}])
end
elseif nargin > 5
set(h,varargin{:})
end