
대답하려고 할 때Tikz에서 곡선의 일부를 삭제하는 방법은 무엇입니까?intersection segments
, PGFPlots에서 문제가 발생했습니다 fillbetween
. 나는 곡선을 to[out=280,in=175]
제어점과 다른 여러 가지로 변경하려고 했습니다. 나는 항상 같은 결과를 얻습니다.
- 빨간색 L1이 맞는 것 같습니다.
- 녹색 L2는 곡선을 따르지만 끝점이 잘못되었습니다.
- 파란색 L3에는 올바른 끝점이 있지만 곡선을 따르지 않습니다.
내가 도대체 뭘 잘못하고있는 겁니까?
\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}