Hi everyone,
I’ve been attempting to plot a region to show color changes within the basemap using grdclip. It’s clipping the region, but the colour change with respect to the data file isn’t happening. I don’t understand why it’s not using the color palette table (CPT). Please let me know if I’ve made any mistakes in the code.
**!/usr/bin/env sh**
**gmt begin jks0 png**
** gmt basemap -R70.2/80.3/28.2/36 -JM10i -Ba2f2**
** gmt coast -R70.2/80.3/28.2/36 -JM10i -B -N1/0.8p**
** gmt makecpt -Crainbow -Ic -T-50/50 -H > combined.cpt**
** gmt xyz2grd hima_phi.txt -Ghima.grd -R70.2/80.3/28.2/36 -I0.01**
** gmt grdclip hima.grd -Gclipped_data.grd -SaNaN/NaN -R74.94/79.07/30.30/33.98**
** gmt grdimage clipped_data.grd -Ccombined.cpt -R70.2/80.3/28.2/36 -JM10i**
**gmt end show**
This is how my data file looks:
LON LAT VALUE
77.644 30.302 0.9747619047619
77.698 30.372 0.97357142857143
77.753 30.443 0.97238095238095
77.807 30.513 0.97130952380952
77.861 30.583 0.97029761904762
77.439 30.415 0.95440476190476
77.496 30.484 0.95345238095238
77.553 30.553 0.95255952380952
77.61 30.622 0.95172619047619
77.667 30.69 0.95095238095238
77.235 30.529 0.93410714285714
77.294 30.596 0.93339285714286
77.353 30.663 0.9327380952381
77.412 30.73 0.93214285714286
77.472 30.797 0.93160714285714
77.03 30.642 0.91380952380952
77.092 30.707 0.91333333333333
77.153 30.773 0.91291666666667
77.215 30.839 0.91255952380952
77.277 30.904 0.9122619047619
76.825 30.755 0.8935119047619
76.889 30.819 0.89321428571429
76.953 30.883 0.89303571428571
77.018 30.947 0.89291666666667
77.082 31.011 0.89291666666667
76.621 30.908 0.87053571428571
76.687 30.971 0.87047619047619
76.753 31.034 0.87053571428571
76.819 31.097 0.87059523809524
76.885 31.16 0.87077380952381
76.418 31.102 0.845
76.485 31.164 0.84511904761905
76.552 31.226 0.84529761904762
76.619 31.288 0.84553571428571
76.687 31.35 0.84589285714286
76.214 31.296 0.81946428571429
76.283 31.357 0.8197619047619
76.351 31.418 0.82011904761905
76.42 31.479 0.82053571428571
76.488 31.54 0.8210119047619
76.011 31.489 0.79392857142857
76.08 31.549 0.79440476190476
76.15 31.609 0.79494047619048
76.22 31.67 0.79553571428571
76.289 31.73 0.79625
75.807 31.683 0.76845238095238
75.878 31.742 0.76910714285714
75.949 31.801 0.7697619047619
76.02 31.861 0.77059523809524
76.091 31.92 0.77142857142857
75.624 31.843 0.74767857142857
75.695 31.902 0.75083333333333
75.766 31.961 0.75404761904762
75.837 32.02 0.75738095238095
75.908 32.08 0.76071428571429
75.459 31.969 0.73154761904762
75.529 32.029 0.73958333333333
This is the output image I am getting on running the above command


