问题
:-) Hi, guys.
Is there any way to change the line color and width of function drawRect in Octave ?
According to its reference, there's no property-value pair to set in this function.
Thanks.
回答1:
The drawRect
function does not accept a property-value pair, but it does return a graphics handle from where you can set any property:
r = drawRect (x, y, w, h);
set (r, "color", [1 0 0]); # set to red (RGB triplets)
set (r, "linewidth", 5);
Use get (r)
to see a list of all properties, or read the manual section graphics object properties.
来源:https://stackoverflow.com/questions/32032785/octave-how-to-change-line-color-and-width-in-drawrect