nested_grid_plotter.add_xaxis_twin_as_date#
- nested_grid_plotter.add_xaxis_twin_as_date(ax: Axes, first_date: datetime, time_units: Literal['days', 'd', 'months', 'm', 'years', 'y'] = 'days', time_format: str = '%d-%m-%Y', spine_outward_position: float = 48.0, date_rotation: float = 15.0, position: Literal['top', 'bottom'] = 'bottom') Axes[source]#
Add dates to an already existing axis.
Deprecated since version 1.2: Use
add_twin_axis_as_datetime()instead.The dates are creating from a first day axis (numbered from x to n), taking the time series first date as the starting date.
- Parameters:
ax (Axes) – The axis for which to add a twin xaxis.
first_date (datetime) – Date associated with the first data point.
time_units (Literal["days", "d", "months", "m", "years", "y"], optional) – Unit of time between two data points. The default is “days”.
time_format (str, optional) – Time format for display. The default is “%d-%m-%Y”.
spine_outward_position (float, optional) – The spine is placed out from the data area by the specified number of points (Negative values place the spine inwards). The default is 48.0.
date_rotation (float, optional) – Rotation angle in degrees to apply to ticks labels (in degrees, counterclockwise). The default is 15.0.
- Returns:
The created date xaxis.
- Return type:
Axes