Closed danoneata closed 2 years ago
I agree withName is a bit too aggressive for python. It looks like there is also a with_names function though that might be better.
It looks like there is also a with_names function though that might be better.
Yes, you are right, with_names
looks more appropriate for us. I've replaced with_name
with with_names
and added some examples (translated from Haskell) in the documentation.
I think I'll move the task of adding labels to arrows to a separate issue (and PR) since it appears a bit more involved at first sight, especially if we want it to work on arrows with arbitrary trails (shafts).
This PR addresses #113, but it's still work in progress. I've started by fixing the example from that issue and by following the plan laid out by Sasha. The next steps are to add the extra functionality.
TODO
get_location
to retrieve the local origin of theSubdiagram
qualify
diagram names by prefixing them with a given namewith_name
(unclear whether this function can be used easily in Python, given that its most natural style involves nested lambda expressions)boundary_from
to return points on the boundary of a givenSubdiagram
given a direction vectorshow_labels
to show label names on top the diagramDeferred sub-tasks:
style
as an attribute to theSubdiagram
class (since it was unclear to me whether this is useful for the current API)