Thank you so much, but I want to plot only the pixels that I have value for them (I don't want to perform interpolation). Is it possible to plot just latitude and longitude and value that are in the data table as pixels? Sorry, I think the picture I attached caused this misunderstood.
Thank you, I'm sorry but the griddata resulted me:
I want to just have pixels where I had coordinates of centers of them. I don't need to have pixels where I hadn't any center coordinates.
I plot my points here(without coressponding value):
I drew a 0.25 x 0.25 box manually on some of them (because each center represents 0.5x0.5 pixel), I want something like this. The other places that I don't have centroid of them good to stay white.
Do you just want to plot as points or rectangles? Do you want the output as an image? What are the width and height of the image. 0.5x0.5 pixel will not be clearly visible?
these points are centroids of the grid. Each grid has 0.25-degree space in top, bottom, right and left (Square).
They present the locations of climate stations and value is mean precipitation.
I will add these pixels to the shapefile of the country after plot them here.
I want plot square 0.25x0.25x0.25x0.25 around each point. Yes, I want the output as an image, I add this figure on the shape of the country afterward.
look like this picture below:
In above picture, all pixels that have corresponding coordinates values are plotted and color represents amount of precipitation in them. And where there is no coordinates for pixels its remains white.
The output is a picture (with regular size like when plotting something) and these pixels (grids) are inside it.
The output that I need is something like the green picture above that I found it on internet.
I'm sorry but this is not correct. The problem is the location of pixels is wrong. Here is my point (center of each pixel) that I plot them on the map (left figure). (right figure is the generated plot using the code)
As you can see there is a difference between locations if I plot a box around each point.
Dear Ameer Hamza everything is awesome just I want to have actual z values. In the previous code, you divide it by 255 and I simply deleted that line. But in this code, I don't know how I can use actual z values. So when I add color bar it show real value for each pixel.
I want it shows actual values of z like when I read:
z = points{:,3};
in prevous code after I delete /255 line the color bar is:
Which was true. But here it shows wrong values. Since they are precipitation data I don't want to change them and I want to use points{:,3} exact values.
When I start comparing the figure from the first model and second model's pixels I found that the values of the color bar are different while the colors of pixels are similar. For example please look at these two pictures, the first one generated for the first model and the second one generated for the next model:
I have a yellow color in both but in the first one, it indicates values near 350 while in second figure yellow pixels show values about 140.
In order to compare, do you think there is any way to make color stable in both?
For example, yellow color in all figures of models shows near 300 values.
Here is an example and I have to compare more than 20 models.
Yes, It is possible, but that will make the points in some figures to be very similar. For example, If you set the limits of the color axis from 0 to 400 for all figures, then if the points lie between [127 130], they will have a very similar color. Try following code. I set the limits of color axis as [0 400]