Spacing between markers in scatter plot Matlab -


i have 6 scatter plots in 1 figure shown below.

a=rand(10,2);  b=rand(10,2);  c=rand(10,2); figure(); hold on; scatter( 1:10, a(:,1), 'r*'); scatter( 1:10, a(:,2), 'ro');  scatter( 1:10, b(:,1), 'b*');  scatter( 1:10, b(:,2), 'bo');  scatter( 1:10, c(:,1), 'g*');  scatter( 1:10, c(:,2), 'go');  

i wonder if can make spacing between points no 2 points overlay each other. example, on value 1 of x-axis there 6 different points (one representing each scatter plot), i'm wondering how can make each 1 has 1 vertical lane?

so if used stem instead of using scatter you'll see stem lines overlay , makes harder view plot shown below in screenshot. every xtick has 6 stems, , i'm wondering if there anyway can shift 5 of 6 stems little bit appear.

so screenshot of current stems overlaying:

enter image description here

apply small displacement x values?

x = 1:10; y1 = rand(1,10); y2 = rand(1,10); y3 = rand(1,10); %// example data delta = .004; %// displacement step, relative x range x_range = max(x)-min(x); delta = range*delta; hold stem(x-delta, y1, 'o'); stem(x,       y2, '*'); stem(x+delta, y3, 's'); 

example:

enter image description here


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -