缺少带有“轴线=中间”的刻度和标签

缺少带有“轴线=中间”的刻度和标签

在所附代码中,我想手动添加xticks,但似乎所有小于的y=0都被忽略且不可见。此外,当我像定位 z 标签时z legend style={at={(0,-0.1,2)},,它会消失。

我无法获得x tick0(参见下面的代码)并且当然,\Sigma标签也被强制在 y>0 侧 / 并且我希望将它放在 x 标签“之下”。

我遗漏了什么?如何“扩大”可见区域?

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\pgfplotsset{compat=newest}% <- set a compat!!
%%%%%%% 
\pgfkeys{/pgf/declare function={argsinh(\x) = ln(\x + sqrt(\x^2+1));}}
\pgfkeys{/pgf/declare function={argcosh(\x) = ln(\x + sqrt(-1 + \x)*sqrt(1 + \x));}}
%%4th order normed low pass, Chebyshev
\pgfkeys{/pgf/declare function={H(\x,\y) = .125297/(sqrt((\x^4-6*\x^2*\y^2+\y^4+.581580*\x^3-1.744740*\x*\y^2+1.169118*\x^2-1.169118*\y^2+.404768*\x+.176987)^2+(4*\x^3*\y-4*\x*\y^3+1.744740*\x^2*\y-.581580*\y^3+2.338236*\x*\y+.404768*\y)^2));}}




\begin{document}

\begin{tikzpicture}
    \begin{axis}[
    axis lines=middle, axis on top,
    axis equal image,
    width=40cm, %%ridi velikost grafu!  
    view={60}{45},  
    xmin=-0.5,
    xmax=0.5,
    ymin=-0.1,
    ymax=2,
    zmin=-0.1,
    zmax=2,             
    miter limit=1,
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    xlabel=$\Sigma$,
    ylabel=$j\Omega$,   
    zlabel=$\mathopen| H(j\Omega)\mathclose|$,  
    xtick = {0},
    xticklabels = {$0$},
    ytick = {.392046688799926,.946484433184241},
    yticklabels = {$\Im(s_4)$,$\Im(s_3)$},
    ztick = {},
    zticklabels = {},   
    ]



    %%pole position as projection
    \addplot3[dotted,black] coordinates {
        (0,.946484433184241,0)
        (-.851703985681571e-1,.946484433184241,0)
        (-.851703985681571e-1,0,0)
    };
    %%standard circle symbol for pole
    \draw[black, thin] (-.851703985681571e-1,.946484433184241,0) circle [radius=0.03];


    %%pole position as projection
    \addplot3[dotted,black] coordinates {
        (0,.392046688799926,0)
        (-.205619531335967,.392046688799926,0)
        (-.205619531335967,0,0)
    };  
    %%standard circle symbol for pole
    \draw[black, thin] (-.205619531335967,.392046688799926,0) circle [radius=0.03];

    %%pole position as projection / vertical lines
    \addplot3[dotted,black] coordinates {        
        (-.205619531335967,.392046688799926,0)
        (-.205619531335967,.392046688799926,1.5)
    };



    \addplot3[
        smooth,     
        surf,
        faceted color=black,
        line width=0.01pt,      
        fill=white,                             
        domain=-0.75:0,
        y domain = 0:1.5,
        samples = 40,
        samples y = 50,
        restrict z to domain*=0:1.5]        
        {H(\x,\y)};

    \addplot3[
        smooth,
        surf,
        faceted color=black,
        line width=0.01pt,      
        fill=white,                             
        domain=-0.4:0,
        y domain = 0:1.2,
        samples = 40,
        samples y = 60,             
        restrict z to domain*=0:1.5]        
        {H(\x,\y)};

    %%pole position as projection / vertical lines
    \addplot3[dotted,black] coordinates {        
        (-.851703985681571e-1,.946484433184241,0)
        (-.851703985681571e-1,.946484433184241,0.85)         
    };  

    %%red characteristics
    \addplot3[domain=0:1.5,samples=70, samples y = 0, red, thick] ({0},{x},{H(0,x)});

    %%ellipse for poles: order 4, eps=1 (3dB]
    \pgfmathsetmacro{\elipseA}{sinh((1/4)*argsinh(1/1))}
    \pgfmathsetmacro{\elipseB}{cosh((1/4)*argsinh(1/1))}
    \draw[thin,dashed,blue] (0,\elipseB,0) arc (90:270:{\elipseA} and {\elipseB});



    \end{axis}
\end{tikzpicture}




\end{document}

在此处输入图片描述

答案1

添加

hide obscured x ticks=false

不隐藏0x 轴的坐标。

要更改轴标签的位置,您可以使用例如。

xlabel style={anchor=east,xshift=-5pt,at={(xticklabel* cs:.95)}}

zlabel style={anchor=north east}

在此处输入图片描述

代码:

\documentclass[border=1cm]{standalone}
\usepackage{pgfplots}% loads also tikz
\usetikzlibrary{calc}
\pgfplotsset{compat=newest}% <- set a compat!!
%%%%%%% 
\pgfkeys{/pgf/declare function={argsinh(\x) = ln(\x + sqrt(\x^2+1));}}
\pgfkeys{/pgf/declare function={argcosh(\x) = ln(\x + sqrt(-1 + \x)*sqrt(1 + \x));}}
%%4th order normed low pass, Chebyshev
\pgfkeys{/pgf/declare function={H(\x,\y) = .125297/(sqrt((\x^4-6*\x^2*\y^2+\y^4+.581580*\x^3-1.744740*\x*\y^2+1.169118*\x^2-1.169118*\y^2+.404768*\x+.176987)^2+(4*\x^3*\y-4*\x*\y^3+1.744740*\x^2*\y-.581580*\y^3+2.338236*\x*\y+.404768*\y)^2));}}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[
    axis lines=middle, axis on top,
    axis equal image,
    width=40cm, %%ridi velikost grafu!  
    view={60}{45},  
    xmin=-0.5,
    xmax=0.5,
    ymin=-0.1,
    ymax=2,
    zmin=-0.1,
    zmax=2,
    miter limit=1,
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    xlabel=$\Sigma$,
    xlabel style={anchor=east,xshift=-5pt,at={(xticklabel* cs:.95)}},% <- position the x label
    ylabel=$j\Omega$,
    zlabel=$\mathopen| H(j\Omega)\mathclose|$,
    zlabel style={anchor=north east},% <- position the z label
    xtick = {0},
    hide obscured x ticks=false,% <- added
    ytick = {.392046688799926,.946484433184241},
    yticklabels = {$\Im(s_4)$,$\Im(s_3)$},
    ztick = \empty
    ]

    %%pole position as projection
    \addplot3[dotted,black] coordinates {
        (0,.946484433184241,0)
        (-.851703985681571e-1,.946484433184241,0)
        (-.851703985681571e-1,0,0)
    };
    %%standard circle symbol for pole
    \draw[black, thin] (-.851703985681571e-1,.946484433184241,0) circle [radius=0.03];

    %%pole position as projection
    \addplot3[dotted,black] coordinates {
        (0,.392046688799926,0)
        (-.205619531335967,.392046688799926,0)
        (-.205619531335967,0,0)
    };  
    %%standard circle symbol for pole
    \draw[black, thin] (-.205619531335967,.392046688799926,0) circle [radius=0.03];

    %%pole position as projection / vertical lines
    \addplot3[dotted,black] coordinates {        
        (-.205619531335967,.392046688799926,0)
        (-.205619531335967,.392046688799926,1.5)
    };

    \addplot3[
        smooth,     
        surf,
        faceted color=black,
        line width=0.01pt,      
        fill=white,                             
        domain=-0.75:0,
        y domain = 0:1.5,
        samples = 40,
        samples y = 50,
        restrict z to domain*=0:1.5]        
        {H(\x,\y)};

    \addplot3[
        smooth,
        surf,
        faceted color=black,
        line width=0.01pt,      
        fill=white,                             
        domain=-0.4:0,
        y domain = 0:1.2,
        samples = 40,
        samples y = 60,             
        restrict z to domain*=0:1.5]        
        {H(\x,\y)};

    %%pole position as projection / vertical lines
    \addplot3[dotted,black] coordinates {        
        (-.851703985681571e-1,.946484433184241,0)
        (-.851703985681571e-1,.946484433184241,0.85)         
    };  

    %%red characteristics
    \addplot3[domain=0:1.5,samples=70, samples y = 0, red, thick] ({0},{x},{H(0,x)});

    %%ellipse for poles: order 4, eps=1 (3dB]
    \pgfmathsetmacro{\elipseA}{sinh((1/4)*argsinh(1/1))}
    \pgfmathsetmacro{\elipseB}{cosh((1/4)*argsinh(1/1))}
    \draw[thin,dashed,blue] (0,\elipseB,0) arc (90:270:{\elipseA} and {\elipseB});
    \end{axis}
\end{tikzpicture}
\end{document}

相关内容