您好!plot函数共可以输出8种颜色,如上图所示。
plot函数代表不同颜色的标示符一共有八种:y:黄色;k:黑色;w:白色;b:蓝色;g:绿色**;r:红色;c:亮青色;m:锰紫色;二维绘图函数
plot(X,Y,'linewidth',5) ylim([-1.1 1.1]); % SIMPLER LINE COLOREXAMPLE N = 6; X =linspace(0,pi*3,1000); C =linspecer(N) holdoff; forii=1:N Y =sin(X+2*ii*pi/N); plot(X,Y,'color',C(ii,:),'linewidth',3); hold on; end % COLORMAPEXAMPLE A =rand(15); figure; i...
y,"LineWidth",2,"LineStyle","--")) % 横坐标为x,纵坐标为y,线宽为2,线型为--的折线图 plot(x,y,"LineWidth",2,"LineStyle","--","Color",[0.1,0.2,0.3]) % 横坐标为x,纵坐标为y,线宽为2,线型
The example plot is produced by the following code. figure('color','white'); [x,y,z] = peaks(101); c = gradient(z); k = hypot(x,y)<3; plot3k({x(k) y(k) z(k)}, ... 'Plottype','stem','FontSize',12, ... 'ColorData',c(k),'ColorRange',[-0.5 0.5],'...
cplot(x2,sin(x2),‘FillColor’,[111]*0.6); 将图绘制在指定的坐标轴ax上 cplot(ax,__); 3. cplot函数文件 建议:直接选择添加到路径 添加到路径成文内置函数方便以后直接调用 functionh=cplot(varargin)%函数功能:将曲线与X轴围城的区域进行涂色%函数重载规则(类似plot函数):%cplot(Y);%cplot(X,Y)...
plot(x, y1, x, y2, '--', x, y3, ':') plot(x, y1, x, y2, '--r', x, y3, ':r') line(x,y,'Color','red','LineStyle','--') 默认线宽0.5(磅),推荐设置1、1.5或2,视情况而定。创建基本线条 - MATLAB line - MathWorks 中国 数据点标记 指定绘图中的线和标记的外观 - MATLAB...
1.plot函数 plot函数用于绘制二维平面上的线性坐标曲线图,要提供一组x坐标和对应的y坐标,可以绘制分别以x和y为横、纵坐标的二维曲线。 例: t=0:0.1:2*pi; x=2*t; y=t.*sin(t).*sin(t); plot(x,y); 复制 2. 含多个输入参数的plot函数 ...
% Create a filled contour plot contourf(X, Y, Z) % Change the color map to 'jet' colormap('jet')MATLAB offers many built-in color maps, such as 'parula', 'jet', and 'hsv'. You can also create custom color maps. Hey there! Want to learn more? Cratecode is an online learning...
%% PLot colorbar if specified if colBar==1, c =colorbar('location','WestOutside'); caxis([quantile(Z(:),0.01),quantile(Z(:),0.99)]) else c = []; end %% Outputs nargoutchk(0,2) if nargout==1, varargout{1}=h; elseif nargout==2, varargout{1}=h; varargout{2}=c; end %%%...