toyplot icon indicating copy to clipboard operation
toyplot copied to clipboard

Point extents func to fit marker size + stroke

Open eaton-lab opened this issue 1 year ago • 6 comments

I updated the .extents() for Point Marks to return extents of its markers as msize / 2 + stroke, unless marker type is "rNxM", where it gets height and width from the marker. I'm not sure if there are other non-symmetric markers that need to be accommodated. I've had something like this implemented in toytree for a while and it seems to work well. Thought it would be good to share. I believe this addresses Issue #164

BEFORE

image

AFTER

image

CONFIRMATION

This shows the new extents seem quite accurate by suppressing the padding and margin: image

eaton-lab avatar Apr 22 '23 19:04 eaton-lab