Skip to content

Commit

Permalink
adding doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Jan 19, 2024
1 parent 5c1f1f8 commit 15bc589
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mathics/builtin/drawing/graphics3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
= #<--#
Expand Down
4 changes: 4 additions & 0 deletions mathics/builtin/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
= #<--#
Expand Down

0 comments on commit 15bc589

Please sign in to comment.