Results 637 comments of Antony Lee

FWIW the new buttons look not-so-great on macos (left: old, right: new):

Unfortunately I can't repro this on any of the macos versions present on GHA (which start at macos11). I suspect that the practical solution is indeed to silently ignore errors...

Could you share the script that you used to generate the first annotated plot of that guide? Thanks.

In #9545 @stevengj suggested explicitly throwing an error rather than plotting nonsense.

Per https://github.com/matplotlib/matplotlib/issues/26971#issuecomment-1743729592 I think the proper solution is to add support for knockout groups in Matplotlib's rendering model (as described in the linked comment). Otherwise implementation would be quite complex.

One thing that would help in the case here, though, is to pass use_clabeltext=True -- at least the labels rotation is correct, even though the space removed around them is...

Looking at it again, a possible fix would be to only do the linebreaking temporarily in draw(), i.e. add_label() would just register that a label needs to be added at...

If you want real Pythonic enums (that actually inherit from enum.Enum) you can reuse the P11X_DECLARE_ENUM macro I wrote in mplcairo.

(I don't really mind either way, but you mentioned that real enums may be better, so I suggested it. I can also try to explain better how it works...)

I guess to add a docstring you need to do something like `p11x::enums[py_name].attr("__doc__") = ...;` as there's no way to set it in the function-style API. The macro is explicitly...