www.gsyw.net > mAtlAB画散点图连线

mAtlAB画散点图连线

一般有两种方法 一、scatter1.scatter(X,Y) X和Y是数据向量,以X中数据为横坐标,以Y中数据位纵坐标描绘散点图,点的形状默认使用圈.例子:X = [1:10]; Y = X + rand(size(X)); scatter(X, Y)2.scatter(,'filled') 描绘实心点.3.scatter3(x,y,z) 描绘

clc,clear;x1=1:1:9;y1=(25635+45.*x1)./(700000+432.5.*x1);plot(x1,y1,'-b.')hold onz1=[1 2 3 4 5 6 7 8 9];%要标注的散点for i=1:9text(x1(:,i),y1(:,i),num2str(z1(:,i)))end excel相关问题到www.excel2007.com

3维散点?用plot3命令.格式plot3(x,y,z,'.');最后那个参数'.'很重要,否则就连线了.x,y,z分别是你的散点的xyz坐标的向量.

y中第4个数值是不是打错了,改了下:clc,clear x=[11.9,11.5,14.5,15.2,15.9,16.3,14.6,12.9,15.8,14.1]; y=[196.84,196.84,197.14,197.03,197.05,197.13,197.04,196.96,196.95,196.98]; plot(x,y,'.')

plot(x,y, '.-', 'MarkerSize',10)用这个命令就可以

mathematicaListLinePlot[ {{1, 2}, {0, 4}, {3, 9}} ]

X=[-295500 -295500 ]Y=[230677 277922 ]plot(X,Y,'.')

用 plot 就可以啊例:clc;clear;x=1:1:5;y=[0.8,0.9,0.8,0.6,0.7];figure(1)set (gcf,'Position',[360,278,560,420], 'color','w');plot(x,y,'-o','LineWidth',2,'MarkerSize',8);axis([1,5,0.5,1]);

用Matlab画散点图程序示例:clc; clear; x=[7.0 10.5 13.0 17.5 34.0 40.5 44.5 48.0 56.0 61.0 68.5 76.5 80.5 91.0 96 101 104 106.5 111.5 118 123.5 136.5 142 146 150 157 158]; y1=[44 45 47 50 50 38 30 30 34 36 34 41 45 46 43 37 33 28 32

plot(X,Y,'o') %%% 这样就只画散点,不画线了

网站地图

All rights reserved Powered by www.gsyw.net

copyright ©right 2010-2021。
www.gsyw.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com