-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
add rc param for centimeter support #1369
Comments
I agree -- requiring inches there is rather archaic. However, I don't think an rcParam is the right way to do it. I'd rather see the unit be part of the parameter, e.g.: figsize=((12, 'cm', (8, 'cm')) or figsize=('12cm', '8cm') Neither of those are perfect (more thinking needs to be done), but I think changing global state for this could be too problematic. |
Absolutely love the idea of using "unit-aware" objects instead of numbers for defining lengths and sizes as also stated in #1109. @mdboom, would you be in favour of a unit-class that supports arithmetic operators like |
Perhaps something like this? |
@WeatherGod, Thanks for the hint! I think I was looking for something like that for quite some time ^^. That tight integration with numpy seems nice. Is anyone imagining the plotting of such data with unit aware axis labelling too? ;) |
@pwuertz I don't see the benefit of unit aware plotting/axis labelling. It requires almost no effort to append |
@dmcdougall Of course this is about figure attributes and my original question to mdboom was if he is in favor of a unit class that would support arithmetic operations with ints and floats. WeatherGod came up with that project that takes this one step further. If matplotlib adapted this package, the idea of supporting it at plot level came to my mind. Think about plotting an array of times. When you decide that you want the plot to be displayed in |
That's a fair point. |
@pwuertz : I think it is worthy of a MEP. I love the idea, and would like to see this idea get developed further and discussed before we can make a sound decision about it. Would you be willing to write a MEP? EDIT: Fixed typo from PEP->MEP. Doh! |
MEP? |
Ja ja. Sorry 😃. |
A MEP for general support of physical units that focuses on properties like |
I think such a MEP would be great. I see the two pieces: one for parameters like |
Likewise. I wonder who does? |
On Thursday, October 18, 2012, Phil Elson wrote:
Ben Root |
When I got a little more time I'd like to work on these layout managing ideas and possibly write a MEP for that. As pointed out, this would also include support for units. The question is whether to wait for that layout management project (which might be a really long time) or to implement an unit aware |
+1 for quantities integration |
-1 on quantities integration. The promise is there, but it (and other http://bekolay.org/scipy2013-quantities (hit S to see notes) |
I also think quantities are out of scope. Benjamin Root notifications@github.com schrieb:
|
@WeatherGod thanks for the reference. I came across this page because I remember reading in the documentation some time ago about units in matplotlib, but then couldn't find anything that jumped out at me, only to realize that unit support had not been fully integrated in matplotlib. |
What matplotlib calls "unit support" is really the automatic conversion of complex datatypes (specifically |
👍 I think just adding support for cm (at least as a short term fix) would make life a bit easier. |
See #5104 for a possible implementation of this. |
Another +1 for implementing this in rcparams. Would be great to be able to 'set and forget' metric units. |
There is even a semi-abandoned MEP: #9226 I think the easiest least-painful idea would be a new method that was able to parse strings for width and height: |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
This would still be useful in quite a lot of situations. The most progressed PR seems to be #12415 with quite a lot of discussions about the API. |
I came away from that process convinced this is just they way it is. Figure size is one thing, but points and dpi are deeply embedded in the library. |
It would be great if I could specify a figsize in centimeters. I would like to write
instead of
I think this would be a great addition for the non-anglo-saxon world ;)
The text was updated successfully, but these errors were encountered: