Save the image as a high-resolution or lossless image that can be scaled without pixelation
I have a large plot in MATLAB (4095 points total) and I want to export this figure as a high resolution image that can be enlarged, just as the original figure can be enlarged. Below I have attached two images: full size and the second one was exported separately by scaling the shape and then exporting. 1st image becomes pixelated (obviously) when I zoom in. So my question is whether it is possible to export the shape as an image (any format, but .fig) that can be enlarged for more detail.
source to share
You need to keep the shape using a vector format , for example pdf
, ps
or eps
.
For example: try
plot(sin(0:.001:2*pi)) %// example graph
The resulting figure:
Then print before pdf
:
print -dpdf example %// Or change -dpdf to -deps, -depsc, -dps, -dpsc
Now open the generated file example.pdf
. You can enlarge it and you won't see it pixelated. Here is an example of the top of a sine wave when scaled at 6400%.
source to share