rsagroup / rsatoolbox

Python library for Representational Similarity Analysis
MIT License
183 stars 38 forks source link

RDM plot icons: _add_descriptor_icons() group offset scaling is negated #378

Open JasperVanDenBosch opened 10 months ago

JasperVanDenBosch commented 10 months ago

To calculate the offset of a group of icons from the axis, a pixel value is calculated in a way such that the scaling is applied, then negated again:

https://github.com/rsagroup/rsatoolbox/blob/0f1e77ae6f3a666575101f7f71a0ab72e35dcbf5/src/rsatoolbox/vis/rdm_plot.py#L539

This should probably be:

offset = (im_max_pix / icon_spacing) * size