필터 지우기
필터 지우기

Faded eps figure in LaTex

조회 수: 6 (최근 30일)
Pushkal Purohit
Pushkal Purohit 2022년 7월 9일
편집: Pushkal Purohit 2022년 7월 12일
Have a look at below two figures. One is dark having only single data plotted in mini axes, whereas other is faded when I plot multiple data sets on the same mini axes.
Darker(Bold) Figure:
Faded Figure:
I'm manually saving figures to .eps file and using them in pdfLaTex to generate the file.
The code used to generate both figures is almost same except below commands:
  • Darker Plot:
plot(Ts,Xs(k,:,1),'LineWidth', 2); % only one plot in mini graph
  • Faded Plot:
plot(Ts,reshape(Xs(k,:,:),[],N),'LineWidth', 2); % same results if loop is used instead of reshape to plot states of multiple sets
The complete code is as follows:
fignum=1;
no=3;
N=5;
for k=1:no
figure(fignum)
fignum=fignum+1;
str=['State ' num2str(k)];
str2=['$x_{i' num2str(k) '}$'];
lgd=cell(N,no);
for j=1:N
lgd{j,k}=['$x_{' num2str(j) num2str(k) '}$'];
end
plot(Ts,reshape(Xs(k,:,:),[],N),'LineWidth', 2);
legend(lgd(:,k),'Interpreter','latex','FontSize',16)
%title(str)
xlabel('Time (s) \rightarrow')
ylabel(str2,'Interpreter','latex','FontSize',16)
ax = gca;
ax.FontSize = 14;
h=axes('Position',[0.2,0.5,0.3,0.3]);
% plot(Ts,Xs(k,:,1),'LineWidth', 2);
plot(Ts,reshape(Xs(k,:,:),[],N),'LineWidth', 2);
set(h, 'Xlim', [-1+Tf/d 1+Tf/de], 'Ylim', [10*min(min(Xs(k,n*de/Tf:n*d/Tf,:))) 10*max(max(Xs(k,n*de/Tf:n*d/Tf,:)))]);
ax = gca;
ax.FontSize = 14;
end
I compared each property of axes and the darker figure has ContextMenu: Empty whereas the faded figure is having some link for contextmenu. All other properties are exactly same.
  댓글 수: 2
Jan
Jan 2022년 7월 10일
What exactly is your question? Which one of the two posted figures do you call "darker"? I do not see the difference.
Pushkal Purohit
Pushkal Purohit 2022년 7월 10일
@Jan Apologies for ambiguity. I have updated the question. By darker I mean the first figure where the figure border are a bit darker (bold) than the other.
The main issue is that these figures are to be added with width about 3 inch in an A4/Letter paper. When the zoom level of file is 100%, the difference is too noticable, and Faded figure is almost non-readable.

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

채택된 답변

Jan
Jan 2022년 7월 12일
Is one a vector graphic and the other one rasterized? This can happen, if the RendererMode of the figure is set to 'auto'. Define the mode actively:
figure('Renderer', 'painters')
The command you use for exporting the images would be important also.
  댓글 수: 1
Pushkal Purohit
Pushkal Purohit 2022년 7월 12일
편집: Pushkal Purohit 2022년 7월 12일
This worked.
The method to save and add both figures in the file was exactly same. Only difference was in the smaller axes.
I'm not sure why MATLAB was converting the figure in background.
I'm manualy saving figures as .eps (since I need to make some boxes and arrows in final figure as well) from File>Save As.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by