[ncl-talk] why do I get double Axis labels when I use gsn_csm_vector_scalar_map

xiaoming Hu yuanfangcan at hotmail.com
Fri Jul 27 16:54:13 MDT 2018


Hello Mary

   By commenting out
  "res at pmTickMarkDisplayMode = "Always" "   all the tickmark labels are gone, which is not what I wanted.

  Using your overlay method, I solved the problem, i.e., removed the extra labels.

Thanks a lot!
Xiaoming
________________________________
From: Mary Haley <haley at ucar.edu>
Sent: Friday, July 27, 2018 5:24 PM
To: xiaoming Hu
Cc: ncl-talk at ucar.edu; Xiaoming Hu
Subject: Re: [ncl-talk] why do I get double Axis labels when I use gsn_csm_vector_scalar_map

Hello,

You are setting a lot of resources that have to do with tickmarks, so that's likely the culprit.

Since there are two plots being created under the hood by this function, I wouldn't be surprised if there's a bug that is causing the tickmarks from the vector routine to be turned on.

As a test, can you try commenting this line and let ncl-talk know what happens:


  res at pmTickMarkDisplayMode = "Always"         ; turn on tickmarks

To work-around this issue, I suggest creating the contour plot over the map using gsn_csm_contour_map, creating the vector plot separately using gsn_csm_vector, and then calling overlay to overlay the vector plot on the contour/map plot.  This way, you have more control over which resources get applied to which plot.

For some help, see the overlay examples pages, and in particular, example wrf_gsn_5.ncl:

http://www.ncl.ucar.edu/Applications/overlay.shtml

Note that this example actually creates *3* plots:

1. A filled contour plot
2. A vector plot
3. A map plot using wrf_map_resources to set the map projection

Then, it uses overlay to overlay #1 and #2 on #3.  Either way is fine.

--Mary


On Fri, Jul 27, 2018 at 2:21 PM, xiaoming Hu <yuanfangcan at hotmail.com<mailto:yuanfangcan at hotmail.com>> wrote:
When I change to gsn_csm_contour_map(wks,x,res), I can use tmYLLabelsOn/tmXBLabelsOn to control the latitude and longitude axis labels.
The problem is when I use gsn_csm_vector_scalar_map(wks,u,v,x,res), why the additional axis labels (numbers) and tickmark show up and how can I control it?
I am using 6.3.0
Thanks
Xiaoming
________________________________
From: ncl-talk <ncl-talk-bounces at ucar.edu<mailto:ncl-talk-bounces at ucar.edu>> on behalf of xiaoming Hu <yuanfangcan at hotmail.com<mailto:yuanfangcan at hotmail.com>>
Sent: Thursday, July 26, 2018 2:34 PM
To: ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>; Xiaoming Hu
Subject: [ncl-talk] why do I get double Axis labels when I use gsn_csm_vector_scalar_map

why do I get double Axis labels when I use gsn_csm_vector_scalar_map
I attached both my script and part of the figure.

Thanks a lot!

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180727/17cb4deb/attachment.html>


More information about the ncl-talk mailing list