标签:packages var inter size interval -o pack pre clear
Matlab画图模板
clear; clc; figure; newplot(); % markers={‘-square‘,‘--<‘,‘:o‘,‘--d‘,‘-^‘,‘-v‘,‘-square‘,‘--<‘}; markers={‘--square‘,‘--<‘,‘--o‘,‘--d‘,‘-square‘,‘-<‘,‘-o‘,‘-d‘}; cols={‘b‘,‘r‘,‘g‘,‘y‘,‘m‘,‘r‘,‘b‘,‘g‘}; %cols={‘c‘,‘r‘,‘k‘,‘b‘,‘c‘,‘r‘,‘k‘,‘b‘}; linestyles={‘-‘,‘--‘,‘:‘,‘-.‘}; set(gca, ‘FontName‘, ‘Times‘); set(gca, ‘FontSize‘, 18); set(gca, ‘LineWidth‘, 3); set(gca, ‘Color‘, [1 1 1]); set(gca, ‘Box‘, ‘on‘); set(gcf, ‘Color‘, [1 1 1]); filename={‘result/统计/1M_6_1.txt‘,‘result/统计/514K_6_1.txt‘}; intervalCount=6; packageSize=800:200:1400; for index=1:length(filename) data=load(filename{index}); data=data; count=0; for i=1:intervalCount:length(data) count=count+1; delay(count)=data(i); end plot(packageSize,delay,markers{index}, ‘Color‘, cols{index}, ‘LineWidth‘, 1); %axis([800,1400,0.045,0.065]); hold on end xlabel(‘Pakage Size (k)‘, ‘FontName‘,‘Times New Roman‘,‘FontWeight‘, ‘normal‘, ‘FontSize‘, 16); ylabel(‘Avarage Delay in Sim (s)‘, ‘FontName‘,‘Times New Roman‘,‘FontWeight‘, ‘normal‘, ‘FontSize‘, 16); legend(‘1M‘,‘514K‘);
各种颜色属性选项 ‘r‘ 红色 ‘m‘ 粉红 ‘g‘ 绿色 ‘c‘ 青色 ‘y‘ 黄色 ‘k‘ 黑色 各种线型属性选项 ‘-‘ 实线 ‘--‘ 虚线 ‘:‘ 点线 ‘-.‘ 点划线 各种标记点属性选项 ‘.‘ 用点号绘制各数据点 ‘^‘ 用上三角绘制各数据点 ‘+‘ 用‘+‘号绘制各数据点 ‘v‘ 用下三角绘制各数据点 ‘*‘ 用‘*‘号绘制各数据点 ‘>‘ 用右三角绘制各数据点 ‘ .‘ 用‘.‘号绘制各数据点 ‘<‘ 用左三角绘制各数据点 ‘s‘或squar 用正方形绘制各数据点‘p‘ 用五角星绘制各数据点 ‘d‘或diamond用菱 形绘制各数据点 ‘h‘ 用六角星绘制各数据点 这些选项可以连在一起用,如:‘-.g‘表示绘制绿色的点划线,‘g+‘表示用绿 色的 ‘+‘号绘制曲线.
gnuplot画图模板
clear set grid set key box set key reverse set key Left set key spacing 1.2 set key w 2 set key at 9000,8 set xlabel "Simulation Time (s)" set ylabel "Hitting Rate (%)" set xtics 2000 plot "random.txt" every 5 u 1:2 w lp pt 5 title "random","cc.txt" every 5 u 1:2 w lp pt 7 title "CC","lru.txt" every 5 u 1:2 w lp pt 5 title "LRU" set terminal postscript eps color "Helvetica" 20 set output "hit.eps" replot set output set term wxt
标签:packages var inter size interval -o pack pre clear
原文地址:http://www.cnblogs.com/liwei33/p/7401147.html