Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add rcParams for Axes(3D) parameters#25642
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
New rcParams for Axes creation | ||
------------------------------ | ||
A number of rcParams are introduced to control parts of the Axes creation. | ||
For a standard 2D Axes, the following are introduced: | ||
* :rc:`axes.adjustable`, see `.Axes.set_adjustable` | ||
* :rc:`axes.anchor`, see `.Axes.set_anchor` | ||
* :rc:`axes.aspect`, see `.Axes.set_aspect` | ||
* :rc:`axes.box_aspect`, see `.Axes.set_box_aspect` | ||
There are separate parameters for 3D Axes, including an additional 3D-specific one: | ||
* :rc:`axes3d.adjustable`, see `.Axes.set_adjustable` | ||
* :rc:`axes3d.anchor`, see `.Axes.set_anchor` | ||
* :rc:`axes3d.aspect`, see `.Axes3D.set_aspect` | ||
* :rc:`axes3d.box_aspect`, see `.Axes3D.set_box_aspect` | ||
* :rc:`axes3d.proj_type`, see `.Axes3D.set_proj_type` |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -425,8 +425,19 @@ | ||||||||||||
#axes.autolimit_mode: data # If "data", use axes.xmargin and axes.ymargin as is. | ||||||||||||
# If "round_numbers", after application of margins, axis | ||||||||||||
# limits are further expanded to the nearest "round" number. | ||||||||||||
#axes.adjustable: box # {box, adjustable} | ||||||||||||
#axes.anchor: C # {C, E, N, S, W, NE, NW, SE, SW} or two-tuple of floats | ||||||||||||
#axes.aspect: auto # {equal, auto} or a number | ||||||||||||
#axes.box_aspect: None # None or a number | ||||||||||||
#polaraxes.grid: True # display grid on polar axes | ||||||||||||
#axes3d.grid: True # display grid on 3D axes | ||||||||||||
#axes3d.adjustable: box # {box, adjustable} | ||||||||||||
#axes3d.anchor: C # {C, E, N, S, W, NE, NW, SE, SW} or two-tuple of floats | ||||||||||||
Comment on lines +436 to +437 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Why not inherit these from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. #25641 :-) One can for sure discuss which can be the same and which are beneficial to have separately. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. #25641 is definitely interesting. For this one, as defaults, maybe defaulting to what is done is 2d is useful? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Sorry, I do not get it. Are you saying that if the 3D-version of the RCparam is not changed, but the 2D-version is, it should use the 2D-version? How do we know if the style-sheet has set the 3D-version to the default value or not? I may be missing something, but I didn't think it was possible to query if the param comes from the style sheet or if the default is used? Also, wouldn't that be a bit confusing? Now we add double parameters that are also physically located quite nearby, so I guess if someone want to change the 2D-case, chances are that they will notice the 3D-case as well? Then it may very well be that it is not worthwhile to have separate 2D and 3D versions for all parameters introduced here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. So, I found a few places where we do this matplotlib/lib/mpl_toolkits/mplot3d/axis3d.py Lines 109 to 113 ine631edb
wherein a 3d parameter is set on based on the value of a "2d rcparam", which is why I thought we can use Now, I personally would prefer more rcParams instead of less with inheritance as you mentioned, but I brought it up because there were some such examples. Am not opposed to adding the new rcParams though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. OK, then I understand. Yes, it is not a problem as such, more a question of which parameters we would like to separate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Yes. But I guess that's a part of a bigger conversation about the role of rcparams itself. For now, I don't mind having all 3 separate parameters either. | ||||||||||||
#axes3d.aspect: auto | ||||||||||||
#axes3d.box_aspect: 4, 4, 3 # three floats: x, y, z | ||||||||||||
#axes3d.proj_type: persp # {persp, ortho} | ||||||||||||
#axes3d.xaxis.panecolor: (0.95, 0.95, 0.95, 0.5) # background pane on 3D axes | ||||||||||||
#axes3d.yaxis.panecolor: (0.90, 0.90, 0.90, 0.5) # background pane on 3D axes | ||||||||||||