Gaudi Framework, version v22r2

Home   Generated: Tue May 10 2011
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

Definition at line 5 of file ExcelPlotter.py.

Definition at line 5 of file ExcelPlotter.py.

Definition at line 12 of file ExcelPlotter.py.

Definition at line 5 of file ExcelPlotter.py.

Definition at line 5 of file ExcelPlotter.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Tue May 10 2011 18:55:18 for Gaudi Framework, version v22r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004