A python package for checking and testing matplotlib plots. We use this for autograding student assignments but there are many other potential use cases including package testing (for packages with plots)!
Currently, the docstrings for the assert_xticks_reformatted() function suggest that it asserts how far apart the ticks are (i.e. 1 month apart, 1 year apart, 1 decade apart). In reality, what it does is check the formatting style for text on the ticks. For example, for loc_exp='day', it just checks whether the day is included in the formatting. (i.e. for the date January 18th, 2020, it just checks whether '18' would show up in the label.)
Additionally, this method means that the formatting would be no different between (loc_exp='decade' and loc_exp='year') or (loc_exp='month' and loc_exp='day').
Do we want this function to measure the distance between ticks? Do we want it to directly check the formatting style of the ticks?
Currently, the docstrings for the
assert_xticks_reformatted()
function suggest that it asserts how far apart the ticks are (i.e. 1 month apart, 1 year apart, 1 decade apart). In reality, what it does is check the formatting style for text on the ticks. For example, forloc_exp='day'
, it just checks whether the day is included in the formatting. (i.e. for the date January 18th, 2020, it just checks whether '18' would show up in the label.)Additionally, this method means that the formatting would be no different between (
loc_exp='decade'
andloc_exp='year'
) or (loc_exp='month'
andloc_exp='day'
).Do we want this function to measure the distance between ticks? Do we want it to directly check the formatting style of the ticks?