<< CL_plot_ephem Utilities CL_rad2deg >>

CelestLab >> Utilities > CL_plot_swath

CL_plot_swath

Simple swath 2D plot

Calling Sequence

CL_plot_swath(pos [, win_id, style, color_id, data_bounds])

Description

Parameters

pos:

Points describing the swath in cartesian coordinates. (3xNxP) or list(3xN). See above for details.

win_id:

(integer or window handle, optional) Figure Id. Id of current window if omitted.

style:

(string, optional) The style used to draw the swath: "f", "c" or "s". Default is "c". (1x1)

color_id:

(integer, optional) Vector of color indices used to draw the swath. Default: black color (1xN or 1x1)

data_bounds:

(optional) View area: [longmin, latmin; longmax, latmax] in degrees. Default is [-180, -90; 180, 90].

Authors

Examples

// Generate orbit
t0 = 0; // initial time
kep0 = [7200.e3; 0; 1.4; 0; 0; 0]; // orbit parameters
t = t0 + (0 : 1 : 95) / 1440; // days
kep = CL_ex_kepler(t0, kep0, t); // orbit propagation
[pos, vel] = CL_oe_kep2car(kep); // inertial position and velocity

// Generate swath points (arbitrary radius)
ang = 0.3; // "center angle" (rad)
p1 = CL_fr_qsw2inertial(pos, vel, [cos(ang); 0; sin(ang)]);
p2 = pos;
p3 = CL_fr_qsw2inertial(pos, vel, [cos(ang); 0; -sin(ang)]);

// Plot (filled, continuous colors)
f = scf();
f.color_map = jetcolormap(101);
colorbar(t(1)*1440, t($)*1440, colminmax = [1, 101]);
CL_plot_swath(list(p1, p2, p3), style = "f", color_id = 1+ round(100*t/t($)));

Report an issue
<< CL_plot_ephem Utilities CL_rad2deg >>