So verschieben Sie einen Punkt vor eine Achse

Oct 28 2020

Ich versuche eine Animation von Derivaten zu erstellen. Mein Problem ist sehr einfach: Ein Punkt ist hinter der x-Achse versteckt.

Das ist mein Code:

f[x_] := (x - 3)^3 + 2 (x - 3)^2 + 3
h = 0.5
pontoa = {3, f[3]}
pontoax = {3, 0}
pontoh = {3 + 0.5 - h^(1/2), f[3 + 0.5 - h^(1/2)]}
pontohx = {3 + 0.5 - a^(1/2), 0}
pa = Graphics[{PointSize[0.013], RGBColor["#D00202"], Point[pontoa]}]
pax = Graphics[{PointSize[0.01], RGBColor["#D00202"], Point[pontoax]}]
ph = Graphics[{PointSize[0.013], White, Point[pontoh]}]
phx = Graphics[{PointSize[0.01], White, Point[pontohx]}]
tangente = Graphics[{Thick, RGBColor["#1CD176"], InfiniteLine[{pontoa, pontoh}]}]
traçoa = Graphics[{Dashed, Thick, RGBColor["#D00202"], Line[{pontoa, pontoax}]}]
traçoh = Graphics[{Dashed, Thick, White, Line[{pontoh, pontohx}]}]
plotset = {PlotStyle -> {Thickness[0.005], RGBColor["#19A3CD"]}, AxesStyle -> Directive[White, Thickness[0.003]], PlotRange -> {-0.2, 6}, Ticks -> {{1, 2, 3, 4}, {1, 2, 3, 4, 5, 6}}, TicksStyle -> Directive[White, FontSize -> 14, FontColor -> White, FontFamily -> "Roman"], ImageSize -> 1000}
Show[funcao, tangente, traçoa, pa, pax, ph, phx, traçoh, Axes -> True, Evaluate@plotset]

Immerhin werde ich diese Variable h animieren

Dies ist das Bild, das ich generiere:

Siehe den roten Punkt auf der x-Achse. Ich möchte es nach vorne verschieben. Wie kann ich das machen?

Antworten

8 kglr Oct 28 2020 at 14:27

Fügen Sie die Option hinzu Method -> {"AxesInFront" -> False}in Show:

Show[funcao, tangente, traçoa, pa, pax, ph, phx, traçoh, 
  Axes -> True, Background -> Black, Evaluate @ plotset, 
  Method -> {"AxesInFront" -> False}]