Re: smoothing xy line plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 03 2012 - 12:50:13 MST

Xi,

Can you email me the PDF and PNG in a separate message?

You can also try direct PNG output. Replace the "pdf" in your gsn_open_wks to "png". If you want to increase the size of the PNG, then do this:

   wtype = "png"
   wtype@wkWidth = 2500 ; just an example
   wtype@wkHeight = 2500
   wks = gsn_open_wks(wtype,"example")

NCL always draws its graphics to a square, so if you enter a non-square size for wkWidth/wkHeight, the image will be put in a square the size of the smallest of the two.
This may cause your image to have additional white space, so you may still need to call "convert" to do the "-trim" part.

--Mary

On Dec 3, 2012, at 12:42 PM, Xi Chang wrote:

> Dear NCL and Mary
>
> Yes, weighted least squares polynomial fit is what i need.
> I have another problem of converting the "pdf" output of line plots produced by NCL using this command:
>
> convert -trim +repage -density 100 resting_atm.pdf resting_atm.png
>
> Some of colors of the line plot are dissaperead and worst.
> Anybody has experience in hadling this problem? or saving the *png output using NCL with
> high resolution output?
>
> Thanks a lot
>
> == Xi
>
>
>
>
>
>
>
> On Tue, Dec 4, 2012 at 2:26 AM, Mary Haley <haley@ucar.edu> wrote:
> See also example scatter_9.ncl at:
>
> > http://www.ncl.ucar.edu/Applications/interp1d.shtml
>
> This uses lspoly.
>
> --Mary
>
> On Dec 3, 2012, at 10:06 AM, Mary Haley wrote:
>
> > We don't have any graphical resources that you can use for smoothing a line, but do you mean something like the function "lspoly" or "ftcurv"?
> >
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/lspoly.shtml
> > http://www.ncl.ucar.edu/Document/Functions/Built-in/ftcurv.shtml
> >
> > You can see a graphical example of ftcurv at:
> >
> > http://www.ncl.ucar.edu/Applications/interp1d.shtml
> >
> > --Mary
> >
> >
> > On Dec 2, 2012, at 3:28 PM, Xi Chang wrote:
> >
> >> HI NCL,
> >>
> >> Is there any way how to smooth the xy line plot using NCL?
> >>
> >> Thanks a lot
> >> Xi
> >> _______________________________________________
> >> ncl-talk mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 3 12:50:23 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST