TABLE OF CONTENTS


::pwtk::ldos_multiplot

SYNOPSIS

proc ::pwtk::ldos_multiplot {args} {

USAGE

   ldos_multiplot ?-e E_FERMI|PWO_FILE?  ?-xr XMIN:XMAX?  ?-yr YMIN:YMAX?  ?-yf YFORMAT?  ?-lm LEFT_MARGIN?  \
                  ?-nx NX?  ?-np NP?  ?-t TERM?  ?-s PX,PY?  ?-o ORIENT?  ?-v?  pdosFileLL head

DESCRIPTION

Visualize specified LDOSes as a "multiplot" with aid of Gnuplot.

ARGUMENTS

The structure of the pdosFileLL list-of-lists is the following:

      set pdosFileLL {
          {pdosFile1 pdosFile2}
          {pdosFileX pdosFileY pdosFileZ}
          pdosFileW
      }

For each list element in pdosFileLL, a plot is generated. Hence, the number of generated plots is [llength $pdosFileLL]. For the above example, three LDOS plots are created. The 1st plot displays the LDOSes for pdosFile1 and pdosFile2, the 2nd plot displays the LDOSes for pdosFileX, pdosFileY, and pdosFileZ, etc.

OPTIONS

Note that options are optional and any number of them can be specified.

RETURN VALUE

Filename of the created image (for file terminals) or the empty string (for window terminals).

SOURCE

    set xdos LDOS
    set mode multi
    printTitle $xdos "Multiplot $xdos plotting"        
    xdosParseOptions_
    xdosGnuplotOptions_

    #
    # make an LDOS plot for each list element in $pdosLL
    #
    
    set ith 0
    set ipage 1
    foreach pdosL $pdosLL {
        #
        # filledcurves
        #
        set lt 1
        set plot {}
        foreach pdos $pdosL {
            set kres [pdos_kresolved $pdos]
            set spin [pdos_spin $pdos]
            set Ei   [expr 1 + $kres]
            set Yi   [expr 2 + $kres]
            append plot "     '$pdos' u (\$$Ei-Efermi):(\$$Ei-Efermi <= 0.0 ? \$$Yi : 0/0) not w filledcurve y1=0.0 lt $lt, \\\n"            
            if { $spin } {
                set Yi [expr 3 + $kres]
                append plot "     '$pdos' u (\$$Ei-Efermi):(\$$Ei-Efermi <= 0.0 ? -\$$Yi : 0/0) not w filledcurve y1=0.0 lt $lt, \\\n"
            }
            incr lt
        }
        append plot "    \\\n"

        #
        # lines
        #
        set lt 1
        foreach pdos $pdosL {
            set kres [pdos_kresolved $pdos]
            set spin [pdos_spin $pdos]
            set Ei   [expr 1 + $kres]
            set Yi   [expr 2 + $kres]
            if { $lt > 1 } {
                append plot ", \\\n"
            }
            append plot "     '$pdos' u (\$$Ei-Efermi):(\$$Yi) t '$pdos' w l lt $lt lw 2"            
            if { $spin } {
                set Yi [expr 3 + $kres]
                append plot ", \\
     '$pdos' u (\$$Ei-Efermi):(-\$$Yi) not w l lt $lt lw 2"
            }
            incr lt
        }
        $gp plot $plot
    }

    xdosExecGnuplot_ 
    return $outputs
}