-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add a "ruler" tool to the plot UI #7216
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
attn @OceanWolf @fariza |
This is a great idea and no so difficult to implement. |
Cool! I think there are a couple possible ways to go here:
All of which have pros and cons. |
Looks awesome. |
@tacaswell @fariza Thanks for the input! It seems like I haven't contributed to anything yet. Whats the general process? |
Perfect. Thanks @tacaswell . |
I am trying to figure out the best way to deal with the 'detailed text' (i.e. length, dx, dy and angle at the bottom left corner). Currently I am using a figure text and updating it as the ruler moves. This doesn't seem ideal. Is there any way to add text it to the UI like the coordinates? Alternatively, it would be nice to support multiple axes. Currently, the detailed texts just stack on top of each other there are multiple axes or multiple rulers in a figure. Any ideas on how to support this? I could just add more figure textgs and offset thme this gets expensive to draw, and its difficult to make sure they dont overlap. |
The problem with the message area (where the coordinates are displayed) is
that the space is limited.
Y would suggest using a legend, that could be relocated by the user
…On Apr 26, 2017 7:11 PM, "Tarren Peterson" ***@***.***> wrote:
I am trying to figure out the best way to deal with the 'detailed text'
(i.e. length, dx, dy and angle at the bottom left corner). Currently I am
using a figure text and updating it as the ruler moves. This doesn't seem
ideal. Is there any way to add text it to the UI like the coordinates?
Alternatively, it would be nice to support multiple axes. Currently, the
detailed texts just stack on top of each other there are multiple axes or
multiple rulers in a figure. Any ideas on how to support this? I could just
add more figure textgs and offset though this gets expensive to draw.
[image: image]
<https://cloud.githubusercontent.com/assets/16506367/25460638/54445040-2aaa-11e7-84f6-f8940ac7cee7.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7216 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABa86UkrRSRSAihWn3p0NeiSLzuXT5ylks5rz88ZgaJpZM4KNslL>
.
|
It did not even occur to me to use a legend. Ill give it a shot. Thanks! |
Finally got around to submitting a PR for this. My first contribution to an open source project and my first code to be reviewed by others. Hopefully I did it right! Feedback is appreciated! |
Hi. First of, terranjp, thanks for taking a stab at this. This is such an essential thing that has been missing from MPL for well... ever. I was playing with it and I found 1 bug and 1 point for usability improvement. Bug: when using ctrl+m to activate/deactivate the ruler, it becomes visible upon reactivation but is no longer usable in any shape or form. It is just a static image. Also would you mind explaining why you chose ctrl+m for the binding? I don't see any mnemonic significance? Usability: Don't have separate modifer keys to align vertical/horizontal. Instead snap to the closest one based on the angle. |
@LindyBalboa Thanks for the feedback. I just realized I let this thing fall to the wayside when I got busy with other things. Ill try and find some time to update it and submit another PR, hopefully it can be part of Matplotlib. I'll take a look into that bug. I chose 'ctrl+m' to represent 'measure'. If I remember correctly ctrl+r (for "ruler") was already bound to something. If only I had added a comment about this six months or so ago... I like the usability improvement. I also want to add the ability to display an angle measured from a different axis. |
The agreement in #8774 (including from the author of the PR) was that this should go to a third-party library, so I'm going to close this. |
Uh oh!
There was an error while loading. Please reload this page.
Enhancement proposal:
Add a "ruler" like tool to the plot window.
Many other scientific data viewing programs (for example ImageJ) have this, and it is the feature I miss most often in the matplotlib plot window.
More detailed description:
Use cases:
The text was updated successfully, but these errors were encountered: