-
Notifications
You must be signed in to change notification settings - Fork 422
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
Declarative Plotting Interface Improvements #1016
Comments
I've played a bit with the declarative syntax and here are some of the things that would be nice to have incorporated. Some easier than others, but want to document them here.
|
Documentation can be improved by:
class Plot2D(HasTraits):
field = Unicode()
field.__doc__ = """Name of field to plot
More documentation about field.
""" this would override the documentation that's built-in. Unfortunately, as noted in ipython/traitlets#461, providing the |
I see a checkmark next to "Improve documentation of trait settings..." above, but when I try this in a notebook:
I get:
Ideally, each trait would have a one-line definition included (similar to what you see when you first run, say, sfmap) Then, trying
until I define it. Then I get:
which is more informative, but presents something of a bootstrap problem to the user, as you don't necessarily know how to define a trait w/o the documentation in the first place. In GEMPAK, I can do (p)help dattim whether I've set that parameter to anything or not. Yes, you can go to documentation in another browser tab, but it does reduce the introspection some. |
To be more specific, the documentation here is great: The Attributes Summary is basically what I'm looking to be included in the output of Actually, doing Maybe what we have is the best it can be, but there is a bit of friction here. |
It looks like #2016 may address some of this, but looking through the traitlets documentation, I wonder if adding I might play around with this and see what happens. |
If you come up with any leads on things that help address the shortcomings you're running into, we're happy to take a look. |
I don't think I see this one above:
#1691 is related. |
@kgoebber I know we talked about coloring map layers before, and now I don't remember where we ended up. I have a fuzzy inkling around "I don't want to add a ton of styling traits..." |
Yes, I think we want to be choosy, but I think adding a `layer_color` trait is one that would be worth it…relatively low hanging fruit for quite a bit of gain, especially if plotting satellite data.
…--
Kevin Goebbert, Ph.D.
Associate Professor of Meteorology
Kallay-Christopher Hall, 201-F
1809 Chapel Drive Valparaiso, IN 46383
(219) 464-5517
fax: (219) 548-7738
https://kevingoebbert.youcanbook.me/
On Aug 24, 2021, 3:37 PM -0500, Ryan May ***@***.***>, wrote:
@kgoebber I know we talked about coloring map layers before, and now I don't remember where we ended up. I have a fuzzy inkling around "I don't want to add a ton of styling traits..."
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
I know there are ways to accomplish this when using matplotlib directly, but I haven't discovered a way to achieve the same effect with the declarative interface.
|
[ ] When #1689 is solved, add an attribute that ties into the max/min plotting (akin to the GEMPAK HILO parameter). |
@sgdecker Yes, I think that would be good to do. I do have some code that finds extrema and is in a couple of the examples on the old gallery site, but I need to refine it and make the contribution. |
After using the declarative plotting interface in some examples, here are some suggestions for improvements to the declarative plotting interface. I'd propose that this is a 'living issue' and contributed to by any and all with individual issues/PRs being raised as this wish list is addressed.
layout
attribute on a panel with a tuple of the location as in matplotlib.(1, 2, 2)
While that behavior is fine, when adding panels to the panel container we just pass a simple list. It would be desirable to have the capability to not set the layout attribute and determine the layout by passing a list of lists. For example to layout a 2x2 figure it would bepc.panels = [[p1, p2], [p3, p4]]
.The text was updated successfully, but these errors were encountered: