我有三个立方体,我用 tikz 图片来画它们。现在,
- 我怎样才能使这个图形的颜色更加突出?
- 我使用
\begin{tikzpicture}[t][tdplot_main_coords]
它来绘制图像,结果是可以接受的,但是文件有错误。改用`\begin{tikzpicture}[tdplot_main_coords]',错误得到纠正,但是图像显示更改为不正确。我该如何处理这个问题?
我的代码是:
和
[t]
\documentclass[reqno]{amsart} \usepackage{subfigure} \usepackage{amsfonts} \usepackage{newlfont} \usepackage[centertags]{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{plain} \usepackage{mathrsfs} \usepackage{makecell} \usepackage{enumerate} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{calc} \begin{document} \tdplotsetmaincoords{80}{125} %perspective angles \begin{figure} \centering \begin{tikzpicture}[t][tdplot_main_coords] \coordinate (o) at (0,0,0); \draw[fill=blue!5] (0,0,2) -- (0,2,2) -- (2,2,2) -- (2,0,2) -- cycle; \draw[fill=blue!5] (2,0,0) -- (2,0,2) -- (2,2,2) -- (2,2,0) -- cycle; \draw[fill=blue!5] (0,2,2) -- (0,2,0) -- (2,2,0) -- (2,2,2) -- cycle; \node (A) at (0.68,0.68,1) {\Huge H}; \draw[very thick, ->, dotted] (2,1,1) -- node[midway,above]{$\dfrac{dN}{dt}$}(3.6,1,1); \draw[fill=yellow!5] (4,2,2) -- (4,2,0) -- (6,2,0) -- (6,2,2) -- cycle; \draw[fill=yellow!5] (6,0,0) -- (6,0,2) -- (6,2,2) -- (6,2,0) -- cycle; \draw[fill=yellow!5] (6,0,2) -- (4,0,2) -- (4,2,2) -- (6,2,2) -- cycle; \draw[very thick, ->, dotted] (6,1,1) -- node[midway,above]{$\dfrac{dR}{dt}$}(7.6,1,1); \node (A) at (4.68,0.68,1) {\Huge N}; \draw[fill=red!5] (8,2,2) -- (8,2,0) -- (10,2,0) -- (10,2,2) -- cycle; \draw[fill=red!5] (10,0,0) -- (10,0,2) -- (10,2,2) -- (10,2,0) -- cycle; \draw[fill=red!5] (10,0,2) -- (8,0,2) -- (8,2,2) -- (10,2,2) -- cycle; \node (A) at (8.68,0.68,1) {\Huge R}; \end{tikzpicture} \caption{pic adel} \label{figfarid} \end{figure} \end{document}
无 [t]
\documentclass[reqno]{amsart} \usepackage{subfigure} \usepackage{amsfonts} \usepackage{newlfont} \usepackage[centertags]{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{plain} \usepackage{mathrsfs} \usepackage{makecell} \usepackage{enumerate} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{calc} \begin{document} \tdplotsetmaincoords{80}{125} %perspective angles \begin{figure} \centering \begin{tikzpicture}[tdplot_main_coords] \coordinate (o) at (0,0,0); \draw[fill=blue!5] (0,0,2) -- (0,2,2) -- (2,2,2) -- (2,0,2) -- cycle; \draw[fill=blue!5] (2,0,0) -- (2,0,2) -- (2,2,2) -- (2,2,0) -- cycle; \draw[fill=blue!5] (0,2,2) -- (0,2,0) -- (2,2,0) -- (2,2,2) -- cycle; \node (A) at (0.68,0.68,1) {\Huge H}; \draw[very thick, ->, dotted] (2,1,1) -- node[midway,above]{$\dfrac{dN}{dt}$}(3.6,1,1); \draw[fill=yellow!5] (4,2,2) -- (4,2,0) -- (6,2,0) -- (6,2,2) -- cycle; \draw[fill=yellow!5] (6,0,0) -- (6,0,2) -- (6,2,2) -- (6,2,0) -- cycle; \draw[fill=yellow!5] (6,0,2) -- (4,0,2) -- (4,2,2) -- (6,2,2) -- cycle; \draw[very thick, ->, dotted] (6,1,1) -- node[midway,above]{$\dfrac{dR}{dt}$}(7.6,1,1); \node (A) at (4.68,0.68,1) {\Huge N}; \draw[fill=red!5] (8,2,2) -- (8,2,0) -- (10,2,0) -- (10,2,2) -- cycle; \draw[fill=red!5] (10,0,0) -- (10,0,2) -- (10,2,2) -- (10,2,0) -- cycle; \draw[fill=red!5] (10,0,2) -- (8,0,2) -- (8,2,2) -- (10,2,2) -- cycle; \node (A) at (8.68,0.68,1) {\Huge R}; \end{tikzpicture} \caption{pic adel} \label{figfarid} \end{figure} \end{document}
答案1
我不确定你期望这个t
选项能做什么,但要改变图形的视图,玩弄数字
\tdplotsetmaincoords{80}{125}
至于颜色,这些是在\draw
命令中指定的,例如fill=blue!5
。语法<color>!N
意味着颜色与白色混合(我认为),N
指定颜色的百分比,其余为白色。因此,blue!5
您得到 5% 蓝色,95% 白色。
我不知道您所说的突出具体是什么意思,但您可以例如增加蓝色、黄色和红色的百分比。例如:
\documentclass[reqno]{amsart}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{80}{155} %perspective angles
\begin{figure}
\centering
\begin{tikzpicture}[tdplot_main_coords]
\coordinate (o) at (0,0,0);
\draw[fill=blue!25] (0,0,2) -- (0,2,2) -- (2,2,2) -- (2,0,2) -- cycle;
\draw[fill=blue!25] (2,0,0) -- (2,0,2) -- (2,2,2) -- (2,2,0) -- cycle;
\draw[fill=blue!25] (0,2,2) -- (0,2,0) -- (2,2,0) -- (2,2,2) -- cycle;
\node (A) at (0.68,0.68,1) {\Huge H};
\draw[very thick, ->, dotted] (2,1,1) -- node[midway,above]{$\dfrac{dN}{dt}$}(3.6,1,1);
\draw[fill=yellow!25] (4,2,2) -- (4,2,0) -- (6,2,0) -- (6,2,2) -- cycle;
\draw[fill=yellow!25] (6,0,0) -- (6,0,2) -- (6,2,2) -- (6,2,0) -- cycle;
\draw[fill=yellow!25] (6,0,2) -- (4,0,2) -- (4,2,2) -- (6,2,2) -- cycle;
\draw[very thick, ->, dotted] (6,1,1) -- node[midway,above]{$\dfrac{dR}{dt}$}(7.6,1,1);
\node (A) at (4.68,0.68,1) {\Huge N};
\draw[fill=red!25] (8,2,2) -- (8,2,0) -- (10,2,0) -- (10,2,2) -- cycle;
\draw[fill=red!25] (10,0,0) -- (10,0,2) -- (10,2,2) -- (10,2,0) -- cycle;
\draw[fill=red!25] (10,0,2) -- (8,0,2) -- (8,2,2) -- (10,2,2) -- cycle;
\node (A) at (8.68,0.68,1) {\Huge R};
\end{tikzpicture}
\caption{pic adel}
\label{figfarid}
\end{figure}
\end{document}