-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Function to draw angle between two lines #12414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for reaching out. I think this is probably a bit too specialized to get its own function in the library; on the other hand, I suppose a lot of people might make use of something like that. So to strike a balance, one could opt for providing this as an example in the gallery. From the code perspective I'm wondering if using a |
I have wondered if it would make sense to update join-style a bit to allow
for drawing arcs like this. Gotta watch out though, because usually such
arcs are drawn as a different color or linewidth than the original line.
…On Fri, Oct 5, 2018 at 3:07 PM Elan Ernest ***@***.***> wrote:
Thanks for reaching out. I think this is probably a bit too specialized to
get its own function in the library; on the other hand, I suppose a lot of
people might make use of something like that. So to strike a balance, one
could opt for providing this as an example in the gallery
<https://matplotlib.org/gallery/index.html>.
Let's see what others think.
From the code perspective I'm wondering if using a matplotlib.patches.Arc
<https://matplotlib.org/api/_as_gen/matplotlib.patches.Arc.html> wouldn't
be better suited? I also think one would usually desire this arc to be at a
fixed distance/radius to the intersecting point, independent on the axis
limits or zoom level, and also have it appear circular even with unequal
aspect. An example showing this would definitely be useful.
I haven't thought this through, so I don't know if there is a good
solution possible only with transforms or whether one would need to write a
callback for this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12414 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-KpvvIZOvl-HIYibwMjb5ud2W7lIks5uh63sgaJpZM4XKuj->
.
|
I agree about having the arc appear circular for any aspect ratio; that's something I can look into. I disagree about the fixed radius, however, as I found it useful to be able to increase or decrease the radius for my diagrams, so why not have that as an optional argument? |
Ah, my mistake, I misunderstood. I'll see if I can put together something more robust over the next few weeks. I think you're right that this may work better as a submission to the example gallery, so should I update here or is there a better place for this exchange? |
Yes, we can discuss here. Or, once you have something ready, you can submit a pull request with the example (examples are in matplotlib/examples/, though I don't currently know which category this would best fit into). |
Would anyone be interested in having a function to draw an angle? I made a function for this that you can see here:
https://github.com/AtsushiSakai/PythonRobotics/blob/master/ArmNavigation/two_joint_arm_to_point_control/Planar_Two_Link_IK.ipynb
If this is something enough people are interested in, I can clean the code up and submit a PR for it.
The text was updated successfully, but these errors were encountered: