필터 지우기
필터 지우기

Figure color become black in latex

조회 수: 29 (최근 30일)
Moslem Uddin
Moslem Uddin 2019년 9월 3일
댓글: Moslem Uddin 2019년 9월 3일
I am using the the following code to save figure to a certain folder in my pc in eps format(compatible with LaTex).But, instead of color figure , it becomes black. Also figure size changed. What to do?
clc
clear all
syms y
t=[0 pi/8 pi/4 3*pi/8 pi/2 5*pi/8 3*pi/4 7*pi/8 pi];
%u_ts=exp(-y/sqrt(2))*cos(t-y/sqrt(2));
for i=1:length(t)
u_ts=exp(-y/sqrt(2))*sin((t(i))-(y/sqrt(2)));
%figure
fplot(u_ts,y);hold on;
end
saveas(gcf,'C:\Users\MUSLEM UDDIN\Pictures\figure_na.eps');

답변 (1개)

Steven Lord
Steven Lord 2019년 9월 3일
Specify the formattype input argument in your call to saveas. Looking at the table for Vector Graphics Formats options on the saveas documentation page I think you want 'epsc' or 'epsc2'. Without that input argument, saveas sees the extension .eps on your filename and saves it in EPS Level 3 Black and White format.
  댓글 수: 1
Moslem Uddin
Moslem Uddin 2019년 9월 3일
Neither epsc nor epsc2 are supported in my tex editor(Texstudio/Overleaf). Is there any other solution?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

태그

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by