필터 지우기
필터 지우기

Improve the design of figures

조회 수: 2 (최근 30일)
Brave A
Brave A 2022년 8월 26일
이동: Walter Roberson 2022년 8월 28일
Hi There,
I have this code which genertaes multiple curves. But I need to improve the whole figure to looks like this figure in attachment.
Any suggestions?
Thanks in advance!
TextFontSize=20;
LegendFontSize = 18;
set(0,'DefaultAxesFontName','Times',...
'DefaultLineLineWidth',1,...
'DefaultLineMarkerSize',8);
set(gca,'FontName','Times New Roman','FontSize',TextFontSize);
x=[0.1,1,1.2,1.4,3,4]; % Bandwidth
plot(x,[17,50,50,50,50,50], 'b:x',...%N
'LineWidth',1,...
'MarkerSize',7,...
'MarkerEdgeColor','b',...
'MarkerFaceColor',[0.5,0.5,0.5], 'DisplayName', 'N');
hold on;
plot(x,[9,13,17,19,23,30], '--k*',...% L
'LineWidth',1,...
'MarkerSize',7,...
'MarkerEdgeColor','k',...
'MarkerFaceColor',[0.5,0.5,0.5], 'DisplayName', 'L');
plot(x,[4,7,9,11,18,21], '-.hr',...% F
'LineWidth',1,...
'MarkerSize',7,...
'MarkerEdgeColor','r',...
'MarkerFaceColor',[0.5,0.5,0.5], 'DisplayName', 'F');
set(gca,'XMinorTick','on','YMinorTick','on');
grid on;
xlabel('B')
ylabel('Number of users')
legend show
figure;
hold off;
  댓글 수: 9
Brave A
Brave A 2022년 8월 27일
it's not clear at all @Walter Roberson Could you please help on this? Thank you!
Brave A
Brave A 2022년 8월 28일
Thank you so much @Walter Roberson

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 27일
이동: Walter Roberson 2022년 8월 28일
TextFontSize=20;
LegendFontSize = 18;
set(0,'DefaultAxesFontName','Times',...
'DefaultLineLineWidth',1,...
'DefaultLineMarkerSize',8);
set(gca,'FontName','Times New Roman','FontSize',TextFontSize);
x=[0.1,1,1.2,1.4,3,4]; % Bandwidth
y1 = [17,50,50,50,50,50];
y2 = [9,13,17,19,23,30];
y3 = [4,7,9,11,18,21];
plot(x, y1, '^r',...%N
'LineWidth',1,...
'MarkerSize',7,...
'MarkerFaceColor', 'r',...
'DisplayName', 'N');
hold on;
plot(x, y2, '^b',...% L
'LineWidth',1,...
'MarkerSize',7,...
'MarkerFaceColor', 'b', ...
'DisplayName', 'L');
plot(x, y3, '^g',...% F
'LineWidth',1,...
'MarkerSize',7,...
'MarkerFaceColor', 'g', ...
'DisplayName', 'F');
set(gca,'XMinorTick','on','YMinorTick','on');
grid on;
xlabel('B')
ylabel('Number of users')
text(x(4), y1(4), 'N', 'verticalalignment', 'bottom');
text(x(4), y2(4), 'L', 'verticalalignment', 'bottom');
text(x(4), y3(4), 'F', 'verticalalignment', 'bottom');
ylim( [0, max([y1, y2, y3]) + 10])
legend('orientation', 'horizontal', 'location', 'north')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by