我发现了类似的东西,但我不知道如何画一个圆圈和它下面的橙色间隔,以便我可以给它上色。
\documentclass[11pt]{report}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
view={-20}{-20},
axis line style = ultra thick,
axis lines=middle,
zmax=80,
xmax=2,
ymax=2,
height=12cm,
xtick=\empty,
ytick=\empty,
ztick=\empty,
clip=false,
x label style={at={(axis cs:2,0.051)},anchor=north},
xlabel={$y$},
y label style={at={(axis cs:0.05,2)},anchor=north},
ylabel={$x$},
z label style={at={(axis cs:0.075,0,80)},anchor=north},
zlabel={$z$},
]
\addplot3+[domain=0:11*pi,samples=500,samples y=0,black,no marks,ultra thick]
({sin(deg(x))},
{cos(deg(x))},
{6*x/(pi)})
node [circle,scale=0.5,fill,pos=0]{};
\end{axis}
\end{tikzpicture}
\end{document}
请帮忙。
答案1
你已经很接近了。添加圆圈很简单,只需
\draw[ultra thick] (0,0) circle[radius=1];
对于橙色标记,可以使用decorations.markings
。为了方便起见,我添加了样式,重复使用时可以使用/.list
键。
\documentclass[11pt]{report}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{decorations.markings}
\tikzset{arrmark/.style={postaction={decorate,decoration={markings,
mark=at position #1/11-0.1/11 with {\arrow[orange]{<};},
mark=at position #1/11+0.1/11 with {\arrow[orange]{>};}}}}}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
view={-20}{-20},
axis line style = ultra thick,
axis lines=middle,
zmax=80,
xmax=2,
ymax=2,
height=12cm,
xtick=\empty,
ytick=\empty,
ztick=\empty,
clip=false,
x label style={at={(axis cs:2,0.051)},anchor=north},
xlabel={$y$},
y label style={at={(axis cs:0.05,2)},anchor=north},
ylabel={$x$},
z label style={at={(axis cs:0.075,0,80)},anchor=north},
zlabel={$z$},
]
\draw[ultra thick] (0,0) circle[radius=1];
\addplot3+[domain=0:11*pi,samples=500,samples y=0,black,no marks,ultra thick,
arrmark/.list={0.6,2.6,4.6,6.6,8.6,10.6}]
({sin(deg(x))},
{cos(deg(x))},
{6*x/(pi)})
node [circle,scale=0.5,fill,pos=0]{};
\end{axis}
\end{tikzpicture}
\end{document}