# what will be next command line for putting lat long value n figure?

1 view (last 30 days)

Show older comments

Here matrix of 130*110 want to give latitude and longitude value from

lon=42:-(42-40)/109:40;

lat=315:(317-315)/129:317;

[x,y]=meshgrid(lon,lat);

what will be next command line for putting lat long value n figure?

outside the figure value of lat/long is not there I want to put lat/long value there?

##### 3 Comments

Image Analyst
on 25 Aug 2013

Edited: Image Analyst
on 25 Aug 2013

S, you don't need to put "matlab" or "matlab code" as tags since every question here is on matlab and matlab code. Read a guide to tags

Do you just want to change the tick marks outside the image so that they read the "real world" lat/lon numbers instead of pixel values?

### Answers (1)

Image Analyst
on 25 Aug 2013

This is completely explained, with several examples, in the documentation. For example:

x = -pi:.1:pi;

y = sin(x);

plot(x,y)

set(gca,'XTick',-pi:pi/2:pi)

set(gca,'XTickLabel',{'-pi','-pi/2','0','pi/2','pi'})

Browse, in the help, to MATLAB->Graphics->formatting and Annotation->Coordinate System->Setting Axis Parameters. Or search for ticks and select "Setting Axis Parameters" from the list.

##### 5 Comments

Walter Roberson
on 30 Aug 2013

### See Also

### Categories

### Products

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!