How to increase the figure size above the screen limit?

23 ビュー (過去 30 日間)
Karel
Karel 2022 年 2 月 1 日
回答済み: Simon Chan 2022 年 2 月 2 日
I need to export a large-extent-plot with a high level of detail (to be able to zoom the saved image and to see the details).
Printing the figure with high resolution
print(figureName,'imageName','-dpng','-r1000')
does not increase the level of detail, it only saves the actual detail with high resolution.
I tried to increase the figure
figureName = figure('Position',[1 1 10000 10000])
however, the size of the figure is somehow limited (probably by the screen size).
Is there a way?
  2 件のコメント
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2022 年 2 月 1 日
Have you tried using imwrite instead of print? Print will use a figure, whilst imwrite can generate the output directly from the data. It may work.
Karel
Karel 2022 年 2 月 2 日
Thank you. As I understand, imwrite is for image data (i.e. rasters/arrays). I have scatter/plot output (point and line graph).

サインインしてコメントする。

採用された回答

Simon Chan
Simon Chan 2022 年 2 月 2 日
Try the following:
[X,Y,Z] = sphere(16);
x = [0.5*X(:); 0.75*X(:); X(:)];
y = [0.5*Y(:); 0.75*Y(:); Y(:)];
z = [0.5*Z(:); 0.75*Z(:); Z(:)];
scatter3(x,y,z);
f = gcf;
f.Visible='off'; % Make it invisible
f.Position=[1 1 10800 5400]; % Increase the size bigger than my screen resolution
print(gcf,'test.png','-dpng','-r1000');
data = imread('test.png'); % File size has 2.9M
[Ny,Nx,Nc] = size(data); % Get back the number of pixels
Ny =
7240
Nx =
14271

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by