[ncl-talk] axis labeling problem

Mary Haley haley at ucar.edu
Thu Nov 12 13:29:35 MST 2015


The tmXBValues and tmXBLabels resources are only for changing the labels on
the X axis.

If you actually want to change the values on the X axis to be log, then
instead of:

  res at tmXBOn       = True
  res at tmXBLabelsOn = True
  res at tmXBMode   = "Explicit"
  res at tmXBValues = spec17 at frq
  res at tmXBLabels = fspan(0,0.5,0.1)
  bot_plot(0)  = gsn_csm_xy(wks,log(spec17 at frq),splt17,res)

try:

  res at xyXStyle        = "Log"

  bot_plot(0)  = gsn_csm_xy(wks,spec17 at frq,splt17,res)

On Thu, Nov 12, 2015 at 10:20 AM, Ioana Colfescu <ioana.colfescu at ed.ac.uk>
wrote:

> Hi Mary,
> Well that's the thing - I want other values than the real ones, I d want
> to put another array than the real one - replace the values with some that
> I specify.
> Ioana
>
> On 12/11/15 17:17, Mary Haley wrote:
>
> When you set XBValues, these have to match the actual values on your X
> axis.
>
> Your X axis values are log(spec17 at frq), but you are specifying spec17 at frq
> as X axis values.
>
> Try:
>
> res at tmXBValues = log(spec17 at frq)
>
> --Mary
>
>
> On Thu, Nov 12, 2015 at 9:43 AM, Ioana Colfescu <ioana.colfescu at ed.ac.uk>
> wrote:
>
>> Hi,
>> I'm trying to make a plot and put on the x axis my own labels ( which are
>> different from the original ones).
>> For some reason I don't get any labeling and if I get the labeling I
>> don't get the plot ( the original values are negative while I want to put
>> positive values on the axis).
>> This is my code with some random values I try to give but doesn't work
>> with this either. Could someone tell me what I do wrong ? ( the plot I get
>> is attached and I'd need the values I want on the x axis).
>>
>>  res = True
>>   res at txFontHeightF  = 0.04
>>   res at gsnDraw            = False
>>   res at gsnFrame           = False
>>   res at tmXBOn       = True
>>   res at tmXBLabelsOn = True
>>   res at tmXBMode   = "Explicit"
>>   res at tmXBValues = spec17 at frq
>>   res at tmXBLabels = fspan(0,0.5,0.1)
>>   bot_plot(0)  = gsn_csm_xy(wks,log(spec17 at frq),splt17,res)
>>
>>
>> Thanks,
>> Ioana
>>
>> --
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151112/eb01ab92/attachment.html 


More information about the ncl-talk mailing list