Plot gridbox and point

1 visualización (últimos 30 días)
Thomas Leirvik
Thomas Leirvik el 24 de Oct. de 2016
Respondida: Gowtham Uma M Jaganathan el 28 de Oct. de 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

Respuestas (1)

Gowtham Uma M Jaganathan
Gowtham Uma M Jaganathan el 28 de Oct. de 2016
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.

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by