
Beim Versuch zu antwortenWie lösche ich einen Teil einer Kurve in Tikz?, ich hatte Probleme mit intersection segments
PGFPlots . Ich habe versucht, die Kurve von in Kontrollpunkte und verschiedene andere Dinge fillbetween
zu ändern . Ich bekomme immer das gleiche Ergebnis:to[out=280,in=175]
- rotes L1 scheint richtig.
- grün L2 folgt der Kurve, hat aber einen falschen Endpunkt.
- Blau L3 hat korrekte Endpunkte, folgt aber nicht der Kurve.
Was mache ich falsch?
\documentclass[tikz, border=1cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\draw[name path=curve] (0.3,5) to[out=280,in=175, looseness=0.92] (5.5,0.5); %a curve
%\draw[name path=curve] (0.3,5) .. controls (1,1) and (2,0) .. (5.5,0.5); %alternative curve
\draw[name path=line] (0,4.1) -- (4.1,0);
\draw[red, ultra thick, opacity=0.5, smooth, intersection segments={of=curve and line, sequence={L1}}];
\pgfgetlastxy{\XCoord}{\YCoord}
\draw (\XCoord,\YCoord) circle (1pt);
\draw[green, ultra thick, opacity=0.5, smooth, intersection segments={of=curve and line, sequence={L2}}];
\pgfgetlastxy{\XCoord}{\YCoord}
\draw (\XCoord,\YCoord) circle (1pt);
\draw[blue, ultra thick, opacity=0.5, smooth, intersection segments={of=curve and line, sequence={L3}}];
\pgfgetlastxy{\XCoord}{\YCoord}
\draw (\XCoord,\YCoord) circle (1pt);
\end{tikzpicture}
\end{document}