最后结果

最后结果

如何在 Tikz 上制作此图表?

在此处输入图片描述

答案1

只是为了好玩。

为了构建彩色集,我使用了3.1.5b 手册第 646 页中的样式curve to操作(见下文)show curve controls

最后结果

截屏

\documentclass[tikz,border=5mm]{standalone}      

\usetikzlibrary{arrows.meta}                                                         \usetikzlibrary {decorations.pathreplacing,shapes.misc}

% style from manual 3.1.5b page 646
\tikzset{
show curve controls/.style={
decoration={
show path construction,
curveto code={
\draw [blue, dashed]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentsupporta)
node [at end, cross out, draw, solid, red, inner sep=2pt]{};
\draw [blue, dashed]
(\tikzinputsegmentsupportb) -- (\tikzinputsegmentlast)
node [at start, cross out, draw, solid, red, inner sep=2pt]{};
}
},decorate
}
}
\tikzset{>=Stealth,
        every path/.style={very thick},
        every node/.style={font=\bf},
        }
\begin{document}

\begin{tikzpicture}
\begin{scope}% left figure
% set
\fill[orange!50!green!20]%[postaction=show curve controls]
(-1,-1) to[out=0,in=180,out looseness=1.5] 
(2,-2) to [out=0,in=0,in looseness=3,out looseness=2] (1,2)to[out=180,in=180,in looseness=1.5,out looseness=3] 
cycle;
% axis
\node[below left] at(0,0){$0$};
\draw[->] (-3,0)--(5,0)node[below left]{$x$};
\draw[->] (0,-3)--(0,3)node[below left]{$y$};
% circle 
\fill[orange!50!green!40,draw=orange!70] (1.5,1) circle [radius=6mm]node(ab)[inner sep=1.5pt,fill=black,circle]{};
% radius delta
\draw[very thick] (ab.center)--node[below]{$\delta$}+(150:6mm);
% (a,b) and arrow
\node [inner sep=1pt]at (2.6,.3){$(a,b)$} edge[->] (ab);
\end{scope}

% median arrow f
\draw[->] (6,0)--node[above]{$f$}(7,0);

\begin{scope}% right figure
% axis
\draw[->] (8,-3.5)--(8,3.5)node[below left]{$z$};
% central point
\node[circle,fill=blue!60,inner sep=1.5pt,label=right:$L$] (L)at (8,0){};
% brackets
\draw[Bracket-Bracket,draw=blue!60](8,-.8)node[right,xshift=2pt]{$L-\epsilon$}--+(0,1.6)node[right,xshift=2pt]{$L+\epsilon$};
% point 0
\node [inner sep=1.5pt,fill,circle,label=right:$0$] at (8,-3){};
\end{scope}

% blue arrow
\node[fill=blue!60,inner sep=1.5pt,circle,label={above right:$(x,y)$}](xy) at (1.6,1.3){};
\draw[->,blue!60,shorten >=2pt] (xy.center)to[out=-40,in=140] ([yshift=3pt]L.north);
\end{tikzpicture}

\end{document}

“显示曲线控制”样式

截屏

\documentclass[tikz,border=5mm]{standalone}      

\usetikzlibrary{arrows.meta}                                                         \usetikzlibrary {decorations.pathreplacing,shapes.misc}

\tikzset{
show curve controls/.style={
decoration={
show path construction,
curveto code={
\draw [blue, dashed]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentsupporta)
node [at end, cross out, draw, solid, red, inner sep=2pt]{};
\draw [blue, dashed]
(\tikzinputsegmentsupportb) -- (\tikzinputsegmentlast)
node [at start, cross out, draw, solid, red, inner sep=2pt]{};
}
},decorate
}
}

\begin{document}

\begin{tikzpicture}
% set
\fill[orange!50!green!20][postaction=show curve controls]
(-1,-1) to[out=0,in=180,out looseness=1.5] 
(2,-2) to [out=0,in=0,in looseness=3,out looseness=2] (1,2)to[out=180,in=180,in looseness=1.5,out looseness=3] 
cycle;
\end{tikzpicture}
\end{document}

答案2

马查...这是草稿

在此处输入图片描述

它不是很丑,但是一种谨慎的妥协。这是最终的输出...

\documentclass[a4paper,12pt]{article}
\usepackage{newtxtext,newtxmath}

\usepackage{tikz}
\usepackage{graphicx}

\begin{document}
\begin{figure}[h!]


\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        

\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,428); %set diagram left start at 0, and has height of 428

%Shape: Polygon Curved [id:ds8220877533957465] 
\draw  [draw opacity=0][fill={rgb, 255:red, 233; green, 152; blue, 19 }  ,fill opacity=0.58 ] (167.5,111) .. controls (230.5,102) and (304.53,193.74) .. (274.78,248.75) .. controls (245.04,303.76) and (166.5,240) .. (102.5,259) .. controls (38.5,278) and (51.8,237.48) .. (50.5,199) .. controls (49.2,160.52) and (88.39,132.52) .. (106.46,125.56) .. controls (124.53,118.59) and (104.5,120) .. (167.5,111) -- cycle ;
%Shape: Circle [id:dp8053898873122747] 
\draw  [color={rgb, 255:red, 245; green, 166; blue, 35 }  ,draw opacity=1 ][fill={rgb, 255:red, 238; green, 195; blue, 148 }  ,fill opacity=0.81 ][line width=2.25]  (154,178) .. controls (154,164.19) and (165.19,153) .. (179,153) .. controls (192.81,153) and (204,164.19) .. (204,178) .. controls (204,191.81) and (192.81,203) .. (179,203) .. controls (165.19,203) and (154,191.81) .. (154,178) -- cycle ;
%Shape: Axis 2D [id:dp23964265473819646] 
\draw  (114.5,228.4) -- (335.5,228.4)(136.6,79) -- (136.6,245) (328.5,223.4) -- (335.5,228.4) -- (328.5,233.4) (131.6,86) -- (136.6,79) -- (141.6,86)  ;
%Straight Lines [id:da3357919733676149] 
\draw    (171.5,160) -- (176.15,171.7) -- (179,178) ;
%Straight Lines [id:da4494288061260776] 
\draw    (214.5,209) -- (182.75,180.98) ;
\draw [shift={(180.5,179)}, rotate = 401.41999999999996] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (8.93,-4.29) -- (0,0) -- (8.93,4.29) -- cycle    ;
%Shape: Circle [id:dp9447045465938679] 
\draw  [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ,fill opacity=1 ] (175.5,178) .. controls (175.5,176.07) and (177.07,174.5) .. (179,174.5) .. controls (180.93,174.5) and (182.5,176.07) .. (182.5,178) .. controls (182.5,179.93) and (180.93,181.5) .. (179,181.5) .. controls (177.07,181.5) and (175.5,179.93) .. (175.5,178) -- cycle ;
%Shape: Circle [id:dp9143649941039491] 
\draw  [color={rgb, 255:red, 74; green, 144; blue, 226 }  ,draw opacity=1 ][fill={rgb, 255:red, 74; green, 144; blue, 226 }  ,fill opacity=1 ] (205.5,147) .. controls (205.5,145.07) and (207.07,143.5) .. (209,143.5) .. controls (210.93,143.5) and (212.5,145.07) .. (212.5,147) .. controls (212.5,148.93) and (210.93,150.5) .. (209,150.5) .. controls (207.07,150.5) and (205.5,148.93) .. (205.5,147) -- cycle ;
%Curve Lines [id:da6406848194974739] 
\draw [color={rgb, 255:red, 74; green, 144; blue, 226 }  ,draw opacity=1 ]   (209,147) .. controls (249,117) and (275.5,103) .. (307.5,146.5) .. controls (339.02,189.35) and (438.46,170.59) .. (471.06,223.53) ;
\draw [shift={(472.5,226)}, rotate = 241.03] [fill={rgb, 255:red, 74; green, 144; blue, 226 }  ,fill opacity=1 ][line width=0.08]  [draw opacity=0] (8.93,-4.29) -- (0,0) -- (8.93,4.29) -- cycle    ;
%Straight Lines [id:da945916143498928] 
\draw    (375,229) -- (393.5,229) -- (436.5,229) ;
\draw [shift={(439.5,229)}, rotate = 180] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (8.93,-4.29) -- (0,0) -- (8.93,4.29) -- cycle    ;
%Straight Lines [id:da4346631711800999] 
\draw    (482.5,375) -- (482.5,82) ;
\draw [shift={(482.5,79)}, rotate = 450] [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.08]  [draw opacity=0] (8.93,-4.29) -- (0,0) -- (8.93,4.29) -- cycle    ;
%Straight Lines [id:da6125394256824868] 
\draw [color={rgb, 255:red, 74; green, 144; blue, 226 }  ,draw opacity=1 ][line width=1.5]    (482.5,200) -- (482.5,261) ;
\draw [shift={(482.5,261)}, rotate = 270] [color={rgb, 255:red, 74; green, 144; blue, 226 }  ,draw opacity=1 ][line width=1.5]      (6.71,-6.71) .. controls (3.01,-6.71) and (0,-3.7) .. (0,0) .. controls (0,3.7) and (3.01,6.71) .. (6.71,6.71) ;
\draw [shift={(482.5,200)}, rotate = 90] [color={rgb, 255:red, 74; green, 144; blue, 226 }  ,draw opacity=1 ][line width=1.5]      (6.71,-6.71) .. controls (3.01,-6.71) and (0,-3.7) .. (0,0) .. controls (0,3.7) and (3.01,6.71) .. (6.71,6.71) ;
%Shape: Circle [id:dp315010153312669] 
\draw  [color={rgb, 255:red, 74; green, 144; blue, 226 }  ,draw opacity=1 ][fill={rgb, 255:red, 74; green, 144; blue, 226 }  ,fill opacity=1 ] (479,230.5) .. controls (479,228.57) and (480.57,227) .. (482.5,227) .. controls (484.43,227) and (486,228.57) .. (486,230.5) .. controls (486,232.43) and (484.43,234) .. (482.5,234) .. controls (480.57,234) and (479,232.43) .. (479,230.5) -- cycle ;
%Shape: Circle [id:dp3707564917209931] 
\draw  [fill={rgb, 255:red, 0; green, 0; blue, 0 }  ,fill opacity=1 ] (479,333.5) .. controls (479,331.57) and (480.57,330) .. (482.5,330) .. controls (484.43,330) and (486,331.57) .. (486,333.5) .. controls (486,335.43) and (484.43,337) .. (482.5,337) .. controls (480.57,337) and (479,335.43) .. (479,333.5) -- cycle ;

% Text Node
\draw (115,73) node [anchor=north west][inner sep=0.75pt]    {$y$};
% Text Node
\draw (164,165.4) node [anchor=north west][inner sep=0.75pt]    {$\delta $};
% Text Node
\draw (315,230.4) node [anchor=north west][inner sep=0.75pt]    {$x$};
% Text Node
\draw (118,209.4) node [anchor=north west][inner sep=0.75pt]    {$O$};
% Text Node
\draw (216,200.4) node [anchor=north west][inner sep=0.75pt]    {$(a,b)$};
% Text Node
\draw (166,123.4) node [anchor=north west][inner sep=0.75pt]    {$(x,y)$};
% Text Node
\draw (396,203.4) node [anchor=north west][inner sep=0.75pt]    {$f$};
% Text Node
\draw (486,333.4) node [anchor=north west][inner sep=0.75pt]    {$O$};
% Text Node
\draw (500,187.4) node [anchor=north west][inner sep=0.75pt]    {$L-\epsilon $};
% Text Node
\draw (501,253.4) node [anchor=north west][inner sep=0.75pt]    {$L+\epsilon $};
% Text Node
\draw (501,221.4) node [anchor=north west][inner sep=0.75pt]    {$L$};
% Text Node
\draw (490,76.4) node [anchor=north west][inner sep=0.75pt]    {$z$};
% Text Node
\draw (84,167.4) node [anchor=north west][inner sep=0.75pt]    {$D$};
\end{tikzpicture}
\caption{A picture for you!}
\end{figure}


\end{document}

在此处输入图片描述

相关内容