Re: NCL graphic output size and margin problem

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 18 2013 - 15:48:38 MDT

Hi Bo,

Currently, NCL can fill plotting surfaces with an un-square aspect ratio only in the case of PDF or PS output. PNG output is constrained to drawing within the largest square centered in the drawing surface. To generate a high resolution PNG file that fills the plot in the horizontal direction you will need to set wkHeight to the same value as wkWidth. You can then use the ImageMagick convert tool to remove the extra white space. We hope to make PNG output work more like PDF and PS in the future.
 -dave

On Sep 18, 2013, at 3:24 PM, "Dong, Bo" <bdong@albany.edu> wrote:

> Hi All,
>
> I'm trying to output a png figure, however the white margin of the figure is too large (as the attached figure showing). Is there any method to minimize the white margin area? I use the following resources:
> wtype = "png"
> wtype@wkWidth = 2500
> wtype@wkWidth = 2500
> wks = gsn_open_wks(wtype,"ninocorrT")
> gsn_define_colormap(wks,"BlueWhiteOrangeRed")
>
> res@mpFillOn = False
> res@cnFillOn = True
> res@cnLinesOn = False
> res@gsnSpreadColors = True
> res@gsnSpreadColors = True
> res@lbLabelAutoStride = True
> contour = gsn_csm_contour_map(wks,crr,res)
>
> I also tried
>
> res@gsnMaximize = True and
> res@mpShapeMode = "FreeAspect" and
> res@gsnMaximize = True
>
> but it seems that none of them can address this problem.
> Does anybody have any idea about this issue?
>
> thanks,
> Bo
>
>
> <ninocorrT.000002.png>_______________________________________________
> 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 Wed Sep 18 15:48:49 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 01 2013 - 14:41:43 MDT