add tag
This animation aims at showing the intuition on how these elements would be correlated.


The idea is to have a bunch of vectors whose color will simply change
- blue if  `y>0`
- gray if  `y=0` 
- red if  `y<0`

You can then see the structure of correlation between them is changing whereas the distance between them remains the same.

I am stuck on a loop as you can see in my horrible (manual) code.

%convert -delay 20 -density 100x100 -dispose previous F:/NewOrga/_chap/chap30/_TikZ/TikZCorrelBasket.pdf -coalesce -layers optimize F:/NewOrga/_chap/chap30/_TikZ/TikZCorrelBasket.gif



arr/.style = {draw=#1, -Latex},
dot/.style = {circle, fill, minimum size=#1,
              inner sep=0pt, outer sep=0pt,
              fill=red, node contents={}},
dot/.default = 6pt


	%\draw[help lines,blue!20] (0.5, -4) grid (4.5, 4);
    \useasboundingbox (-0.5,-2) rectangle (4.5,2);

	\node (n0) [dot];

	\foreach \y [count=\i] in {#1} %<- #2 How to I loop on this in  ?
		\draw[arr=red]  (n0) -- (3,(\y/10) node[right] {$\mathsf{{S}_{\i}}$};
		\draw[arr=gray] (n0) -- (3,\y/10) node[right] {$\mathsf{{S}_{\i}}$};
		\draw[arr=blue] (n0) -- (3,\y/10) node[right] {$\mathsf{{S}_{\i}}$};


%Pls don't laugh too loud before you read this uggly code. I tried still uggly

%  \foreach [evaluate={
%   \a  = \x ;
%   \b = \a - 4 ;
%   \c = \b - 4 ;
%   \d = \c - 4 ;
%   }] \x in {12}	

%and tried to play with evaluate=\i as \x using int(\i+6) but no result.



Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.