在matlab的help中,搜索"Automatic Axes Resize",就可以看到调节坐标的几个属性。假设随机生成一张图片100*100,然后保存为png格式,且DPI=300。

   imagesc(rand(100,100));           % generate a random image
   axis off                          % set off the axis
   set(gca, 'position', [0 0 1 1 ]); % the axis must be normalized
   print('-f1', '-r300', '-dpng','xxx.png'); % set the DPI

   这样就得到一张没有边框的图片。


trackback: http://blog.sciencenet.cn/home.php?mod=space&uid=267218&do=blog&id=356262

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2021-10-19
  • 2022-02-17
猜你喜欢
  • 2021-12-08
  • 2021-05-30
  • 2022-02-26
  • 2021-09-15
  • 2022-12-23
  • 2021-09-28
相关资源
相似解决方案