[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to wrap the imagesc figure with plot borders?
From: |
Juan Pablo Carbajal |
Subject: |
Re: How to wrap the imagesc figure with plot borders? |
Date: |
Fri, 22 Jun 2012 17:35:13 +0200 |
On Fri, Jun 22, 2012 at 5:02 PM, amonterou <address@hidden> wrote:
> Hi, I'm trying to plot a matrix through imagesc, the matrix contains data
> that should be visualized in a "pixel" view. So I use this code (I'm using a
> rand matrix to illustrate the point)
>
> imagesc(rand(17,28));
>
> I tried drawing grid("minor","on") on top of the image shown but the thing
> is that it divides in a too granular way, I want to draw my own grid on top
> of it, but the issue is that if I use the plot function to draw a line, the
> plot origin and area are actually smaller than the image that imagesc
> renders so if I draw starting in point 0,0 it actually starts from the
> center of the first pixel, I want to be able to draw my grid delineating the
> border between each "pixel" of the image. Attached is an image of the corner
> of the plot area that shows the issue.
> What I would like to be able to do is to draw lines starting from the actual
> border of the image. Thanks in advance to any advise you can provide! Have a
> nice day!
>
>
> http://octave.1599824.n4.nabble.com/file/n4630872/Untitled_picture.png
>
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/How-to-wrap-the-imagesc-figure-with-plot-borders-tp4630872.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
Hi, you can control the grid by setting the xtick (ytick) options of the axes.
So
set(gca,'xtick',0:2:28)
will make
grid on
place a vertical line every 2.
I hope that is what you wanted.
--
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/
- How to wrap the imagesc figure with plot borders?, amonterou, 2012/06/22
- Re: How to wrap the imagesc figure with plot borders?,
Juan Pablo Carbajal <=
- Re: How to wrap the imagesc figure with plot borders?, amonterou, 2012/06/22
- Message not available
- How to wrap the imagesc figure with plot borders?, Dmitri A. Sergatskov, 2012/06/22
- Re: How to wrap the imagesc figure with plot borders?, amonterou, 2012/06/22
- Re: How to wrap the imagesc figure with plot borders?, amonterou, 2012/06/22
- Re: How to wrap the imagesc figure with plot borders?, Dmitri A. Sergatskov, 2012/06/22
- Re: How to wrap the imagesc figure with plot borders?, Juan Pablo Carbajal, 2012/06/22
- Re: How to wrap the imagesc figure with plot borders?, amonterou, 2012/06/22