Skip to main content
added 2 characters in body
Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

Arrowheads not scaling How can I scale arrowheads according to arrow length?

I am looking for a solution to the arrowheads have different sizes for each arrow, but I am doing something wrong and I am not finding the error. I think it is veryshould be obvious, but I am blind.

w = 1/2 (4 - x)^2; divisions = 20; CargDist = Plot[ w, {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, Epilog -> {Thickness[.004], Arrowheads[#]& /@ Subdivide [0.04, .02, divisions], Arrow[({{#1, (1/2)(4 - #1)^2}, {#1, 0}}&) /@ Subdivide[0, 3.2, divisions]], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]}] 

enter image description here

Arrowheads not scaling according to arrow length

I am looking for a solution to the arrowheads have different sizes for each arrow, but I am doing something wrong and I am not finding the error. I think it is very obvious, but I am blind.

w = 1/2 (4 - x)^2; divisions = 20; CargDist = Plot[ w, {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, Epilog -> {Thickness[.004], Arrowheads[#]& /@ Subdivide [0.04, .02, divisions], Arrow[({{#1, (1/2)(4 - #1)^2}, {#1, 0}}&) /@ Subdivide[0, 3.2, divisions]], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]}] 

enter image description here

How can I scale arrowheads according to arrow length?

I am looking for a solution to the arrowheads have different sizes for each arrow, but I am doing something wrong and I am not finding the error. I think it should be obvious, but I am blind.

w = 1/2 (4 - x)^2; divisions = 20; CargDist = Plot[ w, {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, Epilog -> {Thickness[.004], Arrowheads[#]& /@ Subdivide [0.04, .02, divisions], Arrow[({{#1, (1/2)(4 - #1)^2}, {#1, 0}}&) /@ Subdivide[0, 3.2, divisions]], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]}] 

enter image description here

edited title
Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

Error in the use of the slot Arrowheads not scaling according to arrow length

Improved formatting
Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

I am looking for a solution to the arrowheads have different sizes for each arrow, but I am doing something wrong and I am not finding the error. I think it is very obvious, but I am blind.

w = 1/2 (4 - x)^2;     divisions = 20; CargDist = Plot[ w, {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, Epilog -> {Thickness[.004],   Arrowheads[#] &Arrowheads[#]& /@ Subdivide [0.04, .02, divisions], Arrow[({{#, \!\(TraditionalForm\` \*FractionBox[\(1\)#1, \(2\1/2)]\ \*SuperscriptBox[\((4 - #)\), \(2\)]\#1)^2}, {##1, 0}} &) /@  Subdivide [0Subdivide[0, 3.2, divisions]], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ] 

enter image description here

I am looking for a solution to the arrowheads have different sizes for each arrow, but I am doing something wrong and I am not finding the error. I think it is very obvious, but I am blind.

w = 1/2 (4 - x)^2;    divisions = 20; CargDist = Plot[ w, {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, Epilog -> {Thickness[.004],   Arrowheads[#] & /@ Subdivide [0.04, .02, divisions], Arrow[{{#, \!\(TraditionalForm\` \*FractionBox[\(1\), \(2\)]\ \*SuperscriptBox[\((4 - #)\), \(2\)]\)}, {#, 0}} & /@  Subdivide [0, 3.2, divisions]], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ] 

enter image description here

I am looking for a solution to the arrowheads have different sizes for each arrow, but I am doing something wrong and I am not finding the error. I think it is very obvious, but I am blind.

w = 1/2 (4 - x)^2;   divisions = 20; CargDist = Plot[ w, {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, Epilog -> {Thickness[.004], Arrowheads[#]& /@ Subdivide [0.04, .02, divisions], Arrow[({{#1, (1/2)(4 - #1)^2}, {#1, 0}}&) /@ Subdivide[0, 3.2, divisions]], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]}] 

enter image description here

Source Link
JPeter
  • 1.1k
  • 6
  • 19
Loading