一条曲线上排列着圆点组与箭头组,目前有错位,从左往右偏移量越来越大。每个箭头起点位置如何对准圆?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary {arrows.meta}
\usetikzlibrary{decorations,decorations.pathreplacing}
\usetikzlibrary {decorations.shapes,shapes.geometric}
\usepackage{xfp}
\tikzset{paint/.style={ draw=#1!50!black, fill=#1!80 }, decorate with/.style= {decorate,decoration={shape backgrounds,shape=#1,shape sep=4pt,shape size=1.0mm}}}
\begin{document}
% 定义decoration
\pgfdeclaredecoration{lipidleaflet}{initial}
{\state{initial}[width=\pgfdecoratedpathlength/floor(\pgfdecoratedpathlength/4pt)]
{
\pgfsetarrowsstart{Stealth[gray,inset=0pt, length=4pt, angle'=20]}
\pgfpathmoveto{\pgfpoint{0pt}{10pt}}
\pgfpathlineto{\pgfpoint{0pt}{0pt}}
\pgfusepath{stroke}
}
\state{final}
{\pgfpathmoveto{\pgfpointdecoratedpathlast}
}
}
\begin{tikzpicture}
\draw [decorate, decoration={lipidleaflet}]plot [domain=0:4.25, samples=60] (\x,\fpeval{1/(1+0.0075*10^{\x})});
\draw [blue,line width=1pt]
plot [domain=-0.5:4.5, samples=60] (\x,\fpeval{1/(1+0.0075*10^{\x})});
\draw [decorate, decorate with=circle,paint=yellow]
plot [domain=0:4.25, samples=60] (\x,\fpeval{1/(1+0.0075*10^{\x})});
\end{tikzpicture}
\end{document}
箭头和圆一起画。
\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary {arrows.meta}
\usetikzlibrary{decorations.markings}
\usepackage{xfp}
\tikzset{paint/.style={ draw=#1!50!black, fill=#1!80 },
gray arrow/.style={>={Stealth[gray,inset=0pt, length=4pt, angle'=20]}},
}
\begin{document}
\begin{tikzpicture}
\draw [blue,line width=1pt]
plot [domain=-0.5:4.5, samples=60] (\x,\fpeval{1/(1+0.0075*10^{\x})});
\path [decorate, decoration={markings,
mark=between positions 0 and 1 step 1/30 with{
\draw[->, gray arrow] (0,0)--(0,10pt);
\draw[paint=yellow, line width=.5pt](0,0) circle (.5mm);
}
}] {plot [domain=0:4.25, samples=60] (\x,\fpeval{1/(1+0.0075*10^{\x})})};
\end{tikzpicture}
\end{document}
感谢老师指点,完美解答了我的问题。