| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# ExcelPlotter::Excel Class Reference

List of all members.

## Detailed Description

Definition at line 4 of file ExcelPlotter.py.

## Public Member Functions
def | __init__
def | plot
## Public Attributes
| ex
| wb
| ws
| ch
| ser

## Member Function Documentation

def ExcelPlotter::Excel::__init__ | ( |  | self | ) |

Definition at line 5 of file ExcelPlotter.py.

    00005                           :
    00006                 self.ex = win32com.client.Dispatch('Excel.Application')
    00007                 self.wb = self.ex.Workbooks.Add()
    00008                 self.ws = self.wb.WorkSheets.Add()
    00009                 self.ws.Name = 'HistoData'
    00010                 self.ch = self.wb.Charts.Add()
    00011                 self.ch.Name = 'HistoPlot'
            def plot(self, h):

def ExcelPlotter::Excel::plot | ( |  | self,
|  |  | h |
| ) |  |  |

Definition at line 12 of file ExcelPlotter.py.

    00012                          :
    00013                 self.ex.Visible = 0
    00014                 heights = h.heights()
    00015                 nbin = len(heights)
    00016                 xmin, xmax = h.edges()
    00017                 for i in range(nbin) :
    00018                         self.ws.Cells(i+1,1).value = heights[i]
    00019                         self.ws.Cells(i+1,2).value = xmin + i*(xmax-xmin)/nbin
    00020                 self.ch.SetSourceData(self.ws.Range(self.ws.Cells(1,1), self.ws.Cells(nbin+1,1)))
    00021                 self.ch.HasTitle = 1
    00022                 self.ch.ChartTitle.Text = h.title()
    00023                 self.ser = self.ch.SeriesCollection(1)
    00024                 self.ser.XValues = self.ws.Range(self.ws.Cells(1,2), self.ws.Cells(nbin+1,2))
    00025                 self.ex.Visible = 1
    00026
    global excel

## Member Data Documentation

ExcelPlotter::Excel::ex

Definition at line 6 of file ExcelPlotter.py.

ExcelPlotter::Excel::wb

Definition at line 7 of file ExcelPlotter.py.

ExcelPlotter::Excel::ws

Definition at line 8 of file ExcelPlotter.py.

ExcelPlotter::Excel::ch

Definition at line 10 of file ExcelPlotter.py.

ExcelPlotter::Excel::ser

Definition at line 23 of file ExcelPlotter.py.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiPython/home/ExcelPlotter.py