Commit graph

48 commits

Author SHA1 Message Date
AStarySky
7a61a13691
Fix issues in number_line.py (#2310)
Fix the issue that changes in decimal_number_config["font_size"] get rewritten by number_config
2025-03-20 11:54:59 -07:00
Grant Sanderson
96d44bd560
Video work (#2284)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG

* Add arg to clear the cache

* Separate out full_tex_to_svg from tex_to_svg

And only cache to disk the results of full_tex_to_svg.  Otherwise, making edits to the tex_templates would not show up without clearing the cache.

* Bug fix in handling BlankScene

* Make checkpoint_states an instance variable of CheckpointManager

As per https://github.com/3b1b/manim/issues/2272

* Move resizing out of Window.focus, and into Window.init_for_scene

* Make default output directory "." instead of ""

To address https://github.com/3b1b/manim/issues/2261

* Remove input_file_path arg from SceneFileWriter

* Use Dict syntax in place of dict for config more consistently across config.py

* Simplify get_output_directory

* Swap order of preamble and additional preamble

* Minor stylistic tweak

* Have UnitInterval pass on kwargs to NumberLine

* Add simple get_dist function

* Have TracedPath always update to the stroke configuration passed in

* Have Mobject.match_points apply to all parts of data in pointlike_data_key

* Always call Mobject.update upon adding an updater

* Add Surface.uv_to_point

* Make sure Surface.set_opacity takes in a recurse option

* Update num_tex_symbols to account for \{ and \}
2024-12-26 09:35:34 -08:00
Grant Sanderson
7edc4b64ad Replace numbers_with_elongated_ticks -> big_tick_numbers 2024-02-22 11:47:28 -08:00
Grant Sanderson
e784c42f0d Add big_tick_spacing option NumberLine 2024-02-22 11:45:31 -08:00
Grant Sanderson
1eb819363d Fix issue with ticks going beyond number line 2023-02-24 08:23:01 -05:00
Grant Sanderson
2290f810ca Small tweaks to number_to_point 2023-01-19 20:25:29 -08:00
Grant Sanderson
c96cdf43a1 Make sure mutability of dict arguments won't cause problems
One could argue that a pattern of "arg: dict | None = None" followed by "self.param = arg or dict()" is better, but that would make for an inconsistent pattern in cases where the default argument is not None.
2022-12-18 09:38:28 -08:00
Grant Sanderson
97f28b34f3 Distinguish Vect3 from Vect3Array types 2022-12-17 13:16:48 -08:00
Grant Sanderson
dec11a4b17 Rename np_vector type to Vect3 or Vect4 to make context clearer 2022-12-16 20:35:26 -08:00
Grant Sanderson
43fd5e1aea Move custom type to manimlib.typing 2022-12-16 20:19:18 -08:00
Grant Sanderson
c00af3c1bf Rename config_ops -> dict_ops 2022-12-16 18:59:23 -08:00
Grant Sanderson
afab37c2d2 Remove stray digest_config references 2022-12-16 11:00:59 -08:00
Grant Sanderson
9039fe69e4 Kill CONFIG in number_line.py 2022-12-15 20:26:10 -08:00
Grant Sanderson
faa37844e7 Add unit_tex option for NumberLine.add_numbers 2022-11-03 11:32:25 -07:00
YishiMichael
cbb7e69f68
Refactor LabelledString and relevant classes 2022-04-18 18:47:57 +08:00
YishiMichael
9ef9961d0e
Sort imports 2022-04-12 19:19:59 +08:00
Grant Sanderson
dc4b9bc93c Use outer_interpolate for NumberLine.number_to_point 2022-04-11 10:47:26 -07:00
Grant Sanderson
a9349057ad Merge branch 'master' of github.com:3b1b/manim into video-work 2022-03-22 11:30:25 -07:00
Grant Sanderson
c3e13fff05 Allow Numberline.number_to_point to work on an array of numbers 2022-03-16 12:24:03 -07:00
TonyCrane
4c16bfc2c0
chore: add type hints to manimlib.mobject 2022-02-15 14:37:15 +08:00
Grant Sanderson
3b146636b4 Use isclose in place of of == 0 2021-08-26 11:43:44 -07:00
Grant Sanderson
0b7b3f4f31 Improve NumberLine.p2n speed 2021-08-21 17:07:05 -07:00
Grant Sanderson
de9ecbd766 Remove unnecessary import 2021-03-31 23:24:55 -07:00
Grant Sanderson
8345ca6160 Small fixes to NumberLine 2021-03-18 17:37:12 -07:00
Grant Sanderson
97e7b0568e Add default font_size to NumberLine.add_numbers 2021-02-07 17:30:31 -08:00
Grant Sanderson
6f69902892 Changed how configuration for labels on a NumberLine, and hence also on Axes, so that it takes in DecimalNumber configuration directly rather than as a separte dict. 2021-02-06 11:06:38 -08:00
Abhijith Muthyala
03bea8198c Fix NumberLine's unit_size 2021-02-06 15:05:18 +05:30
Grant Sanderson
2a3db89a2d merge 2021-02-05 15:29:18 -08:00
Grant Sanderson
f786eb68d1 Change default decimal_number_config for NumberLine 2021-02-05 15:27:29 -08:00
Tony031218
269128dfb6 fix NumberLine and GraphScene 2021-02-05 13:57:00 +08:00
Abhijith Muthyala
fb8280171b Replace redundant CONFIG key in NumberLine 2021-02-01 12:25:11 +05:30
Grant Sanderson
3b26a6c260 Clean up colors, e.g. replacing LIGHT_GREY and DARK_GREY with GREY_B and GREY_D 2021-01-02 22:44:53 -08:00
Grant Sanderson
4385fc75d0 Change TipableVMobject to take in all tip_config at one spot 2020-06-06 10:56:23 -07:00
Grant Sanderson
1a5fb207ae Reconfigured how to initialize axes and number planes. Hopefully much more sensible this way 2020-06-05 19:24:35 -07:00
Grant Sanderson
5c23e93547 Reconfigure NumberLine, the whole interface felt very weird 2020-06-05 17:57:21 -07:00
Grant Sanderson
6593eab9a0 Change default stroke width of number line 2020-02-27 17:18:10 +00:00
Grant Sanderson
a3c1640fb7 NumberLine.default_numbers_to_display was not showing topmost number it should have 2019-06-25 09:03:33 -07:00
Grant Sanderson
644ac5c94a Added abbreviated names for number_to_point and point_to_number 2019-04-09 18:51:18 -07:00
Grant Sanderson
6b59cdcd37 Fixed issue with numberline last tick vs. arrow conflict 2019-03-30 13:22:53 -07:00
Grant Sanderson
ec1436ef5a Changed default for Interval numbering 2019-03-25 16:43:16 -07:00
Grant Sanderson
97c8ea2738 Small bug fix to NumberLine 2019-03-23 10:52:25 -07:00
Grant Sanderson
27200f79d3 Add last tick to number line 2019-03-20 17:38:11 -07:00
Grant Sanderson
312e9c460b Add an option to not display zero by default 2019-02-11 22:24:17 -08:00
Grant Sanderson
1735f16d68 Fixed NumberLine bug 2019-02-11 22:14:00 -08:00
Grant Sanderson
e3ee258d91 Replaced merge_config with merge_dicts_recursively 2019-02-06 21:32:42 -08:00
Grant Sanderson
d88c301622 Updating coordinate system mobjects 2019-02-06 21:16:26 -08:00
Grant Sanderson
24d6113bba Get rid of propagate_style_to_family, since it is basically always true 2019-02-06 16:25:03 -08:00
Devin Neal
3543a750ba move library code into manimlib, replace relative imports with absolute imports 2018-12-26 20:57:01 -08:00
Renamed from mobject/number_line.py (Browse further)