21 lines
468 B
Matlab
21 lines
468 B
Matlab
function fig = plot_image_position_overlay(x, y, time, image)
|
|
|
|
if length(x) ~= length(y) || length(y) ~= length(time)
|
|
error("Length of vectors x, y, and time does not match!");
|
|
end
|
|
if ~exist(image, "file")
|
|
error("Image %s could not be found!", image);
|
|
end
|
|
|
|
fig = figure();
|
|
imshow(image)
|
|
hold on
|
|
scatter(x, y, [], time)
|
|
c = colorbar();
|
|
|
|
fig.PaperSize = [10.0, 10.0];
|
|
fig.PaperPosition = [0., 0., 10.0, 10.0];
|
|
c.Label.String = "time [s]";
|
|
c.Label.FontSize = 9;
|
|
|