Removing hard-coded values used in mplot3d #137
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first step in a longer series of changes I would like to make to mplot3d. The first commit is meant to consolidate the hard-coded values used in axis3d objects into a single user-modifiable data structure. Note though that changing any particular value does not necessarily mean that that value would result in a change in appearance (such as pane colors, which has to be set through the axis object's set_pane_color()).
Furthermore, some properties may not immediately correspond intuitively to what is visually seen. For example:
ax.x_axis.set_pane_color([1.0, 0.0, 0.0, 1.0])
ax.y_axis.set_pane_color([0.0, 1.0, 0.0, 1.0])
ax.z_axis.set_pane_color([0.0, 0.0, 1.0, 1.0])
produces a red pane for the yz-plane (upper-left), green pane for the xz-plane (upper-right), and a blue pane for the xy-plane (bottom). This is correct, but would probably be best handled through documentation of a axes3d method that would explain which panel gets colored.
I will see what other changes can be done to this pull request within the next week, but when it comes time to put out the next release, feel free to merge the changes that have been made so far to master.