Where to put explanation of figures, in caption or in text? I am writing an article which include some complicated figures. 
These figures are networks with different colored nodes. About these figures, for example, I want to say:
Red nodes show XX, blue nodes indicates to YY, and Yellow nodes show TT.

Currently, I do not know where I should indicate to the details of figures, only in text, only in captions, or in both of them?
Somewhere during my studies I have learnt that a figure and its caption should form a self-contained element. That means, if I isolated a single figure together with its caption from a random publication and gave it to you, you should from those bits of information be able to deduce what this figure is about and what you see there. That does of course not mean, that a physicist must be able to understand the full implications contained in a figure drawn by a chemist or vice versa, but they should be able to understand that "fancy stuff" is in the top left, "other fancy stuff" in the center is indicated with some arrow annotations and a drawn overlay indicates the mechanism that makes them do whatever is interesting.

So in your special case, either make a legend containing the meaning of your different colored nodes or, if that is not possible, describe that in the caption. You can repeat that in the text if you feel it's necessary, but you're not obliged to do so in general. Also, it's no obligation to put into the figure caption the full interpretation of the implications you draw from this figure – this should go to the text. Hence the figure caption could be something like


  Figure 1: Process scheme of the process of doing fancy stuff. Yellow nodes indicate XX, red ones show YY and green ones TT.


In the text, there can then be the interpretation of the figure, for example:


  The process scheme of this is shown in Figure 1. As can be seen from the arrangement of the red, yellow and green nodes, everything is very colourful – which is very good in our case – and the guys at management would love it. However, a closer look at the connection between node "foo" and node "bar" reveals, that there could be some problem in [whatever fancy stuff you want to say]...


TL;DR: Put the stuff that is necessary to understand what's in the figure either directly into the figure (legend) or into the caption. The discussion of the figure can go to the text.