What is the best solution/way to create a very simple scatter diagram with a colorbar.
My input should be a .txt file with 3 columns -> x – coordinate, y – coordiante and value for filling the dots with color. I have found a simple code but the color information is a little bit different.
I want this color input "colors = [212 34 45 12 5]" not colors = ['r' 'g' 'b' 'y' 'c']. Is an other code better? Thank you.
X = [1 2 3 8 1]Y = [5 4 5 1 5]%color = [212 34 45 12 5]
fig = figure;colors = ['r' 'g' 'b' 'y' 'c']hold on;for i=1:5 scatter(X(i), Y(i), 'LineWidth',10,'MarkerFaceColor',colors(i))endhold off;resp = fig2plotly(fig)plotly_url = resp.url;
Best Answer