Skip to main content
20-Turquoise
September 19, 2020
Solved

Is there a way to fill color for a triangle ?

  • September 19, 2020
  • 1 reply
  • 2121 views

   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.

Best answer by Werner_E

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!?

1 reply

Werner_E25-Diamond IAnswer
25-Diamond I
September 19, 2020

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!?

23-Emerald I
September 22, 2020

Thanks Werner!

 

hatch for Express:

FredKohlhepp_0-1600775253259.png

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

 

25-Diamond I
September 22, 2020

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.