MATLAB Answers

0

Plot gridbox and point

Asked by Thomas Leirvik on 24 Oct 2016
Latest activity Answered by Gowtham Uma M Jaganathan on 28 Oct 2016
Hi all, I have two datasets
  1. Simulated temperature
  2. Observed temperature
Simulated data is given by gridboxes: for example the temperature in the coordinate (longitude = 0, latitude=0) is the simulated temperature in the gridbox 0 degrees to 1.25degrees longitude, and 0 degrees to 0.47 latitude. The observed temperature can be the coordinate (lon=0.52, lat=0.33), thus included in the gridbox for simulated data.
I want to plot the gridbox around the observed coordinate. That is: the box I want to plot for simulated data should start in (0,0) in the lower left corner. I tried the plot:
scatter(lonsimul, latsimul,'s') hold on scatter(lonobs, latobs,'.')
but it seems the first plot has the simulated coordinate, (0,0), as the center, and not the lower left corner.
Is there any way to do this?
Thomas

  0 Comments

Sign in to comment.

1 Answer


My understanding is that you have four vectors (lonsimul, latsimul, lonobs, latobs) based on which you are performing a scatter plot. When you perform a scatter plot, the co-ordinates would be based on the data that you have in those four vectors.
Your first plot had center at (0,0) since your data could have been symmetric about (0,0) and hence (0,0) was in the center of the plot. Check the data and see if the behavior is expected.
If this does not match your needs, check the documentation page below to know more about axes properties.

  0 Comments

Sign in to comment.