MATLAB drawing related operations

axis([x_min,x_max,y_min,y_max]) % set the axis range

set(gca,'XTick',[-1:0.2:1]) % set coordinate scale

xlabel('x-axis data');
ylabel('y-axis data');

title('Title');

legend('Legend 1','Legend 2')

% Remove the legend border
legend boxoff; % method 2

% Set the peripheral color of the drawing
set(gcf, 'Color', [1,1,1])

  1. Set the upper and lower limits of the coordinate axis: axis([xmin,xmax,ymin,ymax]);

  2. Set image size: set(gcf,'Position',[x1,y1,dx,dy]);

  3. Related settings of the legend:
    font and size in the legend: legend('FontName','Times New Roman','FontSize',7,LineWidth',1.5); each quantity and
    position in the legend: legend('y','zc ','location','SouthEast');

  4. Related settings of the name of the coordinate axis:
    The name, font and size of the x-axis: xlabel('x(m)','FontName','Times New Roman','FontSize',7); The name and font of the y-axis
    and Size: ylabel('zc(m) and y(m)','FontName','Times New Roman','FontSize',7,LineWidth',1.5);

  5. Coordinate axis font and size setting
    set(gca,'FontName','Times New Roman','FontSize',7,'LineWidth',1.5);

  6. Font and size setting of
    title title('yslice:600m;zslice:150m','FontName','Times New Roman','FontSize',7);

  7. Coordinate axis reverse
    set(gca,'zdir','reverse'); % Reverse the value of the coordinate axis
    —————————————————

Original link: https://blog.csdn.net/q286989429/article/details/50189313

Guess you like

Origin blog.csdn.net/weixin_42000717/article/details/130824291