In the figure, I want to include contour line values for each line. The value range in the figure is from 0.1v to 1v. To create the color bar and the colors in the map, I want to limit the range from 0.3v to 1v, with all other locations being transparent. How should I proceed to achieve this?
Please help me regarding this.
Thank you;
Following is the script
"
gmt begin Ck2 jpg
gmt coast -R87/98.5/20.5/30.5 -W0.0p,white --MAP_GRID_PEN_PRIMARY=thinnest,blue
gmt surface Results/data.txt -R87.5/98/21/30 -I0.01 -Cjet -Ggrid.nc
gmt grdimage grid.nc -CSeismic -Q >> plot.ps
gmt grdcontour grid.nc -C0.3,0.4,0.5,0.6,0.7,0.8,0.9,1 -A0.3,0.4,0.5,0.6,0.7,0.8,0.9,1+v >> map.ps
gmt colorbar -DJMR+o1c/0c+w7c/0.5c+mc -Bxa0.1f0.05+uv -By+lvalues
gmt end"
data file is also included. Data.txt (6.9 KB)
and also what i will do if I used a non equal intervals while creating colour map and contours.
Don’t use >> in modern mode - this is gmt classic only.
The reason some of the contours are not annotated seems to be that the plot is too small (not specified in this case), so gmt does not draw them all; specify a (larger) plot size.
I don’t think you can use transparency on a pixel-by-pixel basis, so you could make all values below 0.3v and above 1v NaN’s. You can do this with grdclip. Not sure this is the best solution though. That’s why those values become black; they get the background-color (which is black pr. default) since they’re outside of the value range given in makecpt.