【发布时间】:2018-03-30 10:55:35
【问题描述】:
从过去几天开始,我在保存 matlab 绘图时得到了这个看起来很糟糕的数字。看到这个:
有人知道为什么会这样吗?
这是我正在使用的绘图代码:
plot(x,y,'o','MarkerSize',7,'MarkerFaceColor',[0.8 0.8
0.8],'MarkerEdgeColor',[0 0 0]);
[myfit,gof,output] = fit(x,y,'poly1');
hold on
myfitplot = plot(myfit);
set(myfitplot,'Color','k')
set(gca,'FontName','Calibri');
set(gca, 'FontSize',11);
set(gca, 'XTick',[ 0.5,0.52, 0.54])
set(gca, 'YTick',[ 0.48 ,0.54,0.6])
%set(gca, 'XLim',[0.45, 0.6])
%set(gca,'Ylim',[0.45, 0.6])
xlabel('\it{CI_{ETn}}','FontName', 'Calibri','FontSize',15,'FontWeight','b');
ylabel('\it{CI_{GPP}}','FontName', 'Calibri','FontSize',15,'FontWeight','b');
txt = strcat({'\it{R^2 = }'},'\rm',num2str(gof.rsquare,'%.2f'),',',...
' \it{p-val < }','\rm',num2str(0.05,'%.2f'));
lgd = legend(txt);
set(lgd,'FontSize',12);
lgd.Location = 'NorthWest';
hold off
我猜 Windows 有问题?因为我以前经常得到好的情节。提前谢谢..:)
编辑 1:我正在单击导出图标创建文件。 编辑2:尝试重新安装matlab,仍然得到相同的结果
编辑 3:最终的解决方案是我将字体更改为“Times New Roman”。现在数字输出是正确的..:)
【问题讨论】:
-
您需要展示如何“保存”示例中显示的文件。
-
感谢您的快速回复。我正在点击导出图标保存它。
-
绝对是字体问题。导出图形的文件格式是什么?是位图格式,Windows 图元文件,EPS,...?
-
好的,我会尽力让你知道的。我现在正在导出为 pdf 以在乳胶中使用它。有趣的是,当我单击文件窗口并将其打印为 pdf 时,打印效果很好。
标签: matlab matlab-figure