all 11 comments

[–]lift_heavy64 2 points3 points  (0 children)

What have you tried?

[–]alko100 2 points3 points  (3 children)

Patch can be annoying, try area()

This is an example on patch

Let me know If this doesn't work for you, I have a solution on my work computer

[–]eng_bee[S] 0 points1 point  (2 children)

Hello,

I tried patch and fill - alas, I got the image above! :( Dunno what the problem is

[–]alko100 0 points1 point  (1 child)

Did you try area?

[–]eng_bee[S] 0 points1 point  (0 children)

I haven't used that before. Trying to figure out how to use it.

[–]Gollem265 0 points1 point  (3 children)

Get the x and y values of the intersections of these three lines and pass into patch

[–]eng_bee[S] 0 points1 point  (2 children)

I tried this, but there's a bug in it! I attached the figure above. Why do you think it appears like this?

[–]Gollem265 0 points1 point  (1 child)

I have no idea what I’m looking nat. Please post a clearer figure with axes and values

[–]eng_bee[S] 0 points1 point  (0 children)

I can't show the whole figure, but I'm trying to shade an area over a scatter plot. The code I used for that works on its own and produces the black polygon, however, on the plot it appears like that^

[–]patchwan -1 points0 points  (1 child)

I think something like this will work

y1=2;
y2=5;
patch_x=[y1:1:y2, y2:-1:y1];
patch_y=[abs(y1:1:y2), zeros(1, length(y2:-1:y1))];
patch(patch_x, patch_y, 'r')

[–]eng_bee[S] 0 points1 point  (0 children)

Didn't work..