实现右边和上边的坐标轴刻度不显示,放在文章中比较好看
加粗后右边和上边的刻度很明显,所以需要去除
![plot(t*(1e12),trans,'LineWidth',1.5)
xlabel('Time (ps)');
ylabel('Transmittance');
ylim([0.15 0.6]);
xlim([-20 20]);
set(gca,'FontWeight','bold');
box off
ax2 = axes('Position',get(gca,'Position'),...
'XAxisLocation','top',...
'YAxisLocation','right',...
'Color','none',...
'XColor','k','YColor','k');
set(ax2,'YTick', []);
set(ax2,'XTick', []);
box on
set(gca,'linewidth',1.5);%这个放在取消刻度之后,才能对所有边框有效果,变粗](https://img-blog.csdnimg.cn/c8fb6e16b84146bba5012aa8c0367a95.png)
参考:https://blog.csdn.net/Nick_Cui/article/details/123103859