I can't tell from this figure what Angle = 60 is relative to, since the top angle is >60 and the lower angle is <60 in the first example, and '0 degrees means perpendicular to the line' is buried in the api docs (I missed what that means like 6 times)
Suggested improvement
An example, that's cross referenced against the API docs, where the angle is marked up, similar to the scale invariant docs
I think it'd be nice to include the formulas for setting the bracket horizontal or vertical relative to the axes, but that's totally extra. I think it's a good first issue since it's completely standalone, a relatively small addition, and this information is missing.
Hello, I would like to work with that issue. However, I think I did not completely understand your idea, it is to draw the angles in the image to make it more clear, like in your sugestion?
I think by importing the ArcAnnotation class from the scale invariant example (you can cross link in the text) and using that to label the angles. I think the perpendicular can be drawn using either vlines or plot.
I then tried to update it's position at plot time. I can easily set self.arrow.yx (similar to self.text.xy) but can't access the xytext variable (arrow._arrow_relpos I believe) to tell the updated arrow where to point from.
Is it possible to set this during plot time, and if not do you have any other suggestions? Am I on the right track or is the FancyArrowPatch solution fine?
Activity
llricci commented on Jun 13, 2022
Hello, I would like to work with that issue. However, I think I did not completely understand your idea, it is to draw the angles in the image to make it more clear, like in your sugestion?
story645 commented on Jun 13, 2022
Exactly, a
llricci commented on Jun 14, 2022
@story645 Something like this?

story645 commented on Jun 14, 2022
Yup, except the angle is always between the brace and the perpendicular
llricci commented on Jun 14, 2022
I see, but I'm unsure how I would do that with matplotlib
story645 commented on Jun 14, 2022
I think by importing the ArcAnnotation class from the scale invariant example (you can cross link in the text) and using that to label the angles. I think the perpendicular can be drawn using either vlines or plot.
llricci commented on Jun 14, 2022
Ok, thanks. I'll see this tomorrow
llricci commented on Jun 15, 2022
I successfully created the lines using vlines() but I can't do the same with Arc()
jacoverster commented on Oct 7, 2022
Hi @story645, can I contribute to this issue? Is this what you are looking for:
story645 commented on Oct 7, 2022
That looks great! Go for it!!!
timhoffm commented on Oct 7, 2022
Bonus: Maybe add an arrow head to the grey arc to indicate the angle direction (from the blue line to the bracket)?
jacoverster commented on Oct 7, 2022
Sure thing @timhoffm, I'll look into that.
jacoverster commented on Oct 11, 2022
Hi @timhoffm, I looked at a few ways of adding the arrows.
One way is to simply add a FancyArrowPatch to the plot (as shown below), but this won't be scale invariant.
Secondly, I added an arrow annotation to AngleAnnotation (similar to the text annotation):
self.arrow = ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0), arrowprops=arrowprops, **self.kw)
I then tried to update it's position at plot time. I can easily set self.arrow.yx (similar to self.text.xy) but can't access the xytext variable (arrow._arrow_relpos I believe) to tell the updated arrow where to point from.
Is it possible to set this during plot time, and if not do you have any other suggestions? Am I on the right track or is the FancyArrowPatch solution fine?
7 remaining items
Updated Angles on Bracket arrow styles example to make angles clear #…
Backport PR matplotlib#24145: Updated Angles on Bracket arrow styles …
Merge pull request #24280 from meeseeksmachine/auto-backport-of-pr-24…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…
Updated Angles on Bracket arrow styles example to make angles clear m…