bugfix: BarGraph drawing numbers on the y axis even when "y_axis.include_numbers" is False#3906
Open
Tmodrzyk wants to merge 4 commits into
Open
bugfix: BarGraph drawing numbers on the y axis even when "y_axis.include_numbers" is False#3906Tmodrzyk wants to merge 4 commits into
Tmodrzyk wants to merge 4 commits into
Conversation
- Numbers are now drawn on the `y_axis` only if `y_axis.include_numbers` is True
chopan050
requested changes
Oct 19, 2024
Member
There was a problem hiding this comment.
Thanks for noticing this bug! Indeed, because Axes by default don't include numbers, it makes sense for BarChart, a subclass of Axes, to not have numbers by default as well.
I left a comment on your change.
Apart from that comment, I would need you to please review the tests/test_graphical_units/test_probability.py. The graphical unit tests defined there are failing, because BarChart no longer contains numbers by default.
- It makes sense for most of them to have numbers in the Y axis, so maybe you could pass
y_axis_config={"include_numbers": True}as an extra argument to them. - The first test,
test_default_chart, is more problematic, because now a "default chart" has no numbers. IMO, the best approach would be to replace it with two tests,test_default_version_chartandtest_numbered_version_chart, where the latter has numbers and the former doesn't. However, you would have to regenerate the graphical unit tests for that to work: see https://docs.manim.community/en/stable/contributing/testing.html#graphical-unit-test
Co-authored-by: Francisco Manríquez Novoa <49853152+chopan050@users.noreply.github.com>
for more information, see https://pre-commit.ci
Author
|
Hi @chopan050 I'm so sorry I completely forgot about that, thanks for the review. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview: What does this pull request change?
Numbers were always drawn without checking the value of y_axis.include_numbers.
Numbers are now drawn on the
y_axisonly ify_axis.include_numbersis True.Motivation and Explanation: Why and how do your changes improve the library?
I think this is the expected behavior, otherwise the user can't hide these numbers.
Links to added or changed documentation pages
No changes in documentation required.
Reviewer Checklist