change axis in image

4 ビュー (過去 30 日間)
Luis Isaac
Luis Isaac 2019 年 6 月 13 日
回答済み: Suryaansh Mata 2019 年 6 月 18 日
Dear
I have generate a 2D image using color map
untitled.jpg
The graphic repersent the modulus of a electric field, where horizontal axis represent a a radius and vertical axis a height.
I would like to change the labels of the axis from pixel values to (r,z) values. I've tried
axis([0 rmax zmax 0])
but do not work
How can I do this?
Thanks in avance!!

回答 (1 件)

Suryaansh Mata
Suryaansh Mata 2019 年 6 月 18 日
While making a plot using the plot command on MATLAB, we supply two arguments to the function plot(x,y). The labels displayed on the axis of the plot are precisely those values that are stored in x and y arrays. In order to change those, change the value in the x and y arrays.
Note- The size of x and y should be the same. There is a mapping between the indices of the two arrays which then gets plotted.

カテゴリ

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