Skip to content

[plotting routines] Fix x-axis ticks and repurpose sampling factor argument for unit scaling

Arin Wongprommoon requested to merge hotfix-issue-020 into master

Specifying a sampling period via the sampling_period argument duplicated multiplying the horizontal axes by a scaling factor.

This is because recent changes to postprocessor (see last paragraph of commit) makes the columns of DataFrames show absolute time units (e.g. [0, 5, 10, 15...] if the images were taken every 5 minutes). Previously, columns showed time points (e.g. [0, 1, 2, 3...]). All routines relied on column labels to define the horizontal axis.

These recent changes mean that the sampling_period argument is no longer necessary. However, instead of deleting this argument, I've decided to repurpose it for unit scaling, e.g. from minutes to hours. Operationally, nothing has changed, but the meaning of the argument has changed, and I've updated the docstrings accordingly.

This commit may affect horizontal axes of plots affected; users should inspect the axes carefully, especially if the source data relies on postprocessor.grouper.

This bug was likely caused by 119a8a12 on 2022-06-16 14:21. It is unclear from the commit message, but I suspect that this commit attempted to incorporate the image sampling interval into defining the DataFrame columns produced by postprocessor. This commit addresses issue #20 (closed).

Merge request reports