[pyngl-talk] set figure width and height
Mary Haley
haley at ucar.edu
Thu Nov 30 15:52:37 MST 2017
Hi Xiaoni,
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.
--Mary
On Thu, Nov 30, 2017 at 4:01 AM, Xiaoni Wang <xiaoni.wang at obspm.fr> wrote:
> Hi,
> 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 !
>
> Xiaoni
>
>
> 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:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20171130/9362c108/attachment.html>
More information about the pyngl-talk
mailing list