简体   繁体   English

将图形保存为高分辨率或无损图像,可以在没有像素化的情况下放大

[英]Saving Figure as High Resolution or Lossless Image that can be Zoomed in without Pixelation

I have a big plot in MATLAB (4095 points total) and I want to export this figure as a high res image which can be zoomed in just like the original figure can be zoomed in. Below I attached two images, one is full size plot and the second one was exported separately by zooming in the figure and then exporting. 我在MATLAB中有一个很大的情节(总共4095分),我想将这个数字导出为高分辨率图像,可以放大,就像原始图形可以放大一样。下面我附上了两个图像,一个是全尺寸图第二个是通过放大图形然后导出而单独导出的。 1st image gets pixelated (obviously) when I zoom in. So my question is if it is possible to export the figure as an image (any format but .fig) that can be zoomed in for more granular detail. 当我放大时,第一个图像会变得像素化(很明显)。所以我的问题是,是否可以将图形导出为图像(任何格式,但.fig),可以放大以获得更细粒度的细节。 PNG图片放大

You need to save the figure using a vector format , such as pdf , ps or eps . 您需要使用矢量格式保存图形,例如pdfpseps

For example: try 例如:试试

plot(sin(0:.001:2*pi)) %// example graph

The resulting figure is: 结果是:

在此输入图像描述

Then print to pdf : 然后打印到pdf

print -dpdf example %// Or change -dpdf to -deps, -depsc, -dps, -dpsc

Now open the generated file, example.pdf . 现在打开生成的文件example.pdf You can zoom on it and you won't see it pixelated. 你可以放大它,你不会看到它像素化。 Here's an example of the top of the sinusoid at 6400% zoom. 这是一个6400%变焦的正弦曲线顶部的例子。

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM