2626
2727hold on
2828
29- % set(gca, 'YScale', 'log')
30- stem(x ,y );
31- stem(x ,y1 );
32- stem(x ,y2 );
29+ set(gca , ' YScale' , ' log' )
30+
31+ p(1 ) = stem(x ,y ,' r' );
32+ p(2 ) = stem(x ,y1 ,' Color' ,[0 0.7 0 ]);
33+ p(3 ) = stem(x ,y2 ,' b' );
34+
35+ % legend(gca,'MQTT Connect','MQTT Disconnect','MQTT Publish')
36+
3337
3438
3539
3640box on ;
3741set(gcf ,' Units' ,' Inches' );
3842ax = gca ;
3943ax.YAxis.Exponent = 0 ;
44+ ax.XAxis.Exponent = 0 ;
4045ax.GridLineStyle = ' :' ;
4146ax.GridAlpha = 0.3 ;
4247ax.LineWidth = 0.9 ;
4348set(gca ,' FontSize' ,16 )
4449
4550
46- title({' Response Times Distribution' ,' Instance Type (m5.xlarge/m5a.xlarge)' },' FontSize' ,14 );
51+
52+ title({' ' ,' Response Times Distribution' ,' Instance Type (m5.xlarge/m5a.xlarge)' },' FontSize' ,14 );
4753xlabel(ylabels ,' FontSize' ,15 );
48- ylabel(' Number of responses' ,' FontSize' ,15 );
49- % ylabel('\boldmath \bf{$\log _{10} (Number\, of\, responses)$}','FontSize',15,'interpreter','latex','FontWeight', 'bold');
54+ % ylabel('Number of responses','FontSize',15);
55+ ylabel(' \b oldmath \b f{$\log _{10} (Number\, of\, responses)$}' ,' FontSize' ,15 ,' interpreter' ,' latex' ,' FontWeight' , ' bold' );
5056ax.XAxis.Exponent = 0 ;
5157pos = get(gcf ,' Position' );
5258set(findall(gcf ,' -property' ,' FontName' ),' FontName' ,' Times New Roman' );
5359set(gcf ,' PaperPositionMode' ,' Auto' ,' PaperUnits' ,' Inches' ,' PaperSize' ,[pos(3 ), pos(4 )]);
60+
61+ breakxaxis([40000 280000 ]);
62+ % https://stackoverflow.com/questions/18117664/how-can-i-show-only-the-legend-in-matlab
63+ p2(1 ) = stem(nan ,nan ,' r' ,' DisplayName' ,' MQTT Connect' );
64+ p2(2 ) = stem(nan ,nan ,' DisplayName' ,' MQTT Disconnect' ,' Color' ,[0 0.7 0 ]);
65+ p2(3 ) = stem(nan ,nan ,' b' ,' DisplayName' ,' MQTT Publish' );
66+ lgdh= legend(p2 );
67+ lgdh.Location = ' northWest' ;
68+ SaveLegendToImage(gca , lgdh , ' testImage' , ' tif' );
69+ set(findall(gca , ' type' , ' text' ), ' visible' , ' off' )
70+
71+ legend show ;
5472print(gcf ,' -dpdf' ,strcat(' /Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/hasilgrafik/' ,strcat(dataID ,stringCSV )),' -r0' );
5573savefig(strcat(' /Users/mymac/Documents/SCRIPTSHEET/SKRIPSI/hasilgrafik/' ,strcat(dataID ,stringCSV )));
56- hold off
74+ hold off
75+
76+
77+
0 commit comments