Tex studio에서 내 출력을 볼 때 45도 라인 패턴이 다음과 같이 렌더링됩니다.
Adobe 또는 Sumatra에서 볼 때 다음과 같은 결과가 나타납니다. 축소해도 나아지지 않고 확대할 때만 더 나아집니다.극도로닫으면 선이 올바르게 렌더링됩니다. 다른 Tikz 라이브러리에서는 이 문제가 발생하지 않았으며 무슨 일이 일어나고 있는지 알 수 없습니다. 다른 사람들도 비슷한 문제를 겪었지만 그들의 해결 방법은 내 상황에 적용되지 않습니다.
여기:
\documentclass{standalone}
\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{calc,matrix,arrows,arrows.meta,decorations.pathmorphing,decorations.markings,math,shapes.misc, positioning, shapes.geometric, intersections, quotes, angles, positioning, patterns, patterns.meta}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\begin{document}
\begin{tikzpicture}[declare function = {
h(\x) = sqrt((2*sin(2*pi*\x/0.02 r))^2);
},
]
\begin{axis}[
clip=false,
title=\large{\textbf{RMS Visualised}},
title style={yshift=7mm,},
xlabel={Time (s)},
ylabel={Voltage (V)},
axis lines = middle,
xmin=0, xmax=.021,
xtick={0,0.01,0.02},
xticklabel style={
/pgf/number format/fixed,
/pgf/number format/precision=2,
},
scaled x ticks=false,
yticklabel=\empty,
xticklabel=\empty,
ytick style={draw=none},
width=0.8\textwidth,
height=0.4\textwidth,
scale=1,
every axis x label/.style={
at={(ticklabel* cs:1.00)},
anchor=west, right=1mm,
},
every axis y label/.style={
at={(ticklabel* cs:1.00)},
anchor=south, above=1mm,
},
samples = 100,
axis line style = {-{Stealth[scale=1.0]}, thick}, %,
every axis plot/.append style={thick},
]
\addplot[color=green, domain=0:0.02]{h(\x)} node[above, pos=0.75] {$\sqrt{V^2}$};
\draw[-, thick, color= violet] (axis cs:0,{2/sqrt(2)}) -- (axis cs:0.02,{2/sqrt(2)}) node[right] {$V_{_{\mathrm{RMS}}}$};
\fill[pattern color=violet, fill opacity=1, pattern={Lines[angle=45, line width=0.8pt, distance= 2mm]}] (axis cs:0,0) rectangle (axis cs:0.02,{2/sqrt(2)});
\end{axis}
\end{tikzpicture}
\end{document}