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}