[pyngl-talk] set figure width and height
haley at ucar.edu
Thu Nov 30 15:52:37 MST 2017
You need to set this resource when you open the workstation:
wks_res = Ngl.Resources()
wks_res.wkPaperSize = "A4"
wks_type = "pdf" # A4 only works with PS and PDF
wks = Ngl.open_wks(wks_type,"xy1",wks_res)
I just tried this with the xy1.py example, and it seemed to work.
On Thu, Nov 30, 2017 at 4:01 AM, Xiaoni Wang <xiaoni.wang at obspm.fr> wrote:
> Following my previous email, I also tried
> wkres.wkWidth = 1024
> res.wkHeight = 1024
> But I got a warning : warning:wkHeight is not a valid resource in
> contour at this time
> Thanks in advance !
> Le 30 nov. 2017 à 11:33, Xiaoni Wang <xiaoni.wang at obspm.fr> a écrit :
> > Hi Dear all,
> > I tried to set figure width and height by the following line, but
> there are some warnings.
> > res.wkPaperSize = "A4"
> > res.wkPaperWidthF = 8.5
> > res.wkPaperHeightF = 14.0
> > The warnings are like in the below:
> > warning:wkPaperWidthF is not a valid resource in contour at this time
> > warning:wkPaperHeightF is not a valid resource in contour at this time
> > Is this due to the version of Pyngl that I use ? Thank you in
> advance !
> > PS: thank you Mary for your response to my previous question !
> > Best regards
> > Xiaoni
> > _______________________________________________
> > pyngl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pyngl-talk