Hi,

I would like to know how do I add colour to a rectangle? I want to make the rect in Red..

Here is my code,

point = get(gcf,'CurrentPoint') ;

rect = [point(1,1) point(1,2) 30 12]; %Coordinates of the rectangle

[r2] = dragrect(rect);

Thanx!

Create a red octagon.

t = (1/16:1/8:1)'*2*pi;

x = sin(t);

y = cos(t);

fill(x,y,'r')

axis square

> > rect = [point(1,1) point(1,2) 30 12]; %Coordinates of the rectangle >>>> [r2] = dragrect(rect);> >> > > Thanx!> >> > use the "fill" function

t = (1/16:1/8:1)'*2*pi;

x = sin(t);

y = cos(t);

fill(x,y,'r')

axis square

> > rect = [point(1,1) point(1,2) 30 12]; %Coordinates of the rectangle >>>> [r2] = dragrect(rect);> >> > > Thanx!> >> > use the "fill" function

Hi, please forgive me I have misled you guys through the question. I dont want to fill the whole rectangle. What I intend to do is, just change the colour of the axes that make up the rectangle. Basically, I want to change the outline of the rectangle to red.

How do I do this?

Thank you.

How do I do this?

Thank you.

1. Rectangles, rectangles and more rectangles!

2. add color to font selection - color pallette - How do you add a c.

3. Adding a color to the custom color section of colors.

4. GDI+ - finding a rectangle inside another rectangle

5. Looking for rectangle in generalized rectangle

6. rectangle shape duplicates as a rounded rectangle

7. how to eliminate the stroke from the area that a rectangle joins another rectangle

8. Convert rectangle into rounded rectangle

9. Maximize Number of Rectangles Inside Larger Rectangle

10. if InvalidateRect() requests a big rectangle, then why OnPaint() gets request for 0 size rectangle?

11. Highlight rectangle in ListBox when mouse moves over rectangle

12. Source Rectangle and Target Rectangle

13. how Can i convert from rectangle to rectangle F

14. A Rectangle Contains/touches other Rectangle

15. Looking for rectangle in generalized rectangle

3 post • Page:**1** of **1**