TABLE OF CONTENTS


::pwtk::gp::defaultCmdlineOpts_

SYNOPSIS

proc ::pwtk::gp::defaultCmdlineOpts_ {which optionsVar usageVar {workflow {}}} {

DESCRIPTION

Load default command-line "short" options specs for Gnuplot (e.g. these options are used by ::pwtk::gp::plot::cmdlineOpts).

ARGUMENTS

SOURCE

    uplevel 1 [list set $optionsVar {}]
    uplevel 1 [list set $usageVar   {}]

    upvar $optionsVar options
    upvar $usageVar   usage

    switch -exact -- $which {
        plot {
            set options $::pwtk::gp::plot_options
            set usage   $::pwtk::gp::plot_usage
        }
        splot {
            set options $::pwtk::gp::splot_options
            set usage   $::pwtk::gp::splot_usage
        }
        default {
            ::pwtk::error "wrong options type, must be 'plot' or 'splot', but got '$which'" 1
        }
    }

    if { $workflow ne {} } {
        if { !([string is boolean -strict $workflow] && !$workflow) } {
            ::pwtk::setOpts_ options [subst {
                t  $::pwtk::gp::gp(workflow.terminal)
            }]
        }
    }
}