TABLE OF CONTENTS
::pwtk::gp::new_page_plot
SYNOPSIS
proc ::pwtk::gp::new_page_plot {term pageNo pauseValue {head {}}} {
PURPOSE
Get a Gnuplot snippet for a next/new page for a single-plot. Do not confuse it with ::pwtk::gp::new_page_multiplot that is used for multiplot.
Typically used internally by PWTK.
ARGUMENTS
- term --- terminal type
- pageNo --- page number of the new page
- head --- [optional] the rootname of the Gnuplot's output file
SOURCE
variable gp array set a [pause_ $pauseValue] set term [pwtk2gp $term] if { $term in $gp(file.terminals) } { switch -- $term { pdfcairo - postscript { return "" } default { return "set output '[output $term $head $pageNo]'\n" } } } elseif { $term in $gp(win.terminals) } { set title "Page $pageNo ($a(pauseText))" set pause [expr { $pageNo > 1 ? "pause $a(pause)" : "" }] if { $term ne {} } { # this does not work for empty window terminal, {} return "$pause\nset term $term title '$title'\n" } else { # empty terminal return "$pause\n" } } elseif { $term in $gp(txt.terminals) } { # txt and empty window terminal return "" } else { ::pwtk::error "unsupported PWTK Gnuplot terminal \"$term\", must be one of [join $gp(terminals) {, }]" 1 } }