21.07.2015 Views

Linux Journal | December 2012 | Issue 224 - ACM Digital Library

Linux Journal | December 2012 | Issue 224 - ACM Digital Library

Linux Journal | December 2012 | Issue 224 - ACM Digital Library

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

[ UPFRONT ]X11 window, an NCAR ComputerGraphics Metafile or a PostScriptfile. This second group is dataobjects. Data objects store theactual information used in youranalysis and graphical presentation.The third group is the view objects,which represent the elements ofyour graphical representation. Thesemight be things like text objects,tick marks or contour plots, amongothers. The fourth is the group of“other” objects, which includeseverything else, such as overlays orannotations. You can create newobjects by using the commands:objectname = create "object_character_name"➥class_name parent_objectend createwhere you create a new object basedoff an existing parent object.So, what does a basic graphical displaylook like? You can generate somethingsimple with the following example:beginx11 = create "x11" xWorkstationClass defaultappend createtext = create "text" textItemClass x11end createdraw(text)frame(x11)endSave these commands into a filenamed sample1.ncl. To run it, youcan execute ncl

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!