Skip to content

Instantly share code, notes, and snippets.

@qiyuangong
Created November 16, 2016 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qiyuangong/cea355a7ac386721c3e0173c7cdd88f1 to your computer and use it in GitHub Desktop.
Save qiyuangong/cea355a7ac386721c3e0173c7cdd88f1 to your computer and use it in GitHub Desktop.
plot in matlab
figure1 = figure('Color',[1 1 1]);
axes1 = axes('Parent',figure1,'YTick',[0:1:10],...
'XTick',[10:10:40],...
'GridLineStyle','--','FontSize', 15);
box(axes1,'on');
%grid(axes1,'on');
hold(axes1,'all');
X = 10:10:40
plot(X, multitest(:, 1),'s-','Color',[1 0 1] ,'LineWidth',2.5, 'DisplayName','adult-7');
hold on;
plot(X, multitest(:, 2),'^-', 'Color',[1 0 0], 'LineWidth',2.5, 'DisplayName','adult-5');
xlabel('Size of dataset(K)', 'FontSize', 16);
hold on;
hold on;
ylabel('average relative error(%)', 'FontSize', 16);
axis([10 40 0 10]);
%title('string');
% Create legend
legend1 = legend(axes1,'show');
set(legend1,'Location','NorthEast','FontSize',16);
%legend('LIGDP Heuristic','Degree based GDTSP', 'Weight based GDTSP ','Location', 'NorthWest', 'FontSize', 14);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment