Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Refactoring: Removing axis parameter from scales#29988
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
Open
vagnermcj wants to merge19 commits intomatplotlib:mainChoose a base branch fromvagnermcj:refactor-for-issue-29349
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+77 −20
Open
Changes fromall commits
Commits
Show all changes
19 commits Select commitHold shift + click to select a range
d8fb083
Adding a decorator and Refactoring functions
vagnermcj1eea948
Fixing Ruff Errors
vagnermcj93bf34b
Update scale.pyi
vagnermcjd241761
Adding new line to the end of scale.pyi
vagnermcj075c4b3
Update in docstring
vagnermcj5bef6c2
Fixing Handle Function
vagnermcj5cceb7a
Support optional axis in scales
vagnermcjd18d7a1
Fixing ruff error
vagnermcj538dbd2
change in parameters and in decorator
vagnermcj851b25c
parameter fix
vagnermcj1a516b1
minor change in pyi
vagnermcjde434ee
Update lib/matplotlib/scale.py
vagnermcj335fcd5
Update lib/matplotlib/scale.py
vagnermcjb9cd8a0
Update lib/matplotlib/scale.py
vagnermcjfbb4448
Update lib/matplotlib/scale.pyi
vagnermcj10df152
Updating self and axis in pyi
vagnermcj0d81750
returning scale_factory to default
vagnermcjcdd1516
Ruff checks
vagnermcj114d9f3
description fix
vagnermcjFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
63 changes: 59 additions & 4 deletionslib/matplotlib/scale.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
34 changes: 18 additions & 16 deletionslib/matplotlib/scale.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2,7 +2,7 @@ from matplotlib.axis import Axis | ||
from matplotlib.transforms import Transform | ||
from collections.abc import Callable, Iterable | ||
from typing import Literal, Union | ||
from numpy.typing import ArrayLike | ||
class ScaleBase: | ||
@@ -15,6 +15,7 @@ class ScaleBase: | ||
class LinearScale(ScaleBase): | ||
name: str | ||
def __init__(self: ScaleBase, axis: Union[Axis, None] = None) -> None: ... | ||
class FuncTransform(Transform): | ||
input_dims: int | ||
@@ -56,12 +57,12 @@ class LogScale(ScaleBase): | ||
name: str | ||
subs: Iterable[int] | None | ||
def __init__( | ||
self: LogScale, | ||
vagnermcj marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
axis: Axis | None = ..., | ||
*, | ||
base: float =10, | ||
subs:Union[Iterable[int],None] =None, | ||
nonpositive:Union[Literal['clip'], Literal['mask']] ='clip' | ||
) -> None: ... | ||
@property | ||
def base(self) -> float: ... | ||
@@ -104,12 +105,12 @@ class SymmetricalLogScale(ScaleBase): | ||
subs: Iterable[int] | None | ||
def __init__( | ||
self, | ||
axis: Axis | None = ..., | ||
*, | ||
base: float =10, | ||
linthresh: float =2, | ||
subs:Union[Iterable[int],None] =None, | ||
linscale: float =1 | ||
) -> None: ... | ||
@property | ||
def base(self) -> float: ... | ||
@@ -138,7 +139,7 @@ class AsinhScale(ScaleBase): | ||
auto_tick_multipliers: dict[int, tuple[int, ...]] | ||
def __init__( | ||
self, | ||
axis: Axis | None = ..., | ||
*, | ||
linear_width: float = ..., | ||
base: float = ..., | ||
@@ -165,14 +166,15 @@ class LogitScale(ScaleBase): | ||
name: str | ||
def __init__( | ||
self, | ||
axis: Axis | None = ..., | ||
nonpositive:Union[Literal['mask'], Literal['clip']] ='mask', | ||
*, | ||
one_half: str ='\\frac{1}{2}', | ||
use_overline: bool =False | ||
) -> None: ... | ||
def get_transform(self) -> LogitTransform: ... | ||
def get_scale_names() -> list[str]: ... | ||
def scale_factory(scale: str, axis: Axis, **kwargs) -> ScaleBase: ... | ||
def register_scale(scale_class: type[ScaleBase]) -> None: ... | ||
def handle_axis_parameter(init_func: Callable[..., None]) -> Callable[..., None]: ... |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.