iode.ComputedTable.plotting_series_values

ComputedTable.plotting_series_values(row: int, op_files: int) Tuple[ndarray, ndarray][source]

Get the x and y values of a series to plot.

Parameters:
rowint

The row of the series to plot.

op_filesint

The operation between files to plot.

Returns:
tuple(np.ndarray, np.ndarray)

The x and y values of the series to plot.

Examples

>>> from iode import SAMPLE_DATA_DIR
>>> from iode import Table, tables
>>> tables.load(f"{SAMPLE_DATA_DIR}/fun.tbl")           
Loading .../fun.tbl
46 objects loaded
>>> # simple time series (one extra file) - 5 observations
>>> computed_table = tables["C8_1"].compute("2010[1;2]:5")
>>> computed_table              
   line title \ period[file]     |  10[1]   |  10[2]   |...|  14[1]   |  14[2]
--------------------------------------------------------...----------------------
Output potentiel                 |  6936.11 |  6797.39 |...|  7460.12 |  7310.91
Stock de capital                 | 11293.85 | 11067.97 |...| 12263.95 | 12018.67
Intensité de capital             |     0.39 |     0.38 |...|     0.36 |     0.35
Productivité totale des facteurs |     1.10 |     1.08 |...|     1.14 |     1.12

>>> x, y = computed_table.plotting_series_values(0, 0)  
>>> x
array([ 2010.,  2011.,  2012.,  2013.,  2014.])
>>> y           
array([ 6936.11201678,  7045.34306763,  7161.54144319,  7302.29025433,
        7460.11525977])
>>> x, y = computed_table.plotting_series_values(2, 1)
>>> y           
array([ 0.37778214,  0.37005591,  0.36297298,  0.35620692,  0.34945039])
>>> x, y = computed_table.plotting_series_values(3, 0)
>>> y           
array([ 1.09774397,  1.10872141,  1.11980863,  1.13100671,  1.14231678])