Hi! I’m working on an issue where we’re working with unbounded polygons and need to bound their y axis. Because we have these new function signatures, we need to write a new Artist. Does anyone have any experience with this? Any input on where to start would be appreciated. Thank you!
I suggest first reading The Architecture of Open Source Applications (Volume 2): matplotlib which goes over the general design of Matplotlib very well (and it is still accurate after all of these years!).
The next thing I would look at is to read the source of a couple of the existing Artist
classes (the ones in mpl.patches
are probably good candidates because they are relatively simple).
The third step I suggest is to take one of those classes (e.g. Rectangle
or Polygon
) and start modifying it to explore what it does / how to break it. Hopefully from that you can get a path to deform an existing Artist
into what you need.