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

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, ImageSize -> 500, Epilog -> {Thickness[.004], Table[ {Arrowheads[.02 w[u]^.5], Arrow[{{u, w[u]}, {u, 0}}]}, {u, Subdivide[0, 3.2, divisions]}], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did not use a pure function. It is easier to tackle this problem by giving w a conventional function definition.

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, ImageSize -> 500, Epilog -> {Thickness[.004], Table[ {Arrowheads[.02 w[u]^.5], Arrow[{{u, w[u]}, {u, 0}}]}, {u, Subdivide[0, 3.2, divisions]}], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did use a pure function. It is easier to tackle this problem by giving w a conventional function definition.

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, ImageSize -> 500, Epilog -> {Thickness[.004], Table[ {Arrowheads[.02 w[u]^.5], Arrow[{{u, w[u]}, {u, 0}}]}, {u, Subdivide[0, 3.2, divisions]}], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did not use a pure function. It is easier to tackle this problem by giving w a conventional function definition.

added 11 characters in body
Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[ w[x]Plot[w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}},   ImageSize -> 500, Epilog ->   {Thickness[.004],   Table[   {Arrowheads[.02 w[u]^.5],  Arrow[{{u, w[u]}, {u, 0}}]}, {u,  Subdivide[0, 3.2, divisions]}],   EdgeForm[Thick], Opacity[0.2],  Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did use a pure function. It is easier to tackle this problem by givengiving w a conventional function definition.

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[ w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, ImageSize -> 500, Epilog -> {Thickness[.004], Table[ {Arrowheads[.02 w[u]^.5], Arrow[{{u, w[u]}, {u, 0}}]}, {u,  Subdivide[0, 3.2, divisions]}], EdgeForm[Thick], Opacity[0.2],  Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did use a pure function. It is easier to tackle this problem by given w a conventional function definition.

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}},   ImageSize -> 500, Epilog ->   {Thickness[.004],   Table[   {Arrowheads[.02 w[u]^.5],  Arrow[{{u, w[u]}, {u, 0}}]}, {u, Subdivide[0, 3.2, divisions]}],   EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did use a pure function. It is easier to tackle this problem by giving w a conventional function definition.

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

You really just need a better scaling function for the arrowheads. Also, you must scale each arrowhead separately.

w[x_] := 1/2 (4 - x)^2 With[{divisions = 20}, Plot[ w[x], {x, 0, 4}, PlotStyle -> Red, PlotRange -> {{-.25, 4}, {-1.5, 8}}, ImageSize -> 500, Epilog -> {Thickness[.004], Table[ {Arrowheads[.02 w[u]^.5], Arrow[{{u, w[u]}, {u, 0}}]}, {u, Subdivide[0, 3.2, divisions]}], EdgeForm[Thick], Opacity[0.2], Gray, Rectangle[{0, -1}, {4, 0}]} ]] 

plot

Also note that I did use a pure function. It is easier to tackle this problem by given w a conventional function definition.