4

In I want to make a mind map, with gradually changing colours throughout the mind map. Because usually colours are defined by RGB code, I'd have to use a 3D mind map to make this work.

My mindmap can be found below (this one is 2D though):

\documentclass[landscape]{article}
\usepackage[a2paper]{geometry}
\usepackage[usenames,dvipsnames]{color}
\usepackage{pbox}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\pagenumbering{gobble}
\definecolor{gold}{RGB}{255,215,0}
\definecolor{beetjeblue}{RGB}{65,105,225}
\definecolor{zalmorange}{RGB}{255,160,122}
\definecolor{firebrick}{RGB}{178,34,34}
\definecolor{donker}{RGB}{153,50,204}
\definecolor{dviolet}{RGB}{148,0,211}
\definecolor{ired}{RGB}{205,92,92}
\definecolor{rbrown}{RGB}{188,143,143}
\definecolor{palegreen}{RGB}{154,205,50}
\definecolor{plum}{RGB}{221,160,221}
\definecolor{LSB}{RGB}{135,206,250}
\definecolor{navy}{RGB}{0,0,128}
\definecolor{LB}{RGB}{100,149,237}
\definecolor{navajo}{RGB}{255,222,173}
\definecolor{honey}{RGB}{193,205,193}
\definecolor{darkslate}{RGB}{49,79,79}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}[node distance=1cm, auto]  
\tikzset{
mynode/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=gold!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode2/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=palegreen!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode3/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=beetjeblue!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode4/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=cyan!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode5/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=rbrown!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode6/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=green!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode7/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=ired!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode8/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=firebrick!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode9/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=red!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode10/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=donker!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode11/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=dviolet!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode12/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=yellow!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode13/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=plum!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode14/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=LSB!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode15/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=navy!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode16/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=LB!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode17/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=navajo!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode18/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=honey!50,very thick, inner sep=1em, minimum size=3em, text centered},
mynode19/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=darkslate!50,very thick, inner sep=1em, minimum size=3em, text centered},
myarrow/.style={->, >=latex', shorten >=1pt, thick},
mylabel/.style={text width=7em, text centered} 
}  
\node[mynode12] (geschiedenis) {Westerse geschiedenis};  
\node[below=3cm of geschiedenis] (dummy) {}; 
\node[mynode,below=3cm of geschiedenis] (DT) {Darwins theorie van `Natuurlijke selectie'};
\node[left=3.5cm of dummy] (1) {};  
\node[right=3.5cm of dummy] (2) {};
\node[mynode2,above=6cm of 1] (3) {\pbox{20cm}{Ten tijde van Aristotoles: Teleologie\\in andere woorden: doeloorzakelijkheid}}; 
\node[mynode8,above=6cm of 2] (4) {\pbox{20cm}{In de middeleeuwen: \emph{argument from design}\\Orde in de kosmos en functionele doelmatigheid\\zijn een bewijs voor een intelligente maker}}; 
\node[above=3cm of 3] (dummy2) {}; 
\node[mynode6,left=of dummy2] (31) {Heliocentrisme}; 
\node[mynode6,right=of dummy2] (32) {Geocentrisme}; 
\node[mynode9,above=4.5cm of 4] (41) {Ontwerpargument in de 19$^e$ eeuw aageduidt als `Natuurlijke Theologie'}; 
\node[mynode12,below=13cm of 4] (evoalt) {Andere evolutietheorie\"en};
\node[below=3cm of evoalt] (dummy3) {};
\node[mynode11,left=1cm of dummy3] (lamarck) {\pbox{20cm}{$18^e$ eeuw - Jean-Baptiste de Lamarck:\\Evolutie wordt gestuurd door innerlijk streven}};
\node[mynode13,below=3cm of lamarck] (gebruik) {\pbox{20cm}{Principe van gebruik en onbruik:\\lichaamsdelen intensief worden gebruik treden\\gaandeweg prominent naar voren.}};
\node[mynode13,left=3cm of gebruik] (erfelijkheid) {\pbox{20cm}{Verworven eigenschappen zijn erfelijk}};
\node[mynode3,right=1cm of dummy3] (spencer) {\pbox{20cm}{$19^e$ eeuw - Herbert Spencer:\\Evolutie is een meer algemeen, metafysisch\\principe dan wetenschappelijke hypothese.}};
\node[mynode14,below=3cm of spencer] (eenvoud) {\pbox{20cm}{Niet alleen levende natuur maar hele universum\\zien een ontwikkeling van eenvoud naar veelvoud,\\ van homogeniteit naar heterogeniteit.}};
\node[mynode14,right=3cm of eenvoud] (progontw) {\pbox{20cm}{Progressieve ontwikkeling is\\een natuurlijke wetmatigheid.}};
\node[mynode14,above=8cm of progontw] (socdarwin) {\pbox{20cm}{Vader van het \textbf{sociaal-darwinisme}:\\de gedachte dat we de arme en zwakke\\ medemens niet moeten bijstaan omdat\\dit het natuurlijke evenwicht verstoort.}};
\node[mynode12,left=6cm of DT] (bewijsstukken) {Bewijsstukken evolutietheorie};
\node[mynode15,below=3cm of bewijsstukken] (geologie) {Geologie};
\node[below=1cm of geologie] (dummy4) {};
\node[mynode16,right=1cm of dummy4] (catastrof) {Catastrofisme};
\node[mynode16,left=1cm of dummy4] (uniform) {Uniformitarisme};
\node[mynode15,left=5cm of geologie] (embryo) {Embryologie};
\node[mynode16,below=2cm of embryo] (haeckel) {\pbox{20cm}{Haeckel - recapitulatietheorie\\De ontogenie recapituleert de fylogenie.}};
\node[mynode15,above=3cm of embryo] (vglanatomie) {Vergelijkende anatomie};
\node[left=2cm of vglanatomie] (dummy5) {};
\node[mynode16,above=1cm of dummy5] (homo) {\pbox{20cm}{Homologe eigenschappen: hebben \\\emph{verschillende} functies, maar\\opgebouwd uit \emph{hetzelfde} schema}};
\node[mynode16,below=1cm of dummy5] (ana) {\pbox{20cm}{Analoge eigenschappen: dezelfde functies,\\ maar onafhankelijk ge\"evolueerd.}};
\node[mynode15,above=3cm of vglanatomie] (anatom) {Anatomie};
\node[mynode16,left=3cm of anatom] (rudi) {Rudimentaire organen};
\node[mynode15,above=3cm of bewijsstukken] (pale) {Paleontologie};
\node[mynode16,above=1cm of anatom] (owen) {Richard Owen: fossielen};
\node[mynode15,right=2cm of pale] (bio) {Biogeografie};
\node[mynode16,above=13.5cm of catastrof] (biouitleg) {\pbox{20cm}{Verspreiding van planten\\en niet homogene verspreiding}};

\node[mynode12,right=6cm of DT] (raadsels) {Wat is de drijvende kracht achter de evolutietheorie?};

\node[mynode17, above=.5cm of raadsels] (malthus) {\pbox{20cm}{Malthus: \emph{struggle for existence}\\oorlogen, epidemie\"en en hongersnoden\\doen hun nuttige werk om de populatie weer\\tot levensvatbare omvang terug te brengen.}};

\node[mynode12, below=13cm of 3] (resultaat) {Resultaat};
\node[mynode19, below=1.5cm of haeckel] (neodarwin) {\pbox{20cm}{Het combineren van Darwins theorie\\van natuurlijke selectie en Mendels\\erfelijkheidsleer leidde tot het\\\textbf{Neo-darwinisme}}};
\node[mynode19, right=1.5cm of neodarwin] (drift) {\pbox{20cm}{`Genetische drift': de genetische opmaak\\van een kleine populatie kan door toevals-\\schommelingen sneller veranderen dan die van\\ een grote populatie.}};

\node[mynode18, right=4.5cm of 32] (pangenese) {\pbox{20cm}{Darwins oplossing - \emph{pangenese}:\\Geslachtscellen ontvangen voortdurend informatie\\ over wat er in het lichaam gebeurt, met als basis\\\textbf{Lamarck's erfelijkheidstheorie}.}};
\node[mynode12, below=4.5cm of pangenese] (erf) {Hoe zat het dan met erfelijkheid?};
\node[mynode18, right=2cm of pangenese] (kiem) {\pbox{20cm}{\emph{Weismann} -     \textbf{kiemplastheorie}:\\We moeten onderscheid maken tussen\\geslachtscellen en lichaamscellen.}};
\node[mynode18, below=4.5cm of kiem] (mendel) {\pbox{20cm}{\textbf{\emph{Mendel}'s erfelijkheidstheorie}:\\Onderscheid genotype en fenotype,\\`dominante' en `recessieve' genen.}};

\draw[<-, >=latex', shorten >=2pt, shorten <=2pt, bend right=30, thick] 
(3.south) to node[auto, swap] {}(geschiedenis.north); 
\draw[<-, >=latex', shorten >=2pt, shorten <=2pt, bend left=30, thick] 
(4.south) to node[auto, swap] {}(geschiedenis.north); 
\draw[<-, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(geschiedenis.south) to node[auto, swap] {}(DT.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend left=30] 
(DT.south) to node[auto, swap] {}(evoalt.north); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend right=20, thick] 
(evoalt.south) to node[auto, swap] {}(lamarck.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend left=20, thick] 
(evoalt.south) to node[auto, swap] {}(spencer.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(lamarck.south) to node[auto, swap] {}(gebruik.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend right=10, thick] 
(lamarck.south west) to node[auto, swap] {}(erfelijkheid.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(spencer.south) to node[auto, swap] {}(eenvoud.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend left=30, thick] 
(spencer.east) to node[auto, swap] {}(progontw.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend right=30, thick] 
(spencer.east) to node[auto, swap] {}(socdarwin.south); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend left=30, thick] 
(3.north) to node[auto, swap] {}(31.south); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend right=30, thick] 
(3.north) to node[auto, swap] {}(32.south); 
\draw[<->, >=latex', shorten >=2pt, shorten <=2pt, thick, dashed] 
(31.east) to node[auto, swap] {}(32.west); 
\node[mylabel, above=0cm of dummy2] (label) {versus};
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(4.north) to node[auto, swap] {}(41.south); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend right=30, thick] 
(geologie.west) to node[auto, swap] {}(uniform.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, bend left=30, thick] 
(geologie.east) to node[auto, swap] {}(catastrof.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(DT.west) to node[auto, swap] {}(bewijsstukken.east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(bewijsstukken.south) to node[auto, swap] {}(geologie.north); 
\draw[<->, >=latex', shorten >=2pt, shorten <=2pt, thick, dashed] 
(catastrof.west) to node[auto, swap] {}(uniform.east); 
\node[mylabel, above=0cm of dummy4] (label) {versus};
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(bewijsstukken.south west) to node[auto, swap] {}(embryo.north east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(embryo.south) to node[auto, swap] {}(haeckel.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(bewijsstukken.west) to node[auto, swap] {}(vglanatomie.east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend left=30] 
(vglanatomie.south) to node[auto, swap] {}(ana.east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=30] 
(vglanatomie.north) to node[auto, swap] {}(homo.east); 
\draw[<->, >=latex', shorten >=2pt, shorten <=2pt, thick, dashed] 
(homo.south) to node[auto, swap] {}(ana.north); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(bewijsstukken.north west) to node[auto, swap] {}(anatom.south east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(anatom.west) to node[auto, swap] {}(rudi.east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(bewijsstukken.north) to node[auto, swap] {}(pale.south); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(pale.north west) to node[auto, swap] {}(owen.south east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=30] 
(bewijsstukken.north east) to node[auto, swap] {}(bio.south); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=30] 
(bio.north) to node[auto, swap] {}(biouitleg.south); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(DT.east) to node[auto, swap] {}(raadsels.west); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(raadsels.north) to node[auto, swap] {}(malthus.south); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(DT.north east) to node[auto, swap] {}(erf.south west); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(erf.north) to node[auto, swap] {}(pangenese.south); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=20] 
(erf.north east) to node[auto, swap] {}(kiem.south); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick] 
(erf.east) to node[auto, swap] {} (mendel.west); 

\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=30] 
(DT.south) to node[auto, swap] {}(resultaat.north); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=10] 
(resultaat.west) to node[auto, swap] {}(neodarwin.north east); 
\draw[->, >=latex', shorten >=2pt, shorten <=2pt, thick, bend right=10] 
(resultaat.south west) to node[auto, swap] {}(drift.north east); 


\end{tikzpicture} 
\end{figure}

\end{document}

So the basic idea is that each of the nodes:

mynode/.style={rectangle,rounded corners,draw=black, top color=white, bottom color=gold!50,very thick, inner sep=1em, minimum size=3em, text centered},

has a defined colour (in this case "gold"). I want to automate the colour usage based on the position of the element within the 3D environment/mind map.

So:

  1. position x= amount of Red
  2. position y= amount of Green
  3. position z= amount of Blue
4

Your example is huge, so I cut down the code significantly and I focused on the positioning of the colors in 3D.

In this example I am getting color specification by the \extractcolorspec command from the xcolor package, we are getting e.g. gold -> {rgb}{1,0.84314,0} -> x=5*1=5, y=3*0.84314=2.52942, z=10*0=0 as I limited quadrant from (0,0,0) to (5,3,10). It is working well with rgb, it would need some additional color converting from other colorspaces to rgb, e.g. white and black don't work right away as they are defined in the gray colorspace.

Edit: There are two commands in the code: \catchme and \placeme. Both use \node to place a text. First one uses defined color, the second command uses point.

I enclose the code and a preview of the result, we can use pdf-, xe- and lualatex.

%! *latex mal-colours.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{xcolor}
\usepackage{tikz}
\definecolor{gold}{RGB}{255,215,0}
\definecolor{beetjeblue}{RGB}{65,105,225}
\definecolor{zalmorange}{RGB}{255,160,122}
\definecolor{firebrick}{RGB}{178,34,34}
\definecolor{donker}{RGB}{153,50,204}
\definecolor{dviolet}{RGB}{148,0,211}
\definecolor{ired}{RGB}{205,92,92}
\definecolor{rbrown}{RGB}{188,143,143}
\definecolor{palegreen}{RGB}{154,205,50}
\definecolor{plum}{RGB}{221,160,221}
\definecolor{LSB}{RGB}{135,206,250}
\definecolor{navy}{RGB}{0,0,128}
\definecolor{LB}{RGB}{100,149,237}
\definecolor{navajo}{RGB}{255,222,173}
\definecolor{honey}{RGB}{193,205,193}
\definecolor{darkslate}{RGB}{49,79,79}
\begin{document}
\def\malsep#1#2{\malcoord#2 }
\def\malcoord#1,#2,#3 {%
  \pgfmathparse{#1*\xmax}%
  \let\mred=\pgfmathresult
  \pgfmathparse{#2*\ymax}%
  \let\mgreen=\pgfmathresult
  \pgfmathparse{#3*\zmax}%
  \let\mblue=\pgfmathresult
  }%
\def\catchme#1{%
  \extractcolorspec{#1}{\test}%
  %\typeout{\meaning\test}% Show me the color specification...
  \expandafter\malsep\test
  \node[#1]at(\mred,\mgreen,\mblue){#1};
  }
\def\placeme#1{\malplaceme#1 }
\def\malplaceme#1,#2,#3 {%
  \pgfmathparse{#1/\xmax}%
  \let\xplace=\pgfmathresult
  \pgfmathparse{#2/\ymax}%
  \let\yplace=\pgfmathresult
  \pgfmathparse{#3/\zmax}%
  \let\zplace=\pgfmathresult
  \definecolor{maltemp}{rgb}{\xplace,\yplace,\zplace}%
  \node[maltemp]at(#1,#2,#3){new-color};
  }
\def\xmax{5}
\def\ymax{3}
\def\zmax{10}
\begin{tikzpicture}
\draw[->] (0,0,0)--(\xmax,0,0) node[yshift=-1.5ex,xshift=-3ex] {$x$};
\draw[->] (0,0,0)--(0,\ymax,0) node[yshift=-3ex,xshift=-1ex] {$y$};
\draw[->] (0,0,0)--(0,0,\zmax) node[yshift=2ex,xshift=1ex] {$z$};
\foreach \mcolor in {red, green, blue, gold, beetjeblue, zalmorange, firebrick, donker, dviolet, ired, rbrown, palegreen, plum, LSB, navy, LB, navajo, honey, darkslate} { \catchme{\mcolor} }
\placeme{2,2,2}
\placeme{0,2,8}
\end{tikzpicture} 
\end{document}

mwe, part 1


This is an example with user-defined minimum and maximum points.

%! *latex mal-colours.tex
\documentclass[a4paper]{article}
\pagestyle{empty}
\usepackage{xcolor}
\usepackage{tikz}
\definecolor{gold}{RGB}{255,215,0}
\definecolor{beetjeblue}{RGB}{65,105,225}
\definecolor{zalmorange}{RGB}{255,160,122}
\definecolor{firebrick}{RGB}{178,34,34}
\definecolor{donker}{RGB}{153,50,204}
\definecolor{dviolet}{RGB}{148,0,211}
\definecolor{ired}{RGB}{205,92,92}
\definecolor{rbrown}{RGB}{188,143,143}
\definecolor{palegreen}{RGB}{154,205,50}
\definecolor{plum}{RGB}{221,160,221}
\definecolor{LSB}{RGB}{135,206,250}
\definecolor{navy}{RGB}{0,0,128}
\definecolor{LB}{RGB}{100,149,237}
\definecolor{navajo}{RGB}{255,222,173}
\definecolor{honey}{RGB}{193,205,193}
\definecolor{darkslate}{RGB}{49,79,79}
\begin{document}
\def\malsep#1#2{\malcoord#2 }
\def\malcoord#1,#2,#3 {%
  \pgfmathparse{#1*(\xmax-\xmin)+\xmin}%
  \let\mred=\pgfmathresult
  \pgfmathparse{#2*(\ymax-\ymin)+\ymin}%
  \let\mgreen=\pgfmathresult
  \pgfmathparse{#3*(\zmax-\zmin)+\zmin}%
  \let\mblue=\pgfmathresult
  }%
\def\catchme#1{%
  \extractcolorspec{#1}{\test}%
  %\typeout{\meaning\test}% Show me the color specification...
  \expandafter\malsep\test
  \node[#1]at(\mred,\mgreen,\mblue){#1};
  }
\def\placeme#1{\malplaceme#1 }
\def\malplaceme#1,#2,#3 {%
  \pgfmathparse{(#1-\xmin)/(\xmax-\xmin)}%
  \let\xplace=\pgfmathresult
  \pgfmathparse{(#2-\ymin)/(\ymax-\ymin)}%
  \let\yplace=\pgfmathresult
  \pgfmathparse{(#3-\zmin)/(\zmax-\zmin)}%
  \let\zplace=\pgfmathresult
  \definecolor{maltemp}{rgb}{\xplace,\yplace,\zplace}%
  \node[maltemp]at(#1,#2,#3){new-color};
  }
\def\xmax{5} \def\ymax{3} \def\zmax{10}
\def\xmin{-3} \def\ymin{-2} \def\zmin{-3}
\begin{tikzpicture}
\draw[dotted] (\xmin,\ymin,\zmax)--(\xmin,\ymin,\zmin)--(\xmin,\ymax,\zmin)--(\xmin,\ymax,\zmax)--cycle;
\draw[dotted] (\xmin,\ymin,\zmin)--(\xmin,\ymin,\zmax)--(\xmax,\ymin,\zmax)--(\xmax,\ymin,\zmin)--cycle;
\draw[dotted] (\xmin,\ymin,\zmin)--(\xmin,\ymax,\zmin)--(\xmax,\ymax,\zmin)--(\xmax,\ymin,\zmin)--cycle;
\draw[dashed] (\xmin,0,0)--(0,0,0);
\draw[->] (0,0,0)--(\xmax,0,0) node[yshift=-1.5ex,xshift=-3ex] {$x$};
\draw[dashed] (0,\ymin,0)--(0,0,0);
\draw[->] (0,0,0)--(0,\ymax,0) node[yshift=-3ex,xshift=-1ex] {$y$};
\draw[dashed] (0,0,\zmin)--(0,0,0);
\draw[->] (0,0,0)--(0,0,\zmax) node[yshift=2ex,xshift=1ex] {$z$};
\foreach \mcolor in {red, green, blue, gold, beetjeblue, zalmorange, firebrick, donker, dviolet, ired, rbrown, palegreen, plum, LSB, navy, LB, navajo, honey, darkslate} { \catchme{\mcolor} }
\placeme{2,2,2}
\placeme{0,2,8}
\end{tikzpicture} 
\end{document}

mwe, part 2

  • Very interesting take on the problem. Would this also somehow work the other way? (Define node placement --> color according to placement?) – 1010011010 Apr 13 '14 at 20:21
  • I would be pleased to take a look at it, but you defined the colors in your MWE, so I thought this is it. – Malipivo Apr 13 '14 at 20:27
  • 1
    There is a small problem, I only use defined maximum (5,3,10), but there should also be minimum, now it is (0,0,0), so there is no computation problem in this particular example. – Malipivo Apr 13 '14 at 20:43
  • I think the maximum should be user-defined regardless because aesthetic value of certain maximums between nodes cannot be automated. – 1010011010 Apr 13 '14 at 20:53
  • 2
    It's done, I tried to add a user-defined minimum point (-3,-2,-3). The first example is easier to follow. – Malipivo Apr 13 '14 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.