-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Range Mappings #27942
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
Hi can you please add a picture, b/c I'm having trouble visualizing what you're asking for. If I'm following your feature request correctly, and I'm not sure that I am, I'd be concerned about the ambiguity introduced by supporting pairs. If I am following, please explain how it's an improvement over the ways in which we already support plotting segments:
And we support donut plots via: |
@ersinesen we are pretty conservative about what new methods we will add and support. In general, you need to argue wide possible use, and/or that your method requires operating on Matplotlib at a lower level than the already supported API. I don't see that the proposal here passes either bar. It seems like a straightforward use of bars with an idiosyncratic labelling standard. This would seem to be fine as a standalone package. You may find https://github.com/matplotlib/matplotlib-extension-cookiecutter useful. |
If I'm following, this looks like something you want on annotations? possibly as part of the coordinate system? Could it possibly fall under a usecase of #22223 |
I think annotations are the wrong tool here. If you want lines, I'd add a
Alternatively, a
|
Note also, that this is an ideal case to write a custom helper function (see also the section "Write your own wrapper function" at https://github.com/timhoffm/using-matplotlib/blob/main/05_Libraries_using_Matplotlib.ipynb). e.g. for the above LineCollection example:
so that you for doing a concrete plot you only need to:
|
@timhoffm I thought we had an example of writing a wrapper in our docs, but I can't find it easily. Would you consider adding an example like that? |
Sure. I believe it should get a new tile here? https://matplotlib.org/devdocs/users/index.html#users-guide-index |
Probably. Maybe the scope of "customizing matplotlib" could start to be expanded beyond just rcParams |
I applied @timhoffm 's LineCollection solution to bar-to-circle mapping.
|
Out of scope for this request, but I really think that if that tutorial is expanded then the rcParams documentation (the included rcParams file) should first be pulled out into a standalone document. |
Is there anything to do here? I've put the topic on custom helper functions (#27942 (comment)) in a separate issue : #28248 -> done for the scope of this issue The only other possible action I see is: Do we want a range mapping example? If so, I think #27942 (comment) is a good candiate. The circle mapping seems a bit too special and can be inferred from the standard bar example. |
Actually we do have a short desc of that, but it takes a little bit to find: https://matplotlib.org/stable/users/explain/quick_start.html#making-a-helper-functions |
I'm going to close this - it is too specialized a visualization with too many permutations on possible data organizations for us to handle in general. |
On my to-do list (but it has been there for 3 years) is to move https://github.com/tacaswell/2021-03_APS/tree/main/code/harmonic_oscilator into the main docs. |
Problem
I want to plot mappings between ranges. For instance x is the independent variable and f1, f2 are corresponding ranges:
Proposed solution
Here is my raw implementation for 2 cases: Bar-to-bar, Bar-to-semicircle.
Bar to Bar
Bar to circle
Colab example
The text was updated successfully, but these errors were encountered: