Save pictures in .pdf, .fig, and .jpeg with different paper orientation
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have a question about saving the same pictures in different formats (.pdf, .jpeg, .fig) with diferent orientation.
%if true
A = readtable('RON.xlsx');
tempo_A = A{:,1:2:end};
[n,m] = size(A);
variavel_original = A{:,2:2:end};
var = {'Y1','Y2','Y3','Y4'};
guardar = {'Y1','Y2','Y3','Y4'};
guardar2 = {'YY'};
var_original = {'Y1','Y2','Y3','Y4'};
n_var = length(var);
for j=1:n_var
original=figure;
set(original,'PaperUnits','centimeters','PaperPosition',[0 0 29 21],'PaperOrientation','landscape');
plot(tempo_A(:,j),variavel_original(:,j),'-b*');
for i=1:n
text(tempo_A(i,j),variavel_original(i,j),num2str(i),'Color','b','FontSize',8,'VerticalAlignment','top');
end
title(var(j));
grid on
xlabel('tempo');
ylabel('Y');
legend(var_original(j),'Location','best','Orientation','vertical');
saveas(original,fullfile('C:\Users\TiagoAlexandre\Documents\MATLAB\GALP\RON\Originais', guardar{j}), 'fig');
saveas(original,fullfile('C:\Users\TiagoAlexandre\Documents\MATLAB\GALP\RON\Originais', guardar{j}), 'jpeg');
saveas(original,fullfile('C:\Users\TiagoAlexandre\Documents\MATLAB\GALP\RON\Originais', guardar{j}), 'pdf');
end
% code
%end
So, in the set command I choose the option landscape, it creates a pdf file landscape of size almost A4 it's ok for the purpose.
Question 1 -> I wanted to save the jpeg file as 'portrait', how would I do that? (i want the jpeg file the same way as the pdf file, (the plot left to right). Question 2 -> I would want to save the .fig file a bit bigger, like a maximize window.
Thanks for your time, Tiago
3 commentaires
Manan Mishra
le 11 Jan 2018
Glad that you figured it on your own.
It would be beneficial for the community in future if you can share your solution in the answers section.
Réponses (0)
Voir également
Catégories
En savoir plus sur Printing and Saving dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!