Top Bottom Area Charts

Top Bottom Area Charts present two distinct area charts within the same visual space, each operating on its own y-axis. This design facilitates the comparison of datasets with differing scales. The chart effectively juxtaposes two datasets, allowing for clear discernment of patterns or correlations between them, even when they operate on different magnitudes or units.

The Method To Use

The method is s.plt.top_bottom_line().

It must contain the following input variables:

data: Union[str, DataFrame, List[Dict]]
order: int
x: str

Accepts the following input variables as optional:

top_names: Optional[List[str]] = None, 
bottom_names: Optional[List[str]] = None,
rows_size: int = 4, 
cols_size: Optional[int] = None,
padding: Optional[str] = None, 
title: Optional[str] = None,
x_axis_name: Optional[str] = None, 
top_axis_name: Optional[str] = None,
bottom_axis_name: Optional[str] = None, 
option_modifications: Optional[Dict] = None

Examples

This is the .csv that will be used for the example:The Method To Use

The method is s.plt.top_bottom_line().

It must contain the following input variables:

data: Union[str, DataFrame, List[Dict]]
order: int
x: str

Accepts the following input variables as optional:

top_names: Optional[List[str]] = None, 
bottom_names: Optional[List[str]] = None,
rows_size: int = 4, 
cols_size: Optional[int] = None,
padding: Optional[str] = None, 
title: Optional[str] = None,
x_axis_name: Optional[str] = None, 
top_axis_name: Optional[str] = None,
bottom_axis_name: Optional[str] = None, 
option_modifications: Optional[Dict] = None

Examples

This is the .csv that will be used for the example:

The following code:

s.plt.top_bottom_area(
    data=pd.read_csv('Rainfall and flow.csv'), 
    order=0, x='Date',
    top_names=['flow'], bottom_names=['rainfall'],
    title='rainfall and flow', x_axis_name='Date',
    top_axis_name='flow(m³/s)', bottom_axis_name='rainfall(mm)'
)

Variants

By setting the parameter variant to the following values the appearance of the chart can be changed:

Last updated