Home > Archive > Matlab > August 2007 > axis scalling
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| kokec fokec 2007-08-30, 8:15 am |
| Hello,
I have one, probably simple problem for you.
For example if I create a matrix, let's say size of 500x500 and dislpay it with imshow with axes on, axes ranges from 1 to 500. What I want to do is, to display axes for example from 1 to 100 (which is equal to dividing axes range with 5), but the most im
portant is, that there still must be the whole matrix (500x500 points) on the image. I just want to change axis values.
Thank you for your answer.
Bye
| |
| Michael Wild 2007-08-30, 8:15 am |
| kokec fokec wrote:
> Hello,
> I have one, probably simple problem for you.
> For example if I create a matrix, let's say size of 500x500 and dislpay it with imshow with axes on, axes ranges from 1 to 500. What I want to do is, to display axes for example from 1 to 100 (which is equal to dividing axes range with 5), but the most
important is, that there still must be the whole matrix (500x500 points) on the image. I just want to change axis values.
> Thank you for your answer.
> Bye
is it really imshow you want? aren't perhaps pcolor, surf, contour, ...
better suited?
michael
| |
| kokec fokec 2007-08-30, 8:15 am |
| Imshow is just fine for my problem, but I don't know how to label axis from 1 to 10 if there is for example 100 points in each dimension. If you could tell me how to do this for pcolor, surf, contour... it is probably the same for imshow.
| |
| Michael Wild 2007-08-30, 8:58 pm |
| kokec fokec wrote:
> Imshow is just fine for my problem, but I don't know how to label axis from 1 to 10 if there is for example 100 points in each dimension. If you could tell me how to do this for pcolor, surf, contour... it is probably the same for imshow.
are you just too lazy, or what?
just type:
doc pcolor
doc surf
doc ...
if you absolutely need to do it using imshow, have a look at the
properties XData and YData of the image axes object (doc get, doc set,
doc axes)
michael
| |
| Walter Roberson 2007-08-30, 8:59 pm |
| In article <30093414.1188478557555.JavaMail.jakarta@nitrogen.mathforum.org>,
kokec fokec <jernej_only@yahoo.com> wrote:
>Imshow is just fine for my problem, but I don't know how to label
>axis from 1 to 10 if there is for example 100 points in each
>dimension.
set the XTick and XTickLabel, and YTick and YTickLabel
properties of the current axis.
For example,
set(gca, 'XTick', [10 20 30 40 50], 'XTickLabel', {'1' '2' '3' '4' '5'})
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton
|
|
|
|
|