所以我试图制作一个类似这样的图
这是我目前所拥有的:
- 我怎样才能制作出类似抛物线的形状(蓝色)?
如何进行颜色叠加?
\documentclass[tikz,border=2mm]{standalone} \begin{document} \tikzset{>=latex} \begin{tikzpicture} \shade[top color=orange!30!white,bottom color=orange!30!white] (0,0.5) parabola (0.9,2.7) |- (0,2.7); \shade[top color=orange!30!white,bottom color=orange!30!white] (0,0.5) parabola (-0.9,2.7) |- (0,2.7); \draw[->=stealth, thick] (0,0)--(2.5,0) node[right] {$g_\uparrow\left(E\right)$}; \draw[->=stealth, thick] (0,0)--(-2.5,0) node[left] {$g_\downarrow\left(E\right)$}; \draw[->=stealth, thick] (0,-2)--(0,4) node[above]{$E$}; \draw (0,0.5) parabola (1,3.2); \draw (1.7,2.7) -- (0,2.7); \draw (0,0.5) parabola (-1,3.2); \draw (-1.7,2.7) -- (0,2.7); \node[] at (2.1,2.7) {$E_F$}; \end{tikzpicture} \end{document}
答案1
请参阅我尝试解决您的问题后的以下结果:-)
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}[>=stealth]
\fill[red!30!white]
(-0.9,2.7) parabola bend (0,0.5) (0.9,2.7) -- cycle;
\draw (-1.0,3.2) parabola bend (0,0.5) (1.0,3.2);
%
\draw[<->,thick]
(-2.5,0) node[left] {$g_\uparrow\left(E\right)$} --
( 2.5,0) node[right] {$g_\downarrow\left(E\right)$};
\draw[->, thick] (0,-2)--(0,4) node[above]{$E$};
\draw (-1.7,2.7) -- (1.7,2.7) node[right] {$E_F$};
%
\draw[fill=blue!50,semitransparent,rotate=90, xshift=17mm]
(-0.8,0) parabola bend (0,-1) (0.8,0) -- cycle;
\clip (0,2.7) rectangle +(-1,-1.6);
\draw[fill=blue!50,semitransparent,rotate=90, xshift=25mm]
(-0.8,0) parabola bend (0,1) (0.8,0) -- cycle;
\end{tikzpicture}
\end{document}