Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to make an image large enough to avoid tick label overlapping?
    primarykey
    data
    text
    <p>Assume that the data X has size 1000 *1000. X is displayed using the command:</p> <pre><code>imagesc(X); </code></pre> <p>and all the rows are labeld using:</p> <pre><code>set(gca, 'YTickLabel', somelabels); </code></pre> <p>Although the data X are properly polotted and the Ytick labels are also shown, the labels are highly overlapped because of the large number of rows. Is there any way to solve the problem? Any help will be highly appreciated.</p> <p><strong>Edit 1</strong></p> <p>I realize my question was not stated well to represent my problem. I am going to wrap up my understanding based on the answers and re-ask a question: </p> <ol> <li><p>To show as many rows/labels in a <em>Figure Window</em>, the following helps:</p> <pre><code>set(gca,'FontSize',6), or, alternate the distance (suggested by yuk), or, set(gca,'YTick',1:10:1000,'YTickLabel',somelabels(1:10:1000)); </code></pre></li> <li><p>The code</p> <pre><code>set(gca,'Units','pixels','Position',[20 20 10000 10000]); </code></pre> <p>will display a zoomed-in image by default. But if the zoomed-in image is too large to fit in the <em>Figure Window</em>, only part of the image will be displayed. However, neither <em>zoom out</em> nor the <em>pan</em> tool can reach to the rest part of that image.</p></li> <li><p>The default behavior of the code</p> <pre><code>imagesc(X); set(gca, 'ytick', 1:1000, 'yticklabe', ylabel); </code></pre> <p>displays the whole image fitting to the <em>Figure Window</em> with overlapping labels. Nevertheless, it does allow one to <em>zoom into</em> part of the image and to see the un-overlapped labels.</p></li> <li><p>If I save the image into a pdf file:</p> <pre><code>imagesc(X); set(gca, 'ytick', 1:1000, 'yticklabe', ylabel); saveas(gcf, 'fig.pdf'); </code></pre> <p>Then the saved pdf is only the image fit to the <em>Figure Window</em> with overlapping labels. However, unlike <em>zoom in</em> within Matlab figure window, <em>zoom in</em> within a pdf reader won't change the relative position/distance of labels. As a result, the zoomed-in image in pdf is still label-overlaped.</p></li> </ol> <p>So my question is:<br> How to save the image into a pdf file or png such that it has a similar behavior as of <em>point 3</em> above when opened in Adobe reader, rather than that of <em>point 4</em>?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload