这个问题是从 marsupilam 给出的优雅解决方案构建的:
如何绘制该图的其他部分(来自下面给出的 marsupilam 代码),以便新图是一个完整的圆圈,如下所示:
这是他的超级代码:
\documentclass[12pt,tikz,border=2pt]{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
height=15cm,
unit vector ratio = 1 1,
ymin=0,
xmax=1.1,
ymax=1.1,
samples=100,
axis lines=center,
ticks=none,
]
\pgfplotsinvokeforeach{0,...,9}
{
\def\zet{(.1*#1)}
\pgfmathsetmacro{\factor}{\zet/sqrt(1-\zet^2)}
\addplot[data cs=polar,domain=0:.35*sqrt(1-\zet^2)] (180*\x,{exp(-pi*\factor*\x})
node[at end, sloped, anchor=south,font=\tiny, inner sep=0pt] {$\zeta{=}0.#1$};
\addplot[data cs=polar,domain=.35*sqrt(1-\zet^2):sqrt(1-\zet^2)] (180*\x,{exp(-pi*\factor*\x});
}
\pgfplotsinvokeforeach{.1,.2,...,1}
{
\def\a{#1}
\addplot[data cs=polar,domain=0:90] ({180*\a*cos(\x)},{exp(-pi*\a*sin(\x))});
}
\end{axis}
\end{tikzpicture}
\end{document}
答案1
这似乎很有效...
在你询问之前:
- 缺少一行,即
zeta=1
。我建议您手工绘制。 - 我不确定下部的 zeta 值,也许
1/0.9, 1/0.8,
等等?
输出
代码
\documentclass[12pt,tikz,border=2pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usepgfplotslibrary{polar}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
height=15cm,
unit vector ratio = 1 1,
xmin=-1.05,
xmax=1.1,
ymin=-1.1,
ymax=1.1,
samples=100,
%axis lines=center,
%ticks=none,
minor tick num=4,
xtick distance=.25,
ytick distance=.1,
major grid style={thick},
xticklabels={,-1,,-0.5,,0,,0.5,,1},
yticklabels={,0,,0.2,,0.4,,0.6,,0.8,,1},
grid=both,
]
\pgfplotsinvokeforeach{0,...,9}
{
\def\zet{(.1*#1)}
\pgfmathsetmacro{\factor}{\zet/sqrt(1-\zet^2)}
\addplot[data cs=polar,domain=0:.35*sqrt(1-\zet^2)] (180*\x,{exp(-pi*\factor*\x})
node [at end, sloped, anchor=south,font=\tiny, inner sep=0pt, fill=white,]{$\zeta{=}0.#1$};
\addplot[data cs=polar,domain=.35*sqrt(1-\zet^2):sqrt(1-\zet^2)] (180*\x,{exp(-pi*\factor*\x});
\addplot[data cs=polar,domain=0:.35*sqrt(1-\zet^2)] (-180*\x,{exp(-pi*\factor*\x})
node [at end, sloped, anchor=north,font=\tiny, inner sep=2pt, fill=white,]{$\zeta{=}-0.#1$};
\addplot[data cs=polar,domain=.35*sqrt(1-\zet^2):sqrt(1-\zet^2)] (-180*\x,{exp(-pi*\factor*\x});
}
\pgfplotsinvokeforeach{.1,.2,...,1}
{
\def\a{#1}
\addplot[data cs=polar,domain=-90:90] ({180*\a*sin(\x)},{exp(-pi*\a*cos(\x))});
%\addplot[data cs=polar,domain=0:90] ({180*\a*cos(\x)},{exp(-pi*\a*sin(\x))});
}
\end{axis}
\end{tikzpicture}
\end{document}