Matlab:图像绘制分辨率/ dpi

时间:2016-04-09 11:25:24

标签: matlab image-processing matlab-figure

我正在绘制x和y坐标以及一些图像,但是与轴相比,图像变得非常大。如何设置图形分辨率或大小,使图像可以适合小轴范围,而不是覆盖整个图形,还可以修改轴范围。

enter image description here

没有图像的图(下图)。 enter image description here

Matlab代码:

for l = 1:size of array                   
   colormap('gray'); 
   imagesc(X,Y, imrotate(imresize(img,[100 100]),180));
end

1 个答案:

答案 0 :(得分:1)

默认情况下,imagesc将使用索引坐标(像素间距为1)绘制图像。请注意此图上的轴限制:

enter image description here

您可以通过更改XData and YData properties of the image

来更改此设置
him = imagesc(rand(4), 'XData', [0,1], 'YData', [0 1])

enter image description here

请注意,这改变了图像的缩放比例。我不确定您的积分是什么坐标系(如果您可以提供更多信息,我可以更好地帮助您),但您可以调整XDataYData是合适的值以匹配您的积分。

相关问题