Skip to content

Commit 6103500

Browse files
authored
fixed documentation issues introduced by PR #730
1 parent fc5f277 commit 6103500

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

larray/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from larray.inout.sas import read_sas
3131
from larray.inout.stata import read_stata
3232
from larray.inout.xw_excel import open_excel, Workbook
33-
from larray.inout.xw_reporting import ExcelReport
33+
from larray.inout.xw_reporting import ExcelReport, ReportSheet
3434

3535
# just make sure handlers for .pkl and .pickle are initialized
3636
import larray.inout.pickle as _pkl
@@ -77,7 +77,7 @@
7777
# inout
7878
'from_lists', 'from_string', 'from_frame', 'from_series', 'read_csv', 'read_tsv',
7979
'read_eurostat', 'read_excel', 'read_hdf', 'read_sas', 'read_stata',
80-
'open_excel', 'Workbook', 'ExcelReport',
80+
'open_excel', 'Workbook', 'ExcelReport', 'ReportSheet',
8181
# utils
8282
'get_options', 'set_options',
8383
# viewer

larray/inout/xw_reporting.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def graphs_per_row(self):
151151
152152
See Also
153153
--------
154-
:py:obj:``~AbstractSheetReport.newline`
154+
ReportSheet.newline
155155
"""
156156
return self._graphs_per_row
157157

@@ -273,6 +273,9 @@ def add_graph(self, data, title=None, template=None, width=None, height=None):
273273
def add_graphs(self, array_per_title, axis_per_loop_variable, template=None, width=None, height=None,
274274
graphs_per_row=1):
275275
r"""
276+
Add multiple graph items to the current sheet. This method is mainly useful when multiple
277+
graphs are generated by iterating over one or several axes of an array (see examples below).
278+
The report Excel file is generated only when the :py:obj:`~ExcelReport.to_excel` is called.
276279
277280
Parameters
278281
----------
@@ -303,6 +306,8 @@ def add_graphs(self, array_per_title, axis_per_loop_variable, template=None, wid
303306
>>> sheet_pop = report.new_sheet('Population')
304307
>>> pop = demo.pop
305308
309+
Generate a new graph for each combination of gender and year
310+
306311
>>> sheet_pop.add_graphs({'Population of {gender} by country for the year {year}': pop},
307312
... {'gender': pop.gender, 'year': pop.time},
308313
... template='line', width=450, height=250, graphs_per_row=2)
@@ -395,7 +400,7 @@ class AbstractExcelReport(AbstractReportItem):
395400
396401
>>> sheet_countries.newline()
397402
398-
Add multiple graphs at once
403+
Add multiple graphs at once (add a new graph for each combination of gender and year)
399404
400405
>>> sheet_countries.add_graphs({'Population of {gender} by country for the year {year}': pop},
401406
... {'gender': pop.gender, 'year': pop.time},

0 commit comments

Comments
 (0)