|
Gaudi Framework, version v21r8 |
| Home | Generated: 17 Mar 2010 |
Public Member Functions | |
| def | __init__ |
| def | plot |
Public Attributes | |
| ex | |
| wb | |
| ws | |
| ch | |
| ser | |
Definition at line 4 of file ExcelPlotter.py.
| 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
Definition at line 6 of file ExcelPlotter.py.
Definition at line 7 of file ExcelPlotter.py.
Definition at line 8 of file ExcelPlotter.py.
Definition at line 10 of file ExcelPlotter.py.
Definition at line 23 of file ExcelPlotter.py.