79565596

Date: 2025-04-10 01:52:49
Score: 1
Natty:
Report link

It seems like the head lengths of the arrows in the legend are too short. If you want to keep the -> arrow style, but want but have a reasonable legend, you can create a custom arrow style like this:

arrowstyle_legend = ArrowStyle.CurveB(head_length=0.2, head_width=0.12) # tune these numbers as needed

class ArrowHandler(HandlerBase):
    def create_artists(self, legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans):
        arrow = FancyArrowPatch((0, 3), (25, 3), arrowstyle=arrowstyle_legend, color=orig_handle.get_edgecolor(), mutation_scale=20)  # tune these numbers as needed
            return [arrow]

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: MengMeng