TABLE OF CONTENTS


plot::cmdlineOpts

SYNOPSIS

    method cmdlineOpts {optVar} {

PURPOSE

A convenience method to facilitate easier handling of command-line options used by scanpar.tcl, pdos.tcl, bands.tcl, etc.

ARGUMENT

SOURCE

        upvar $optVar opt
        ::pwtk::gp::checkCmdlineOpts_ opt

        ::pwtk::ifnotempty opt(xt)  { my set xtics $opt(xt) }
        ::pwtk::ifnotempty opt(yt)  { my set ytics $opt(yt) }
        ::pwtk::ifnotempty opt(x2t) { my set x2tics $opt(x2t) }
        ::pwtk::ifnotempty opt(y2t) { my set y2tics $opt(y2t) }

        ::pwtk::ifnotempty opt(mx)  { my set mxtics $opt(mx) }
        ::pwtk::ifnotempty opt(my)  { my set mytics $opt(my) }
        ::pwtk::ifnotempty opt(mx2) { my set mx2tics $opt(mx2) }
        ::pwtk::ifnotempty opt(my2) { my set my2tics $opt(my2) }

        ::pwtk::ifnotempty opt(xl)  { my set xlabel [::pwtk::squote $opt(xl)] }
        ::pwtk::ifnotempty opt(yl)  { my set ylabel [::pwtk::squote $opt(yl)] }
        ::pwtk::ifnotempty opt(x2l) { my set x2label [::pwtk::squote $opt(x2l)] }
        ::pwtk::ifnotempty opt(y2l) { my set y2label [::pwtk::squote $opt(y2l)] }

        ::pwtk::ifnotempty opt(xr)  { my set xrange [::pwtk::rangequote $opt(xr)] }
        ::pwtk::ifnotempty opt(yr)  { my set yrange [::pwtk::rangequote $opt(yr)] }
        ::pwtk::ifnotempty opt(x2r) { my set x2range [::pwtk::rangequote $opt(x2r)] }
        ::pwtk::ifnotempty opt(y2r) { my set y2range [::pwtk::rangequote $opt(y2r)] }

        ::pwtk::ifnotempty opt(xf)  { my set format "x [::pwtk::squote $opt(xf)]" }
        ::pwtk::ifnotempty opt(yf)  { my set format "y [::pwtk::squote $opt(yf)]" }
        ::pwtk::ifnotempty opt(x2f) { my set format "x2 [::pwtk::squote $opt(x2f)]" }
        ::pwtk::ifnotempty opt(y2f) { my set format "y2 [::pwtk::squote $opt(y2f)]" }

        ::pwtk::ifnotempty opt(tm) { my set tmargin $opt(tm) }
        ::pwtk::ifnotempty opt(bm) { my set bmargin $opt(bm) }
        ::pwtk::ifnotempty opt(lm) { my set lmargin $opt(lm) }
        ::pwtk::ifnotempty opt(rm) { my set rmargin $opt(rm) }

        ::pwtk::ifnotempty opt(key)   { my set key  $opt(key) }
        ::pwtk::ifnotempty opt(grid)  { my set grid $opt(grid) }
        ::pwtk::ifnotempty opt(title) { my set title $opt(title) }

        ::pwtk::ifnotempty opt(x) { my add $opt(x) }
    }