NCL Home> Application examples> Plot techniques || Data files for some examples

Example pages containing: tips | resources | functions/procedures

Adding logos to an NCL plot

This page uses ngezlogo and nglogo to attach NCAR and UCAR logos to an NCL plot.

It also shows how to use ImageMagick's "composite" tool to overlay a logo that's an image file, like "ncar-logo.png" or "nsf.jpg", on an existing PNG image.

logo_1.ncl: Demonstrates how to add a quick NCAR logo to the right bottom corner of a plot.

Note that when viewed in X11 or ncgm mode the logo is black and white. The postscript version that created the png image below displays the logo in color. This occurs because X11 and ncgm can not contain two colormaps (the logo contains its own 254 colors).

ngezlogo is the procedure that adds the logo.
logo_2.ncl: Places a large UCAR star on the plot

nglogo is the procedure that allows the user to select the type and location of the logo.

Arguments are: (workstation name, xcoord, ycoord, size in ndc coord, type, colorindex, colorindex for type=5)

types:
1 = NCAR logo
2 = UCAR logo (Star symbol)
3 = The text "NCAR" in Bell Gothic Black font
4 = The text "UCAR" in Bell Gothic Black font
5 = UCAR star logo plus "UCAR" text
logo_3.ncl: Demonstrates type 5 logo (UCAR star and text)
logo_4.ncl: This script shows how to attach a logo to an NCL plot.

The logo can be in any image file, like "xxx.jpg" or "xxx.png". In this example the NCL plot is sent to a PNG image, and the "ncar-logo.jpg" logo is attached to the lower left corner. This example should also work for PS and PDF output.

ImageMagick's "composite" tool is used to overlay the image, via an NCL system call. There are lots of options available with the "composite" tool. See http://www.imagemagick.org/script/composite.php.