答案1
可能不是完全需要的但无论如何......
\documentclass[tikz,border=5]{standalone}
\usepackage{xxcolor}
\usetikzlibrary{arrows.meta}
\tikzset{pics/cube/.style args={#1 #2 #3 #4}{code={%
\path [#4, fill, draw]
(0,#2,0) coordinate (-top-a) -- (#1,#2,0) coordinate (-top-b) --
(#1,#2,#3) coordinate (-top-c) -- (0,#2,#3) coordinate (-top-d) -- cycle;
\path [#4!75!black, fill, draw]
(#1,0,0) -- (#1,#2,0) -- (#1,#2,#3) -- (#1,0,#3) -- cycle;
\path [#4!50!black, fill, draw]
(0,0,#3) -- (0,#2,#3) -- (#1,#2,#3) -- (#1,0,#3) -- cycle;
}}}
\begin{document}
\begin{tikzpicture}[line join=round, line cap=round,>=Triangle,
x=(330:1cm),y=(90:1cm),z=(210:1cm), axis/.style={ultra thick, ->, draw=black}]
\draw [axis] (0,0,0) -- (8,0,0);
\draw [axis] (0,0,0) -- (0,8,0);
\draw [axis] (0,0,0) -- (0,0,8);
\begin{colormixin}{85!white}
\pic at (0,0,0) {cube={4 1 4 red}};
\pic at (4,0,0) {cube={2 1 2 yellow}};
\pic at (6,0,0) {cube={1 1 1 pink}};
\pic at (0,1,0) {cube={3 2 3 green}};
\pic at (0,0,4) {cube={2 1 3 orange}};
\pic at (0,1,3) {cube={1 1 3 purple}};
\pic (Blue) at (0,3,0) {cube={1 3 1 blue}};
\foreach \i in {a,...,d}
\node [circle, fill=blue!20] at (Blue-top-\i) {$\i$};
\end{colormixin}
\end{tikzpicture}
\end{document}