6 self.
ex = win32com.client.Dispatch(
'Excel.Application')
7 self.
wb = self.ex.Workbooks.Add()
8 self.
ws = self.wb.WorkSheets.Add()
9 self.ws.Name =
'HistoData'
10 self.
ch = self.wb.Charts.Add()
11 self.ch.Name =
'HistoPlot'
16 xmin, xmax = h.edges()
17 for i
in range(nbin) :
18 self.ws.Cells(i+1,1).value = heights[i]
19 self.ws.Cells(i+1,2).value = xmin + i*(xmax-xmin)/nbin
20 self.ch.SetSourceData(self.ws.Range(self.ws.Cells(1,1), self.ws.Cells(nbin+1,1)))
22 self.ch.ChartTitle.Text = h.title()
23 self.
ser = self.ch.SeriesCollection(1)
24 self.ser.XValues = self.ws.Range(self.ws.Cells(1,2), self.ws.Cells(nbin+1,2))
NamedRange_< CONTAINER > range(const CONTAINER &cnt, const std::string &name)
simple function to create the named range form arbitrary container