Skip to content

Commit

Permalink
Merge pull request #387 from rsagroup/new-figures
Browse files Browse the repository at this point in the history
Fix to rdm_plot icon scaling
  • Loading branch information
JasperVanDenBosch authored May 26, 2024
2 parents b49afd3 + 9fe034d commit 069928a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rsatoolbox/vis/rdm_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ def _add_descriptor_icons(
list: Tick label handles.
"""
# annotated labels with Icon
#import pdb
#pdb.set_trace()
n_to_fit = np.ceil(n_cond / num_pattern_groups)
# work out sizing of icons
im_max_pix = 20.
Expand All @@ -536,9 +538,9 @@ def _add_descriptor_icons(
ax_size_pix = max((extent.width, extent.height))
size = (ax_size_pix / n_to_fit) / im_max_pix
# from proportion of original size to figure pixels
offset = im_max_pix * size
offset = (im_max_pix / icon_spacing) * size
label_handles = []
for group_ind in range(num_pattern_groups - 1, -1, -1):
for group_ind in range(num_pattern_groups - 1, -1, -1): ## e.g. 2->1->0 for npg = 3
position = offset * 0.2 + offset * group_ind
ticks = np.arange(group_ind, n_cond, num_pattern_groups)
label_handles.append(
Expand Down

0 comments on commit 069928a

Please sign in to comment.