[ncl-talk] multi-panel wkSpaceTime

Dennis Shea shea at ucar.edu
Sat Jan 28 08:54:52 MST 2017


When I wrote the functions, my focus was on doing the computations and
graphics correctly. Paneling the graphics was not a priority. To be honest,
I did not even think about paneling. :-(

It would be possible to restructure ('refactor') the code. However, it
would require some time and .effort.
[1] copy the code:
     cp $NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl
diagnostics_cam.panel.ncl

[2] Change the local code: add 'res at gsnDraw=False' in multiple places;
change 'polyline' procedure calls to the 'gsn_add_polyline' functions, etc

---

Perhaps, using Imagemagick's  'convert' tool.

%> convert <return>

See the -append /+append options

I have not used the 'append' option very often. 'convert' has other options
that may also be of use.  See:

        http://www.imagemagick.org/Usage/layers/

This link has numerous examples.

------

Consider image1.png, image2.png, image3.png, image4.png

%> convert -append image1.png image2.png IMAGE_12.TopBottom.png
%> display IMAGE_12.TopBottom.png

%> convert -append image3.png image4.png IMAGE_34.TopBottom.png
%> display IMAGE_34.TopBottom.png

%> convert +append IMAGE_12.TopBottom.png  IMAGE_34.TopBottom.png
IMAGE_2x2.png
%> display IMAGE_2x2.png

---
This type of thing could be invoked within an NCL script to save manually
doing it. How?
After the 'image[1-4].png' have been created .... EG

 wkSpaceTime (u,  diro, case, VAR, ,latBound, spd , nDayWin, nDaySkip,
opt  ) ; create images

  system("convert -append   image1.png   image2.png
IMAGE_12.TopBottom.png")
  system("convert -append   image3.png   image4.png
IMAGE_34.TopBottom.png")
  system("convert +append IMAGE_12.TopBottom.png  IMAGE_34.TopBottom.png
IMAGE_2x2.png")
  system("rm IMAGE*TopBottom.png")

---
Two on top; one at bottom

%> convert +append image1.png image2.png IMAGE_12.LeftRight.png
%> display IMAGE_12.LeftRight.png

%> convert -append IMAGE_12.LeftRight.png   image3.png IMAGE_123.png
%> display IMAGE_123.png

I am sure you can 'center' the bottom figure but I'll leave that up to
you.  :-)

----
>From the above link: 10 figures

convert \( font_1.gif font_2.gif font_3.gif +append \) \
             \( font_4.gif font_5.gif font_6.gif +append \) \
             \( font_7.gif font_8.gif font_9.gif +append \) \
             \( -size 32x32 xc:none  font_0.gif +append \) \
               -background none -append   append_array.gif



I hope it works for you.

Good luck
D




On Fri, Jan 27, 2017 at 5:45 PM, Millie J <millie.jyo at gmail.com> wrote:

> Hi,
>
> Is there a way to plot the Wheeler-Kiladis space-time spectra (Figs. 1 to
> 3), for multiple model outputs, on a single graphic plot? Thanks.
> Jyothi
>
>
> Jyothi Nattala
> GMAO / NASA GSFC
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170128/19d44fc5/attachment.html 


More information about the ncl-talk mailing list