There is no color property on the Scatter class.

40 views (last 30 days)
I am trying to color my scatter plot but keep getting the folllowing error when I try to define a color code...
I want to plot multple scatters on the same plot so will need to select more colours other than the preset r,g,b,m etc
scatter(Linear_1A.Part_Conc_C1, Linear_1A.Part_Conc_C2,'color',[0,0,1])
Error using scatter (line 130)
There is no color property on the Scatter class.

Accepted Answer

Walter Roberson
Walter Roberson on 3 May 2020
https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primitive.scatter-properties.html
MarkerFaceColor or MarkerEdgeColor or CData
or use scatter(x, y, pointsize, color) positionally

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!