[gradsusr] edit colorbar
Sagar P Parajuli
psagar at utexas.edu
Sat Dec 12 00:45:07 EST 2015
Okay, so I found a hack for this problem. I had to plot the same graph
twice to solve this problem as below:
sdfopen cor_max_final.nc
set gxout shaded
set clevs 0 0.2 0.4 0.6 2
set ccols 4 13 3 7 2 15
d const(cor,3,-u)
sdfopen cor_max_final.nc
set gxout shaded
set clevs 0 0.2 0.4 0.6
set ccols 4 13 3 7 2
d cor
run cbarn.gs
Note that the values in cor range between 0 and 1. First, I plotted my
graph by assigning an arbitrary number 3 to the undefined value using the
const function, which I want to plot with a custom color (because normally
grads do not plot undef and it looks white as background which is not
desired). Also note that I assigned grey color (15) for any value greater
than 2 using clevs/ccols. Second, I plotted the same graph again but this
time normally without the grey color so that I can invoke the colorbar from
this second plot which now do not show the grey color at its tip.
Sincerely,
*Sagar P. Parajuli*
PhD Candidate
The University of Texas at Austin
Jackson School of Geosciences
e-mail: psagar at utexas.edu
Phone: +1 512 965 4093
Blog: parajulisagar.wordpress.com
On Fri, Dec 11, 2015 at 2:17 PM, Sagar P Parajuli <psagar at utexas.edu> wrote:
> Dear Jennifer,
> could you please suggest some idea for my problem?
>
> Sincerely,
>
> *Sagar P. Parajuli*
>
> PhD Candidate
>
> The University of Texas at Austin
> Jackson School of Geosciences
>
> e-mail: psagar at utexas.edu
> Phone: +1 512 965 4093
>
> Blog: parajulisagar.wordpress.com
>
> On Thu, Dec 10, 2015 at 11:25 PM, Sagar P Parajuli <psagar at utexas.edu>
> wrote:
>
>> Dear Jennifer, could you please elaborate your suggestion? I do not
>> follow your instruction completely. What needs to be modified within the
>> cbarn.gs script? How should the script be changed to set the maximum
>> value in the colorbar so that the colorbar shows color only upto that
>> particular value?
>>
>> Thank you,
>>
>>
>> Sincerely,
>>
>> *Sagar P. Parajuli*
>>
>> PhD Candidate
>>
>> The University of Texas at Austin
>> Jackson School of Geosciences
>>
>> e-mail: psagar at utexas.edu
>> Phone: +1 512 965 4093
>>
>> Blog: parajulisagar.wordpress.com
>>
>> On Thu, Dec 10, 2015 at 11:49 AM, Jennifer M Adams <jadams21 at gmu.edu>
>> wrote:
>>
>>> The cbar*.gs scripts use the output from ‘q shades’ to plot the color
>>> bars. You could capture this output, modify it to suit your needs, and then
>>> use the modified result in your copy of cbarn.gs. —Jennifer
>>>
>>>
>>> On Dec 10, 2015, at 12:05 PM, Sagar P Parajuli <psagar at utexas.edu>
>>> wrote:
>>>
>>> I am using cbarn.gs to generate colorbar for my plot. I have used const
>>> function to assign a custom value to the undef value and then assigned the
>>> custom value a new color using clevs/cocols. However, when I display the
>>> colorbar, the new color also appears in the colorbar. I do not want the new
>>> color to be shown in the colorbar. How can we control this?
>>>
>>> Thanks a lot.
>>>
>>> Sincerely,
>>>
>>> *Sagar P. Parajuli*
>>>
>>> PhD Candidate
>>>
>>> The University of Texas at Austin
>>> Jackson School of Geosciences
>>>
>>> e-mail: psagar at utexas.edu
>>> Phone: +1 512 965 4093
>>>
>>> Blog: parajulisagar.wordpress.com
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20151211/8864c1c2/attachment-0001.html
More information about the gradsusr
mailing list