TABLE OF CONTENTS


::pwtk::ldos_plot

SYNOPSIS

proc ::pwtk::ldos_plot {args} {

USAGE

   ldos_plot ?-e E_FERMI|PWO_FILE?  ?-xr XMIN:XMAX?  ?-yr YMIN:YMAX?  ?-yf YFORMAT?  ?-lm LEFT_MARGIN? \
             ?-t TERM?  ?-s PX,PY?  ?-v?  pdosFileL head

DESCRIPTION

Visualize the specified LDOSes as a "single-plot" with aid of Gnuplot.

ARGUMENTS

The pdosFileL is a plain list consisting of PDOS files, i.e.:

      set pdosFileL {
          pdosFile1 pdosFile2 pdosFile3 ...
      }

For each file in the list, the LDOS will be plotted in a "single-plot".

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 single
    printTitle "$xdos plotting"
    xdosParseOptions_ 
    xdosGnuplotOptions_
    
    # make an LDOS plot for file in $pdosLL

    #
    # filledcurves
    #
    set lt 1
    foreach pdos $pdosLL {                            
        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 $pdosLL {
        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
}