答案1
您可以繪製參數圖。在這種情況下,我發現將所有權力應用於一個更容易,例如x
,坐標,
\draw[orange,ultra thick] plot[domain=-4:4,smooth] ({sign(\x)*pow(abs(\x),5/3)/2.5},\x);
因為更容易確定域。$x_2^5=x_1^3$
坐在一個非常特殊的座標上。 ;-)
\documentclass[tikz,border=3mm]{standalone}
\usepackage{dsfont}
\begin{document}
\begin{tikzpicture}[>=stealth]
\path[left color=white,right color=green] plot[domain=-4:4,smooth]
({sign(\x)*pow(abs(\x),5/3)/2.5},\x) -| cycle;
\draw (-4,-4) rectangle (4,4);
\draw[orange,ultra thick] plot[domain=-4:4,smooth]
({sign(\x)*pow(abs(\x),5/3)/2.5},\x);
\draw[->] (-4,0) -- (4,0) node[right]{$\mathds{R}$};
\draw[->] (0,-4) -- (0,4) node[above]{$\mathds{R}$};
\draw[very thick,blue,->] (0,0)
node[circle,draw,fill,black,inner sep=2pt,label={[black,inner sep=1pt]above left:{$\bar x=(0,0)$}}]{}
-- (2,0) node[above]{$\mathcal{N}_S^P(x)=\emptyset$}
node[below,black]{$\mathcal{N}_S^C(x)$};
\path (2.2,2.020) % Groundhog day!
node{$x_2^5=x_1^3$} (-3,2.5) node{$\mathcal{S}$};
\end{tikzpicture}
\end{document}
附錄:由於這是已標記的pgfplots
,因此這裡是一個使用的版本pgfplots
。它還使用clip
圓角,如下所示黑溫和的回答(+1)。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepackage{dsfont}
\begin{document}
\begin{tikzpicture}[>=stealth]
\begin{axis}[hide axis,width=9cm,height=9cm,domain=-1:1,clip mode=individual]
\begin{scope}
\draw[rounded corners,clip] (-1,-1) rectangle (1,1);
\path[left color=white,right color=green] plot[domain=-1:1,smooth]
({pow(\x,5)},{pow(\x,3)}) -| cycle;
\addplot[orange,ultra thick,smooth] (x^5,x^3) ;
\end{scope}
\draw[very thick,blue,->] (0,0)
node[circle,draw,fill,black,inner sep=2pt,label={[black,inner sep=1pt]above left:{$\bar x=(0,0)$}}]{}
-- (0.5,0) node[above]{$\mathcal{N}_\mathcal{S}^P(x)=\emptyset$}
node[below,black]{$\mathcal{N}_\mathcal{S}^C(x)$};
\path (0.55,0.5) node{$x_2^5=x_1^3$} (-0.75,0.6) node{$\mathcal{S}$};
\draw[->] (-1,0) -- (1,0) node[right]{$\mathds{R}$};
\draw[->] (0,-1) -- (0,1) node[above]{$\mathds{R}$};
\end{axis}
\end{tikzpicture}
\end{document}
答案2
我使用曲線的參數形式x1=t^5,x2=t^3
,在圓角正方形內進行剪輯[-1,1]^2
,並縮放整個圖片。
\documentclass[tikz,border=5mm]{standalone}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}[scale=4]
\begin{scope}\clip[rounded corners] (-1,-1) rectangle (1,1);
\def\gr{plot[variable=\t,domain=-1:1] (\t^5,\t^3)}
\fill[left color=white,right color=green] \gr|-(-1,1)|-cycle;
\draw[orange,smooth,very thick] \gr;
\draw[rounded corners](-1,-1) rectangle (1,1);
\draw[-stealth,blue,very thick] (0,0)--(.5,0)
node[above]{$\mathcal{N}^P_{\mathcal{S}} (\bar{x})=\emptyset$}
node[below,black]{$\mathcal{N}^C_{\mathcal{S}} (\bar{x})$};
\fill (0,0) circle(.8pt) node[above left]{$\bar{x}=(0,0)$};
\end{scope}
\draw[->] (-1,0)--(1,0) node[right]{$\mathbb{R}$};
\draw[->] (0,-1)--(0,1) node[above]{$\mathbb{R}$};
\path
(.7,.5) node{$x_2^5=x_1^3$}
(-.7,.5) node{$\mathcal{S}$};
\end{tikzpicture}
\end{document}
答案3
為了好玩,pstricks
解決方案:
\documentclass[svgnames, x11names,border=6pt]{standalone}%
\usepackage{amssymb}
\usepackage{pst-grad, pst-plot, auto-pst-pdf}%
\begin{document}
\psset{xunit=1.3, yunit=2, arrowinset=0.12, algebraic, plotstyle=curve, plotpoints=200, labelFontSize=\scriptstyle}%
\begin{pspicture}(-4.66, -2.53)(5,2.53)%
\psset{linecolor=IndianRed}%
\pscustom[linestyle=none, fillstyle=gradient, gradangle=240,gradbegin=MistyRose, gradend=White, gradmidpoint= 1]{\psline(-4.66,2.53)(-4.66,-2.53) \parametricplot{-1.36}{1.36}{t^5|t^3}\psline(4.66,2.53)(-4.66,2.53)}
\psaxes[linecolor=LightSteelBlue3, ticks=none, labels=none]{->}(0,0)(-4.66,-2.53)(5,2.53)[$x_1$, -120][$x_2$, -135]
\parametricplot[plotpoints=400, linewidth=1.5pt]{-1.36}{1.36}{t^5|t^3}
\psline[linewidth = 1.5pt, linecolor=Navy]{*->}(0,0)(1.5,0)
\uput[u](1.5,0){\color{RoyalBlue}$\mathcal{N}^{P}_{\mathcal{S}}(\bar {x}) = \varnothing$}
\uput[d](1.5,0){$\mathcal{N}^{C}_{\mathcal{S}}(\bar {x})$}
\uput[ul](0,0){$\bar{x}=(0,0)$}
\rput(-3.2,1.6){$\mathcal{S}$}
\rput{35}(2.6,1.6){$x_1^5 = x_2^3$}
\end{pspicture}
\end{document}