Fill function not accepting hexadecimal colors

>> A = [2 2 4 4];
>> B = [5 3 3 5];
>> fill(A,B,"blue");
Above produces expected result
>> fill(A,B,"#0000FF");
"Error using fill
Invalid color, marker, or line style."
But using "#0000FF" or any hexadecimal color throws an error. Why? Using version R2023a

 Akzeptierte Antwort

Voss
Voss am 26 Apr. 2024
A = [2 2 4 4];
B = [5 3 3 5];
patch("XData",A,"YData",B,"FaceColor","#0000FF");

1 Kommentar

Voss
Voss am 26 Apr. 2024
Bearbeitet: Voss am 26 Apr. 2024
A = [2 2 4 4];
B = [5 3 3 5];
fill(A,B,"","FaceColor","#0000FF");

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2023a

Gefragt:

am 26 Apr. 2024

Bearbeitet:

am 26 Apr. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by