taborlab / FlowCal

Python Flow Cytometry Calibration Library
MIT License
48 stars 23 forks source link

Messed up tick values in logicle plots #314

Closed castillohair closed 4 years ago

castillohair commented 5 years ago

With matplotlib version 3.1.0 and above, there are many weird overlapping tick values on the lower side of each axis when using the logicle scale. Example:

clustering_B0001

castillohair commented 5 years ago

In c4de325212922cf3c82dc884202d00b072ca079c, the function _LogicleLocator.tick_values() is returning tick values outside of the range specified by arguments vmin and vmax. For example, values for the plot above were [ -10. 0. 10. 100. 1000. 10000.]. In this case, -10 should not be there. Maintaining these values throughout the function is necessary for some calculations (e.g. when minor ticks need to be placed close to an edge when the next major tick is outside range). While they should have been filtered out before being returned, previous matplotlib versions seemed to ignore these incorrect values. But now that is not the case, so they must be filtered appropriately before being returned.