How to save figures to pdf or doc document?

1 回表示 (過去 30 日間)
Angel  Chavez
Angel Chavez 2020 年 1 月 16 日
回答済み: Iñigo Moreno 2020 年 9 月 28 日
I am trying to save some figures (subplot) in a single pdf or word document.
This is my code for the figures.
I need help to save them in a document automatically.
Fig3= figure('units', 'centimeters', 'Position', [0,0, 20/sqrt(2), 20]);
% plot(S2.time,S2.vel)
for i=1:numel(eqmotions);
data=load([eqmotions{i},'.txt']);
subplot(5,2,i)
plot(Vel{i}(:,1),Vel{i}(:,2),'r','LineWidth',1);
title(eqmotions{i},'FontName','Times New Roman')
ylabel('Vel (m/s)','FontName','Times New Roman')
xlabel('Tiempo (seg)','FontName','Times New Roman')
grid on
end
% baseline correction Acc
Fig4= figure('units', 'centimeters', 'Position', [0,0, 20/sqrt(2), 20]);
% plot(S2.time,S2.acc)
for i=1:numel(eqmotions)
data=load([eqmotions{i},'.txt']);
subplot(5,2,i)
plot(Acc{i}(:,1),Acc{i}(:,2),'r','LineWidth',1);
%plot(S2.time,S2.disp,'r','LineWidth',1);
set(gca,'FontName','Times New Roman')
title(eqmotions{i},'FontName','Times New Roman')
ylabel('Acc (m/s2)','FontName','Times New Roman')
xlabel('Tiempo (seg)','FontName','Times New Roman')
grid on
end

回答 (2 件)

David Hill
David Hill 2020 年 1 月 16 日

Iñigo Moreno
Iñigo Moreno 2020 年 9 月 28 日
exportgraphics(Fig3,'file.pdf')

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by