Matlab Scatter Plot Color Scheme -


good evening,
i'm still new matlab (and stack overflow)
i've got set of data want plot "plot" command.
have 9 days of data plot.
preferably each day having it's own color.
after looking online, matlab has 8 pre-built colors, 2 of them being white , yellow. (and yellow doesn't show on white background)
i've looked online , tried passing "color" command rgb combo, breaks well.

i've had resort changing first , last day different shape, works now, isn't presentation worthy. first data point , last data point need own color.
+,x,* represent number of launch occurred day.

attached script.

many in advance. reid

%--------------------------------------------------------   % define model_point array   %--------------------------------------------------------    point_model = [0.0112, 0.2147, 0.295, 0.0356, 0.0912, 0, 0, 0.0738, 0.2143, 0.0798, 0.0169, 0.089, 0, 0, 0.1644, 0.065, 0.2271, 0.0727];    %---------------------------------------------------------   % define model_neighborhood array   %---------------------------------------------------------   neighborhood_model = [0.0573343, 0.422929, 0.609221, 0.667158, 0.820867, 0.580356, 0.487199, 0.56226, 0.325294, 0.249353, 0.184591, 0.214189, 0.159878, 1.07934, 2.48956, 0.26571, 0.470282, 0.221556];  %---------------------------------------------------------   %plotting   %---------------------------------------------------------   plot(point_model(1), neighborhood_model(1), 'rp')   hold on;   plot(point_model(2), neighborhood_model(2), 'r+')   plot(point_model(3), neighborhood_model(3), 'rx')   plot(point_model(4), neighborhood_model(4), 'm+')   plot(point_model(5), neighborhood_model(5), 'mx')   plot(point_model(6), neighborhood_model(6), 'y+')   plot(point_model(7), neighborhood_model(7), 'yx')   plot(point_model(8), neighborhood_model(8), 'y*')   plot(point_model(9), neighborhood_model(9), 'g+')   plot(point_model(10), neighborhood_model(10), 'gx')   plot(point_model(11), neighborhood_model(11), 'c+')   plot(point_model(12), neighborhood_model(12), 'cx')   plot(point_model(13), neighborhood_model(13), 'b+')   plot(point_model(14), neighborhood_model(14), 'bx')   plot(point_model(15), neighborhood_model(15), 'b*')   plot(point_model(16), neighborhood_model(16), 'k+')   plot(point_model(17), neighborhood_model(17), 'kx')   plot(point_model(18), neighborhood_model(18), 'kp')    hold on;   plot(x, y, 'b-')   xlabel('ilw [mm]');   ylabel('ilw [mm]');   title('plot') hold on;   legend('y20150122','y20150129a','y20150129b','y20150211a','y20150211b','y20150313a','y20150313b','y20150313c','y20150317a','y20150317b','y20150320a','y20150320b','y20150325a','y20150325b','y20150325c','y20150326a','y20150326b','y20150423','location','eastoutside') 

thank again!

try

plot(x,y,'x','color', [.9 .8 .7])  %% use [r g b] values in brackets 

edit: note matlab arguments plot commands start capital letter

edit2: note can use marker string 'x' or 'o' without using color.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -