How to draw a curly brace outside the gca?

Hi I would like to move a curly brace (with the function drawbrace) outside the gca (as the annotations, which can go outside the gca).. Any idea?
x = 1:10;
y = [2 5 4 1 2 4 1 8 1 2];
plot(x,y)
drawbrace([1,3], [1,8], 10)

Più risposte (1)

Use negative ccordinates for the brace byt xlim from 0
drawbrace([-0.5,3], [-0.5,8], 10);
xlim([0,Inf]);

3 Commenti

Sim
Sim il 21 Ott 2020
Modificato: Sim il 21 Ott 2020
Thanks, but not working :( .....
x = 1:10;
y = [2 5 4 1 2 4 1 8 1 2];
plot(x,y)
drawbrace([-0.5,3], [-0.5,8], 10);
xlim([0,Inf]);
Sorry, you are right.
the brace will be clipped and is not shown

Accedi per commentare.

Richiesto:

Sim
il 21 Ott 2020

Risposto:

Sim
il 22 Ott 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by