cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to fill color for a triangle ?

SOLVED
Highlighted
Moonstone

Is there a way to fill color for a triangle ?

   Hello Everyone.

   From :

Fill I .PNG

   Is there a way to fill color for a triangle ?

   Many thanks for your time and help in advance.

       Regards.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Is there a way to fill color for a triangle ?

There is no built-in way to fill the area, but you can quickly write your own hatch function to create a number of vertical hatch lines between two functions:

Werner_E_1-1600548416937.png

MC15 sheet attached

BTW, I'm a bit irritated because I am not able to resize the plot region, making it smaller. Not sure why!?

View solution in original post

4 REPLIES 4
Highlighted

Re: Is there a way to fill color for a triangle ?

There is no built-in way to fill the area, but you can quickly write your own hatch function to create a number of vertical hatch lines between two functions:

Werner_E_1-1600548416937.png

MC15 sheet attached

BTW, I'm a bit irritated because I am not able to resize the plot region, making it smaller. Not sure why!?

View solution in original post

Highlighted

Re: Is there a way to fill color for a triangle ?

Thanks Werner!

 

hatch for Express:

FredKohlhepp_0-1600775253259.png

(Note that the first two arguments must be labelled as functions.

 

Re: Is there a way to fill color for a triangle ?

You may consider renaming your function to hatch_aux(f,g,...) and define

hatch(f,g,x1,x2,n):=hatch_aux(f,g,x1,x2,n,n)

 

That way you avoid having to provide the number of lines (n) twice.

Highlighted

Re: Is there a way to fill color for a triangle ?

Good point!  More "elegant."

Announcements