Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement and document plotting overrides on plotting methods rather than "wrappers" #197

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

Closed
wants to merge 4 commits into from

Conversation

lukelbd
Copy link
Collaborator

@lukelbd lukelbd commented Jun 21, 2020

This PR replaces #111 in order to address major structural changes to the repo file system.

This addresses #43. I got the ball rolling but it probably won't be finished until I have a complete week or so to dedicate to this. It moves plotting-function enhancements from dedicated "wrapper" functions to the methods themselves, breaks apart some really unwieldy wrappers into their component parts, and combines the parameter tables associated with each plotting feature into single docstrings.

  • This will make development and debugging much easier. The plotting overrides are currently the source of a majority of bugs reported by users, in part because the current implementation was thrown together in piecemeal fashion and (while I do my best to maintain it) is held together with duct tape...
  • This will make it much easier for new users to learn ProPlot -- people have a hard time wrapping their heads around wrapper functions ;)
  • This will make the tracebacks much cleaner. It can be pretty disorienting when an error is raised and there are 3x more frames than necessary.

When using proplot locally, the proplot and matplotlib docstrings will be concatenated with nice headers for each section using _concatenate_docstrings in axes.py. When sphinx is importing proplot for generating documentation, they will not be concatenated -- only the proplot docstring will be shown with an intersphinx link to the matplotlib one. This is done by adding docstring.hardcopy: True to the local .proplotrc. Then _concatenate_docstrings skips concatenation if rcParams['docstring.hardcopy'] is True.

@lukelbd lukelbd force-pushed the axes-plotting-methods branch from 0b0b470 to cd4b17d Compare June 22, 2020 04:29
@lukelbd
Copy link
Collaborator Author

lukelbd commented Jul 3, 2021

Note to self: I will definitely need to mimick matplotlib's approach of putting the "basic" axes methods separate from plotting-related axes methods. Probably most of plot.py will remain in the same file but as plotting methods, and all the projections will subclass the axes found there rather than the axes found in base.py.

@lukelbd
Copy link
Collaborator Author

lukelbd commented Jul 17, 2021

The PR has been replaced by #264 (the #258 refactor introduced too many conflicts).

@lukelbd lukelbd closed this Jul 17, 2021
@lukelbd lukelbd deleted the axes-plotting-methods branch July 17, 2021 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant