[英]Plotting points while plotting vectors : Matlab
我需要制作一個只有點的情節,並嘗試類似的東西
plot(x,y)
其中x
和y
是向量:點的集合。
我不希望matlab本身連接這些點。 我想繪制好像用繪圖一樣
for loop
plot;hold on;
end
我試過了
plot(x,y,'.');
但這給了我太厚的分數。
我不想使用forloop,因為它耗時。 這需要很多時間。
你幾乎就在那里,只需更改MarkerSize屬性:
plot(x,y,'.','MarkerSize',1)
嘗試:
plot(x,y,'*');
要么
plot(x,y,'+');
您可以查看文檔: http : //www.mathworks.nl/help/matlab/creating_plots/using-high-level-plotting-functions.html
幫助分散
IIRC:其中S是散點的大小:散射(x,y,S)
您可以嘗試避免使用循環的這段代碼。 創建的繪圖沒有行,但是對應於矩陣x
和y
每列的不同顏色的標記。
%some data (matrix)
x = repmat((2:10)',1,6);
y = bsxfun(@times, x, 1:6);
set(0,'DefaultAxesColorOrder', jet(6)); %set the default matlab color
figure('Color','w');
plot(x,y,'p'); %single call to plot
axis([1 11 0 70]);
box off;
legend(('a':'f')');
這給了
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.