| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

Public Member Functions | Public Attributes

# ExcelPlotter::Excel Class Reference

List of all members.

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

## Detailed Description

Definition at line 4 of file ExcelPlotter.py.

## Constructor & Destructor Documentation

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

Definition at line 5 of file ExcelPlotter.py.

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

## Member Function Documentation

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

Definition at line 12 of file ExcelPlotter.py.

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

## Member Data Documentation

ExcelPlotter::Excel::ch

Definition at line 5 of file ExcelPlotter.py.

ExcelPlotter::Excel::ex

Definition at line 5 of file ExcelPlotter.py.

ExcelPlotter::Excel::ser

Definition at line 12 of file ExcelPlotter.py.

ExcelPlotter::Excel::wb

Definition at line 5 of file ExcelPlotter.py.

ExcelPlotter::Excel::ws

Definition at line 5 of file ExcelPlotter.py.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines