我在Matlab中有一個scatterplot,想知道是否有任何方法來改變其中一個點的顏色?更改matlab中特定點的顏色?
0
A
回答
2
你可以繪製圖表,然後重新繪製你想要的點。
% plot the curve or graph
hold on
plot(x,y,'.r')
嘗試hold on
,然後繪製點要以指定顏色(r
),你有興趣(x,y)
。
0
如果你不想覆蓋在第一第二的情節,您可以分別繪製每個點並使用手柄。這樣,您可以稍後在每個點上執行任意更改。
你可以在下面找到一個例子。
% Generate some numbers
x = randn(10,1);
y = randn(10,1);
% Plot each point individually
figure
hold on
for idx = 1 : numel(x)
hdl(idx) = plot(x(idx),y(idx),'marker','.','color','k')
end
% change color, markerstyle, x-position, etc...
hdl(2).Color = [1 0 0]
hdl(3).Marker = 'o'
hdl(5).XData = 1
0
x = rand(10,1) ;
y = rand(10,1) ;
scatter(x,y) ;
[x1,y1] = getpts ;
hold on
plot(x1,y1,'Or') ;
點擊該點,你要在提示時改變顏色。
相關問題
- 1. 更改ImageIcon中的特定顏色
- 2. 更改圖像中的特定顏色
- 3. 更改matlab中圖像的顏色
- 4. 在Matlab中更改polarplot的顏色表?
- 5. 如何在JUNG中更改特定頂點的顏色
- 6. 更改scatterplot vba中特定點的顏色excel
- 7. 更改NavigationDrawer的顏色點擊顏色
- 8. 更改特定行的顏色(TELERIK)
- 9. 如何更改特定JButton的顏色
- 10. 更改特定字符串的顏色
- 11. 更改特定單詞的顏色
- 12. 更改特定字符的顏色
- 13. 更改特定圖標的顏色NavigationDrawer
- 14. jQuery:更改特定的文本顏色
- 15. 更改特定的行顏色uipicker
- 16. 在matlab中更改顏色區域圖
- 17. 如何更改matlab中聚類點的顏色
- 18. 改變MATLAB中特定字符的顏色編輯文本
- 19. 在特定時間後更改顏色
- 20. 動態更改特定顏色
- 21. C#更改背景顏色特定行
- 22. 使用Angular點擊時更改特定圖形的顏色
- 23. 以圖形方式更改特定點的顏色
- 24. 顏色點雲 - Matlab
- 25. 使用RGB將UIStatusBar顏色更改爲特定顏色?
- 26. 更改treeview節點顏色
- 27. 將散點圖3中特定點的顏色更改爲變量
- 28. igraph中的顏色特定節點
- 29. 更改Zest中節點的顏色
- 30. 在MonoTouch中更改UIPageControl點的顏色
該解決方案適合您嗎? – OmG
不,不是真的。它只是在我的觀點中間放一個紅點,我想改變實際點的顏色。 – Lauren
您的可視化有什麼區別? – OmG