PROBLEM with SCATTER using DATA CONTROL OF COLOR
Show older comments
Hello,
I want to make a SCATTER PLOT , USING A SECOND ARRAY FOR COLOR CONTROL.
I encounter the PROBLEM of NO COLOR CONTROL by THE SECOND ARRAY, see below the deceptively simple lines of code.
% TTT = vector array ( 1 X 20000 double)
% A = data array ( 100 X 20000 double ) [with many NaN's]
% B = data array ( 100 X 20000 double ) [with many NaN's]
% see ATTACHMENT : mat-file containing T, A, B
% B contains NaN's and STRICTLY POSITIVE numbers (a requirement for color
% control
scatter(T, A, '.'); % Data = T and A only;
% (COLOR IS CONTROLLED BY THE ARRAY A):
% gives the following figure:

% Below is my tentative of a data-driven color control using the array B
scatter(T, A, B,'.');
% the figure obtained is below; No color change has occurred !!!
% (the only significative change is the 'dot' size that is now unexpectedly
% larger. This was not exactly my goal here...)

I DO NOT SUCCEED in getting color control by the array B.
YOUR HELP WILL BE APPRECIATED !!
THANKS,
Accepted Answer
More Answers (0)
Categories
Find more on Scatter Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!