Re: gsnMaximize question

From: Sylvia Murphy (murphys AT XXXXXX)
Date: Tue Nov 18 2003 - 14:02:49 MST

  • Next message: Andres Roubicek: "time labels from netcdf file"

    Jan,

    one other thing you need to do is set gsnMaximize as a separate panel
    resource and not in the resources passed to the individual frames of the
    the panel.

    e.g.

    res = True
    various resources...

    plot(o) = gsn*(....,res)

    panel_res = True
    panel_res@gsnMaximize = True
    gsn_panel(wks,(/../),panel_res)

    in your case, you were passing your first res array to gsn_panel. This is
    not a recommend procedure. only those resources unique to panel should be
    sent to panel.

    now, are you setting the paperwidth and size resources b/c you want a plot
    that this larger than 8.5 x 11, or just b/c the gsnMaximize did not appear
    to be working.

    I would try this fix first, and then we can worry about the paper size.

    you can not create png directly from ncl. we use image magik's convert
    function to go from ps to png.

    sylvia

    On Tue, 18 Nov 2003, Mary Haley wrote:

    > >
    > > Hi,
    > >
    > > I'm trying to produce a three panel plot showing differences between
    > > mesoscale model runs. The images within the three panel plot end up being
    > > quite small. I'm using gsnMaximize and the associated paper size functions
    > > to enlarge the page size, but it does not seem to affect the paper size of the
    > > PS file.
    > > I tried writing an NCGM file, and it seemed to work fine.
    > >
    > > The gsnMaximize description says:
    > > "The aspect ratio will be preserved. For a PostScript or PDF file, the plot will
    > > be expanded to fill the biggest possible space on an 8 1/2" x 11" sheet of
    > > paper. You can change the default paper size or orientation with the resources
    > > <http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/appendixa.html#gsnPaperOrientation>
    > > gsnPaperOrientation,
    > > <http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/appendixa.html#gsnPaperMargin>
    > > gsnPaperMargin,
    > > <http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/appendixa.html#gsnPaperWidth>
    > >
    > > gsnPaperWidth, and
    > > <http://ngwww.ucar.edu/ngdoc/ng/ug/ncl/gsun/appendixa.html#gsnPaperHeight
    > > >
    > > gsnPaperHeight."
    > >
    > > Do these controls work for PS files?
    >
    > Hi Jan,
    >
    > Yes, in fact, these controls only work for PS and PDF output, and not
    > for NCGM and X11 output.
    >
    > >
    > > The relevant parts of my script are:
    > >
    > >
    > > res@gsnMaximize True ; biggest plot possible
    > > gsnPaperMargin 0.15
    > > gsnPaperWidth 10.625
    > > gsnPaperHeight 13.75
    >
    >
    > Just to be certain, did you have "res@" in front of the gsnPaper*
    > resources? In the above code, you listed them without a "res@".
    >
    >
    > > plot(0) gsn_csm_contour_map(wks,slpw(0,:,:)/100.,res) ; Draw contours
    > > over a map.
    > > .
    > > .
    > > .
    > > gsn_panel(wks,plot,(/3,1/),res) ; now draw as one plot
    > >
    >
    > One thing that can throw off the maximization routine is if you draw
    > a text string or some other object on the same frame before you draw
    > the paneled plots. By any chance are you doing that here?
    >
    > >
    > >
    > > I have attached an example image (PNG format).
    >
    > My mailer couldn't seem to handle the attached PNG file. Can you send
    > it again in another format?
    >
    >
    > > Is there a way to avoid this while writing directly to PS files?
    >
    > We should be able to get this working, but it will help once I am
    > able to see the resultant file.
    >
    > Thanks,
    >
    > --Mary
    >
    > >
    > > Thanks for your suggestions!
    > >
    > >
    > > Jan
    > >
    > >
    > > Jan F. Dutton, Ph.D.
    > > Director of Weather Services
    > > WeatherNet Business Services
    > > AWS Convergence Technologies Inc.
    > > jdutton AT aws.com
    > > 1-800-544-4429 x1662
    > _______________________________________________
    > ncl-talk mailing list
    > ncl-talk AT ucar.edu
    > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    >

    ******************************************************
    Sylvia Murphy EML: murphys AT ucar.edu
    NCAR CGD/CAS PHN: 303-497-1720
    3080 Center Green Drive FAX: 303-497-1333
    Boulder CO 80301

    WEB: http://www.cgd.ucar.edu/csm/support/
         http://www.cgd.ucar.edu/csm/support/CSM_Graphics/
    ******************************************************



    This archive was generated by hypermail 2b29 : Tue Nov 18 2003 - 14:58:52 MST