Skip to content

BarChart bars of height 0 do not get updated as expected. #2636

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
malthesr opened this issue Mar 26, 2022 · 0 comments · Fixed by #2638
Closed

BarChart bars of height 0 do not get updated as expected. #2636

malthesr opened this issue Mar 26, 2022 · 0 comments · Fixed by #2638
Assignees
Labels
issue:bug Something isn't working... For use in issues

Comments

@malthesr
Copy link

Description of bug / unexpected behavior

BarChart bars of height do not get updated as expected.

Expected behavior

I expected to be able to updated BarChart bars using the provided change_bar_values method, but this appears not to work for bars of height zero.

How to reproduce the issue

In the following, the bars are not updated in the Foo scene (initial height 0.0), whereas they are updated in the Bar scene (initial height 0.0001).

Code for reproducing the problem
class Foo(Scene):
    def construct(self):
        values=[0 for _ in range(11)]

        chart = BarChart(
            values,
            y_range=[0, 10, 1],
            y_axis_config={"font_size": 24},
        )
        new_values=[1 for _ in range(11)]
        chart.change_bar_values(new_values)
        self.add(chart)


class Bar(Scene):
    def construct(self):
        values=[0.0001 for _ in range(11)]

        chart = BarChart(
            values,
            y_range=[0, 10, 1],
            y_axis_config={"font_size": 24},
        )
        new_values=[1 for _ in range(11)]
        chart.change_bar_values(new_values)
        self.add(chart)

Additional media files

Images/GIFs

Foo:

Foo_ManimCE_v0 15 1

Bar:

Bar_ManimCE_v0 15 1

System specifications

System Details
Manjaro Linux 21.2.5
Python 3.10.2
manim 0.15.1
@malthesr malthesr added the issue:bug Something isn't working... For use in issues label Mar 26, 2022
@hydrobeam hydrobeam changed the title BarChart bars of height do not get updated as expected. BarChart bars of height 0 do not get updated as expected. Mar 26, 2022
@MrDiver MrDiver moved this to 🆕 New in Dev Board Jun 16, 2022
@MrDiver MrDiver moved this from 🆕 New to 🏗 In progress in Dev Board Jun 18, 2022
Repository owner moved this from 🏗 In progress to ❌ Rejected in Dev Board Jul 9, 2022
@behackl behackl moved this from ❌ Rejected to ✅ Done in Dev Board Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:bug Something isn't working... For use in issues
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants