如何绘制带参数的箱线图

如何绘制带参数的箱线图

我如何使用 tikz 绘制以下内容:

在此处输入图片描述

答案1

一个简单的解决方案pstricks

\documentclass[border=3pt, svgnames]{standalone}
\usepackage{pst-node, auto-pst-pdf}
\usepackage{eqparbox, amssymb}
\usepackage{sansmath} 

\begin{document}

\begin{sansmath}
\sffamily\itshape
    \psset{colsep=1cm, rowsep=1cm, linewidth=0.5pt, arrows=->, arrowinset=0.12, nodesep=2pt, labelsep=2pt}
     \begin{psmatrix}[mnode=R]
     %%% Matrix nodes
      & &[name=w] $w(t)$ \\
    \pnode[0,0.8ex]{S} & [name=H]\fcolorbox{black}{Gold}{\eqmakebox[B]{$ h(t) $}} & \circlenode[linewidth=0.8pt]{C}{$\mathbf + $} & [name=Sa]
     \fcolorbox{black}{Gold}{\eqmakebox[B]{Sampling}} & [name=Eq] \fcolorbox{black}{Gold}{\eqmakebox[B]{Equalizer}} & \pnode[0,0.8ex]{T}
     %%% Connections
    \ncline{w}{C}
\ncline{S}{H}\naput{$\{x_k\}$}
\ncline{H}{C}
\ncline{C}{Sa}\naput{$y(t)$}
\ncline{Sa}{Eq}\naput{$\{y_k\}$}
\ncline{Eq}{T}\naput{$\{\mkern1.5mu\widehat{\mkern-1.5mu x_k}\}$}
     \end{psmatrix}
\end{sansmath}

\end{document} 

在此处输入图片描述

答案2

起点可以是这样的:

\documentclass[tikz,14pt,border=10pt]{standalone}
\usepackage{textcomp}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{positioning}
\begin{document}
    % Definition of blocks:
    \tikzset{%
        block/.style    = {draw, thick, rectangle, minimum height = 1em,
            minimum width = 6em, fill=yellow!30!white,},
        sum/.style      = {draw, circle, node distance = 2cm}, % Adder
        input/.style    = {coordinate}, % Input
        output/.style   = {coordinate} % Output
    }
    % Defining string as labels of certain blocks.
    \newcommand{\suma}{\Large$+$}

    \begin{tikzpicture}[auto, thick, node distance=2cm, >=triangle 45]
    \draw
    % Drawing the blocks of first filter :
    node at (0,0){}
    node [input, name=input1] {} 
    node [block, right = 1cm of input1] (inte2) {$h(t)$}
    node [sum, right = 1cm of inte2] (suma1) {\suma}
    node [input, name=input2, above = 1cm of suma1] {} 
    node [block, right = 1cm of suma1] (inte1) {Sampling}
    node [block, right = 1cm of inte1] (Q1) {Equalizer}
    node [output, name=output1, right = 1cm of Q1] {};
    % Joining blocks. 
    % Commands \draw with options like [->] must be written individually
    \draw[->](input1) -- node {$\{x_k\}$}(inte2);
    \draw[->](inte2) -- node {}(suma1);
    \draw[->](suma1) -- node {$y(t)$} (inte1);
    \draw[->](inte1) -- node {$\{y_k\}$} (Q1);
    \draw[->](Q1) -- node {$\{\hat x_k\}$} (output1);
    \draw[->](input2) -- node {$w(t)$} (suma1);
    \end{tikzpicture}
\end{document}

这将给你:

在此处输入图片描述

从此我希望您可以开始自行编辑和定制它。

相关内容