Matlab Hangs when Saving Surf to PDF

5 Ansichten (letzte 30 Tage)
Christopher Saltonstall
Christopher Saltonstall am 7 Dez. 2017
I am having trouble saving a surface plot as a pdf. This used to work for me just fine. However, now when I try, Matlab hangs up and my disk usage jumps to 100%. What is causing this?
clear
close all
savepath = 'C:\Users\';
% Image Sizing
japw = 3 + 3/8;
Y = 11;
X = 8.5;
XX = 0.5*X;
YY = 0.2*Y*japw/XX;
XX = japw;
PX = 0;
PY = 0;
%surface data (arbitrary)
x = (0:10);
y = (0:10);
nX = length(x);
nY = length(y);
xMat = repmat(x.',1,nY);
yMat = repmat(y,nX,1);
z = xMat.^2 + yMat.^2;
%plot data
f = figure(305);
hsurf = surf(x,y,z);
xlabel('X','fontsize',30,'interpreter','latex')
ylabel('Y','fontsize',30,'interpreter','latex')
shading interp
set(hsurf,'EdgeColor','interp')
colorbar
set(gcf,'color','white')
set(gcf,'PaperUnits','inches')
set(gcf,'PaperPosition', [PX PY X Y/2])
set(gcf, 'PaperSize',[X Y/2])
set(gca,'Position', [0.15 0.22 0.7 0.7])
set(gca,'FontSize',20)
view(0,90)
saveas(gcf,[savepath 'test3.pdf'])
  3 Kommentare
Christopher Saltonstall
Christopher Saltonstall am 7 Dez. 2017
It used to work on this PC (Windows 10) with this Matlab version (2016b).
Christopher Saltonstall
Christopher Saltonstall am 7 Dez. 2017
Also, it works fine when saving any other format, e.g., tiff, png.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by