Fixed example for :meth:~.Vector.coordinate_label and added more customization for :class:~.Matrix#2138
Conversation
…ework_coord_label
|
Just a comment: this was previously done in #1988 (there hasn't seem to be any further progress) but there was a problem with the coloring of the background rectangle. Based on how this is implemented, i'd assume it'd give the same issue. |
|
Ah it seems like I missed that PR. It wasn't really the intended purpose to specifically allow for a background rectangle to be passed, but I guess this PR also handles that. IMO, the way |
icedcoffeeee
left a comment
There was a problem hiding this comment.
The Vector.coordinate_label lgtm, some minor comments of typehints of Matrix.
… into rework_coord_label
… into rework_coord_label
~.Vector.coordinate_label and add more customization.~.Vector.coordinate_label and add more customization for :class:~.Matrix.
~.Vector.coordinate_label and add more customization for :class:~.Matrix.~.Vector.coordinate_label and added more customization for :class:~.Matrix
Overview: What does this pull request change?
~.Vector.coordinate_labelare passed to the constructed matrix.~.Matrixnow accepts abracket_configkeyword argument.Motivation and Explanation: Why and how do your changes improve the library?
I noticed the docs weren't showing up for this method due to missing colons:
::. Also, the example wouldn't even render if it were available due to a typo, so that was fixed too.I also decided to update the colour is set so that it's more compatible with #2075 if someone were to set
Mobject.set_default(color=BLACK)for example. Also, more configuration was added forMatrixso that every part of the mobject can be modified as desired on creation. (Improved docs + shifted typing outside of docs too)Links to added or changed documentation pages
Before: https://docs.manim.community/en/latest/reference/manim.mobject.geometry.Vector.html#manim.mobject.geometry.Vector.coordinate_label
After: https://manimce--2138.org.readthedocs.build/en/2138/reference/manim.mobject.geometry.Vector.html#vectorcoordinatelabel
Further Information and Comments
I think we should try to make a lot more of the library compatible with #2075, in particular by removing needlessly setting defaults like
WHITEin child classes/methods, and instead letting the base `Mobject/VMobject handle those.This does not apply for mobs with non-WHITE defaults.
Reviewer Checklist