matlab中 text 使用画图示例
生活随笔
收集整理的這篇文章主要介紹了
matlab中 text 使用画图示例
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
% Plot the image of the Sensitivity and False Positive per image
clear;
close all;
clc;
I1 =[0.5 75];
I2 =[1 54.5];msize =19; %設(shè)定字體的大小hold on plot(I1(1),I1(2),'ko-','MarkerFaceColor','r') % 紅色實心圓點text(I1(1)+0.1,I1(2),'Wei 2002')
hold on
plot(I2(1),I2(2),'ko-','MarkerFaceColor','g') % 綠色實心圓點
text(I2(1)+0.1,I2(2),'Carreira 1998','fontsize',msize)
hold on legend('Wei 2002','Carreira 1998')
axis on;
axis tight
grid on
axis([0 8 0 100]);
ylabel('Sensitivity')
xlabel('False Positivies per image')% 用set設(shè)定繪圖坐標的FontSize屬性,這種設(shè)定同時對坐標軸標注、圖例、標題有效
h = gca;
set(h,'FontSize',msize);% 設(shè)置文字大小,同時影響坐標軸標注、圖例、標題等% x=0:0.2:12;
% plot(x,sin(x),'-',x,1.5*cos(x),':')
% legend('First','Second',-1); %強行將注釋視窗放在圖形視窗的外右邊。
效果圖如下
總結(jié)
以上是生活随笔為你收集整理的matlab中 text 使用画图示例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SQL Server数据仓库相关概念及构
- 下一篇: 不同matlab版本所支持的gcc g+