You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a great idea and no so difficult to implement.
For the moment I don't have the time, but if there is somebody interested I can give a hand reviewing or coaching the PR
@fariza I would be interesting in taking a stab at this PR, coaching would be helpful as I am relatively new.
I recently developed a little tool that accomplishes most of what @quazgar described. It can be found at the distro here. I would like to develop it further with some input from others.
@tacaswell@fariza Thanks for the input! It seems like widgets.py is the best fit for it. I went ahead and refactored it slightly to support python 2.7. I am looking through widgets.py now to follow the conventions used in the other widgets. I also plan to add functionality such that users can customize the ruler line and text.
I haven't contributed to anything yet. Whats the general process?
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
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.
Activity
tacaswell commentedon Oct 4, 2016
attn @OceanWolf @fariza
fariza commentedon Oct 7, 2016
This is a great idea and no so difficult to implement.
For the moment I don't have the time, but if there is somebody interested I can give a hand reviewing or coaching the PR
terranjp commentedon Apr 16, 2017
@fariza I would be interesting in taking a stab at this PR, coaching would be helpful as I am relatively new.
I recently developed a little tool that accomplishes most of what @quazgar described. It can be found at the distro here. I would like to develop it further with some input from others.
tacaswell commentedon Apr 16, 2017
Cool! I think there are a couple possible ways to go here:
widgets.py(which will require things like python 2 compatibility)All of which have pros and cons.
fariza commentedon Apr 17, 2017
Looks awesome.
I agree with @tacaswell
widgets.pymight be the best place.@terranjp do you have other idea?
terranjp commentedon Apr 18, 2017
@tacaswell @fariza Thanks for the input! It seems like
widgets.pyis the best fit for it. I went ahead and refactored it slightly to support python 2.7. I am looking throughwidgets.pynow to follow the conventions used in the other widgets. I also plan to add functionality such that users can customize the ruler line and text.I haven't contributed to anything yet. Whats the general process?
tacaswell commentedon Apr 18, 2017
See http://matplotlib.org/devel/index.html
terranjp commentedon Apr 18, 2017
Perfect. Thanks @tacaswell .
terranjp commentedon Apr 26, 2017
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.
fariza commentedon Apr 29, 2017
terranjp commentedon Apr 29, 2017
It did not even occur to me to use a legend. Ill give it a shot. Thanks!
terranjp commentedon Jun 18, 2017
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!
LindyBalboa commentedon Nov 22, 2017
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.
terranjp commentedon Nov 22, 2017
@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.
anntzer commentedon Dec 7, 2018
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.
@terranjp If you want, you can consider making a PR adding a link to your implementation at https://matplotlib.org/thirdpartypackages/index.html.