如何更好地绘制这个图形(域间映射)?

如何更好地绘制这个图形(域间映射)?

我正在尝试绘制类似这样的图:

在此处输入图片描述

这是我目前所做的:

在此处输入图片描述

\documentclass{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}
\begin{document}
\begin{tikzpicture}
\draw plot [smooth cycle] coordinates {(5,0.25) (6,0.35) (6.5, 0.2) (7,0.5) (7,1.65) (6.5,2.75) (5.8,2.75) (5.3,1.45) (4.8,0.85) } node at (6,1.7) {$X$};
\path[->] (3.1,1.7) edge [bend left] node[above] {$f$} (5.0,1.7);
\draw plot [smooth cycle] coordinates {(1.0,.1)(1.5,.2)(2.8,.5)(2.9,1.5)(2.8,2.8)(1.4,2.5)(0.5,0.5)} node at (1.8,1.8) {$U$};
\coordinate (O) at (0,0,0);
\draw[thick,->] (O) -- (1,0,0) node[anchor=north east]{$u_2$};
\draw[thick,->] (O) -- (0,1,0) node[anchor=north west]{$u_3$};
\draw[thick,->] (O) -- (0,0,1) node[anchor=south]{$u_1$};

\coordinate (B) at (4,0,0);
\draw[thick,->] (B) -- (5,0,0) node[anchor=north east]{$x_2$};
\draw[thick,->] (B) -- (4,1,0) node[anchor=north west]{$x_3$};
\draw[thick,->] (B) -- (4,0,1) node[anchor=south]{$x_1$};
\end{tikzpicture} 
\end{document}

我不喜欢轴线的质量,也不喜欢轴标签的位置。如果绘图方面有任何改进,我将不胜感激。

答案1

您指的是类似这样的内容吗?arrows.meta除非您想使用新的箭头之一,否则该库并非绝对必要。在这种情况下,请将其替换-{Straight Barb[length=5pt,width=5pt]}->

输出

在此处输入图片描述

代码

\documentclass[margin=10pt]{standalone}
\usepackage{tikz}

\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}
% axes
\coordinate (O) at (0,0,0);
\draw[thick,->] (O) -- (1,0,0) node[anchor=west]{$u_2$};
\draw[thick,->] (O) -- (0,1,0) node[anchor=south]{$u_3$};
\draw[thick,->] (O) -- (0,0,1) node[anchor=north east]{$u_1$};

\coordinate (B) at (4,0,0);
\draw[thick,->] (B) -- (5,0,0) node[anchor=west]{$x_2$};
\draw[thick,->] (B) -- (4,1,0) node[anchor=south]{$x_3$};
\draw[thick,->] (B) -- (4,0,1) node[anchor=north east]{$x_1$};

% plots
\draw plot [smooth cycle] coordinates {(1.0,.1)(1.5,.2)(2.8,.5)(2.9,1.5)(2.8,2.8)(1.4,2.5)(0.5,0.5)} 
        node[circle, fill=black, inner sep=1.5pt, label=below:$U$] (u) at (1.8,1.8) {};
\draw plot [smooth cycle] coordinates {(5,0.25) (6,0.35) (6.5, 0.2) (7,0.5) (7,1.65) (6.5,2.75) (5.8,2.75) (5.3,1.45) (4.8,0.85) } 
        node[circle, fill=black, inner sep=1.5pt, label=below:$X$] (x) at (6,1.7) {};
\draw[-{Straight Barb[length=5pt,width=5pt]}, dashed] (u) edge[out=-20, in=160] node[above] {$f$} (x);
\end{tikzpicture} 
\end{document}

相关内容