如何指定乳胶中节点的tikz矩阵的大小

如何指定乳胶中节点的tikz矩阵的大小

我有以下代码:

\documentclass[tikz,border=2pt,convert]{standalone}
\usepackage{mathtools}
\usetikzlibrary{
  arrows.meta,
  bbox,
  decorations.pathmorphing,
  ext.shapes.superellipse,
  positioning,
  quotes,
}
\tikzset{
  shorten/.style={shorten <={#1},shorten >={#1}},
  math node/.style={execute at begin node=$, execute at end node=$}}
\begin{document}
\begin{tikzpicture}[scale=1,
    @label/.style n args={4}{"#4{#1}" {#2, inner sep=+.1em},
                             "\vphantom{#1}" {#3, inner sep=+.1em}},
    l/.style={@label={#1}{above}{below}{\mathclap}},
    l'/.style={@label={#1}{below left}{above left}{}},
    >={Triangle[scale=1.33, angle=45:1pt 3]},
    dot/.style={shape=circle, fill=black, draw=none, minimum size=+3pt,
                inner sep=+0pt, outer sep=+0pt, node contents=},
    mat/.style={
      every outer matrix/.append style={thick,shape=ellipse},
      draw=black, fill=gray!30},
    mat line/.style={draw=red},
    snakes/.style={
      decorate, decoration={snake, segment length=#1, amplitude=+.5pt}},
    every label/.append style=math node,every edge quotes/.append style=math node,
    dashed line/.style={dash pattern=on \pgflinewidth off 4\pgflinewidth},
  ]
  \matrix[mat, "\tilde X" right] (upper set) {
    \node (us-q) at (-10mm,0) [dot, l=\tilde f(0)];
    \node (us--q) at (10mm,0) [dot, l=\tilde f(1)];
    \draw[mat line, snakes=3.333mm] (us-q) -- (us--q);
  \\};
  \matrix[mat, "X" right, below=1.5cm of upper set] (lower set) {
    \node (ls-R) at (-10mm,0) [dot, l'=f(0)];
    \node (ls--R) at (10mm,0) [dot, l'= f(1)];
    \draw[mat line, snakes=3.333mm] (ls-R) -- (ls--R);
  \\};
  
  \path[dashed, out=90, in=-90] (ls-R) edge (us-q);
  \path[thick,|->, shorten=2mm] (upper set) edge["p" name=P] (lower set);
  
  \path[shift=(P), xshift=-5cm, |-|] (0,0) edge["I"' name=I] ++(right:1.5cm);
  \path[->, shorten=1mm] (I)
    edge[out=60, in=185, "\tilde f"] (upper set)
    edge[out=45, in=160, "f"]        (lower set);
  \end{tikzpicture} 
\end{document}

这给了我以下输出:

在此处输入图片描述

我想让上部集合大于下部集合。有没有办法指定这样的尺寸?

相关内容