Is there a way to get shaded error regions on a scatter plot?
1 view (last 30 days)
I have a scatter plot with known errors for each datapoint. Is there a way to create a shaded region around the scatter plot? Below is my graph, the red and cyan regions are the errors and the blue is the data. Is there a way to shade them and make them a continuous line, like the graph below?
I've attached the table below, along with my code.
scatter(myData.Anisotropic_1, myData.("MPC aniso"), 'b');
title('Axiovision versus MPC, with reproducibility (r) in shaded region',"FontWeight","bold");
Star Strider on 5 Nov 2022
It would help to have the data.
Try something like this —
x = linspace(0, 2*pi, 50);
y = sin(x) + 0.5;
err = rand(size(x))*0.5 + 0.5;
scatter(x, y, 'filled')
patch([x, flip(x)], [y-0.25 flip(y+err)], 'b', 'FaceAlpha',0.25, 'EdgeColor','r', 'LineStyle','-.', 'MarkerSize',20)
Experiment to get the desired result.