[ncl-talk] Smoothing option and graphics question

Mary Haley haley at ucar.edu
Wed Jun 24 13:04:34 MDT 2015


Pallavi,

If by the "black portion" you mean the line contours, then there's not
really a resource to smooth line contours. You can look at our "smth9"
function, and there's an example at:

http://www.ncl.ucar.edu/Applications/lat_time.shtml#ex1

Regarding the squeezed plots: this is what I was trying to point out in the
lab, that you had asked to have a certain width and height of your plot,
but this causes your map plot to be skewed, which you generally don't
want.  If you don't set the mpShapeMode resource at all, then you will get
a non-skewed plot.

Regarding why the "title is on top".  I assume you mean that it is very
close to the edge?  If so, then yes, this is caused by using the "-trim"
option. This shouldn't be an issue, because while it is very close to the
edge, it shouldn't be cutting anything off.  You can try leaving "-trim"
off, and see how this looks.

To specify two titles, you can set a carriage return in the middle of your
title, using the special "~C~" syntax:

res_U at txString          = "Monthly Average Aerosol~C~Optical Depth AOD @
550nm"

This will cause the title to look like this:

Monthly Average Aerosol
Optical Depth AOD @ 550nm

So you might need to add some spaces to the first part if you want it
centered:

res_U at txString          = "   Monthly Average Aerosol~C~Optical Depth AOD @
550nm"

--Mary








On Tue, Jun 23, 2015 at 4:00 PM, Pallavi Marrapu - NOAA Affiliate <
pallavi.marrapu at noaa.gov> wrote:

> Hi,
>  I am looking for smoothing option for the plot. The following attachment
> has the plot.
> The black portion needs to be smoothed.
> I used following option but it did not really help out.
> res at cnRasterSmoothingOn = True
> res at cnSmoothingDistanceF = 15
> res at cnSmoothingTensionF  = 1
> Could you tell me how to use the smoothing option in the script.
>
> Another question is regarding title position.
> The aod.png has aod plot. but if you look at the plots they look squeezed
> Is it because of the aspect ratio specified?
>
> Edit the Aspect ratio of the plot
>
>   res at mpShapeMode = "FreeAspect"
>   res at vpWidthF    = 0.8
>   res at vpHeightF = 0.5
>
>
> and the title also is almost on the top.
> I use trim option is that the reason for the title to move up?
>
>
> res_U at txString          = "Monthly Average Aerosol Optical Depth AOD @
> 550nm"
>   res_U at txFontHeightF = 0.025
>
> How do I specify title in two rows instead of one long lengthy ?
>
> Could you help me with this.
> Thanks
> Pallavi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150624/976b54c8/attachment.html 


More information about the ncl-talk mailing list