Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sTitle = 'trajectory';
- sFile = 'Data/trajectory.mat';
- sPdfFile = 'pdfs/trajectory.pdf';
- fig = figure;
- % Adjust figure window size
- set(fig, 'Position', [100 100 1400 800]);
- % Set title
- title(sTitle);
- % Get states
- [s, t] = load_data(some_data);
- % Draw trajectory
- plot(s(1,:), s(2,:), 'linewidth', linewidth);
- % Labels and stuff
- xlabel('x^W [m]', 'fontsize', fontsize1);
- ylabel('y^W [m]', 'fontsize', fontsize1);
- set(gca, 'fontsize', fontsize1)
- % Axis font
- set( gca , ...
- 'FontName' , 'Helvetica' );
- set(gca, ...
- 'Box' , 'on' , ...
- 'TickDir' , 'out' , ...
- 'TickLength' , [.02 .02] , ...
- 'XMinorTick' , 'on' , ...
- 'XGrid' , 'on' , ...
- 'XMinorGrid' , 'off' , ...
- 'YMinorTick' , 'on' , ...
- 'YGrid' , 'on' , ...
- 'XColor' , [.3 .3 .3], ...
- 'YColor' , [.3 .3 .3], ...
- 'XTick' , -5:1:5, ...
- 'XTickLabelMode', 'auto', ...
- 'YTick' , -5:1:5, ...
- 'LineWidth' , 1 );
- % Adjust view
- axis([-2.5 2.5, -2.7 0.5]);
- % Correct data aspect ratio
- daspect([1,1,1])
- % Print to PDF
- width = 10;
- height = 5;
- set(gcf, 'PaperPosition', [0 0 width height]); %Position plot at left hand corner with width 5 and height 5.
- set(gcf, 'PaperSize', [width height]); %Set the paper to have width 5 and height 5.
- print('-dpdf', '-r600', sPdfFile);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement