From 15bc58923e16fe62bbd6598b56a90a9726638c92 Mon Sep 17 00:00:00 2001 From: mmatera Date: Fri, 19 Jan 2024 12:22:11 -0300 Subject: [PATCH] adding doctest --- mathics/builtin/drawing/graphics3d.py | 4 ++++ mathics/builtin/graphics.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mathics/builtin/drawing/graphics3d.py b/mathics/builtin/drawing/graphics3d.py index fa91b3708..f8a112b2c 100644 --- a/mathics/builtin/drawing/graphics3d.py +++ b/mathics/builtin/drawing/graphics3d.py @@ -77,6 +77,10 @@ class Graphics3D(Graphics): >> Graphics3D[Polygon[{{0,0,0}, {0,1,1}, {1,0,0}}]] = -Graphics3D- + The 'Background' option allows to set the color of the background: + >> Graphics3D[Sphere[], Background->RGBColor[.6, .7, 1.]]: + = -Graphics- + In 'TeXForm', 'Graphics3D' creates Asymptote figures: >> Graphics3D[Sphere[]] // TeXForm = #<--# diff --git a/mathics/builtin/graphics.py b/mathics/builtin/graphics.py index 5baf5d240..6be9c856a 100644 --- a/mathics/builtin/graphics.py +++ b/mathics/builtin/graphics.py @@ -268,6 +268,10 @@ class Graphics(Builtin): >> Graphics[Rectangle[]] // ToBoxes // Head = GraphicsBox + The 'Background' option allows to set the color of the background: + >> Graphics[{Green, Disk[]}, Background->RGBColor[.6, .7, 1.]] + = -Graphics- + In 'TeXForm', 'Graphics' produces Asymptote figures: >> Graphics[Circle[]] // TeXForm = #<--#