How to Increase Landscape Image Resolution in .png output?
<p>Situation: unable to increase landscape resolution in the .png output of <code>export_fig</code><br>
Goal: get more and more landscape resolution after each iteration   </p>

<p>I can increase the amount of points in the matrix (<code>time</code>) determining the y-axis direction. 
The time-axis has 2x more points in each iteration. The <code>export_fig</code>'s output remains as square in each iteration, causing the amplitude of the peaks to be smaller and smaller in each iteration. 
Pseudocode</p>

<pre><code>counter=1;
while (counter &lt; 4);
    potential=linspace(0,100, 200);
    timeEndSeconds=counter*10;
    time=linspace(0, timeEndSeconds, 2*timeEndSeconds);

    % computere here anything to the presentation etc Sin
    %Presentation = sin(time); % gives dimensions 1x20, but should be 1x200 i.e. asserted by potential`s linspace but not sure how to ensure it

    width=50; 
    height=50; 
    figure('Position', [100 100 width height]);

    imagesc(time, potential, Presentation);

    filename=fullfile('/home/masi/Desktop/', counter);
    % https://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig
    % TODO ensure here the specific resolution in time x potential for the image
    export_fig(filename, '-png','-dpng', gcf);

    counter=counter+1;
end
</code></pre>

<p>I could not find anything about the resolution of the y-axis in the documentation, when studying the options. </p>

<h2>Proposal based on Suever's comment</h2>

<p>Have the following in the loop, which doubles the image resolution</p>

<pre><code>% Use swap as described in http://askubuntu.com/q/799834/25388
if (counter &gt; 1)
    height=50; 
    width=50*counter;
    set(gcf, 'Position', [100 100 width height]);
end
</code></pre>

<p>Open</p>

<ul>
<li><code>linspace</code> better integration to <code>Position</code> in <code>figure</code>? </li>
</ul>

<p>System: Linux Ubuntu 16.04 64 bit<br>
Matlab: 2016a<br>
Documentation: <a href="https://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig" rel="nofollow">here</a><br>
Hardware: Macbook Air 2013-mid   </p>