Skip to content

Commit a80c9d4

Browse files
committed
Handle 3D TickStyle Color
1 parent c260574 commit a80c9d4

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

mathics/builtin/drawing/graphics3d.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -693,16 +693,21 @@ def create_axes(
693693
ticks_style = graphics_options.get("System`TicksStyle")
694694
axes_style = graphics_options.get("System`AxesStyle")
695695
label_style = graphics_options.get("System`LabelStyle")
696-
if ticks_style.has_form("List", 3):
696+
697+
# FIXME: Doesn't handle GrayScale
698+
if ticks_style.has_form("List", 1, 2, 3):
697699
ticks_style = ticks_style.leaves
698-
else:
700+
elif ticks_style.has_form("RGBColor", None):
699701
ticks_style = [ticks_style] * 3
700-
if axes_style.has_form("List", 3):
702+
else:
703+
ticks_style = []
704+
705+
if axes_style.has_form("List", 1, 2, 3):
701706
axes_style = axes_style.leaves
702707
else:
703708
axes_style = [axes_style] * 3
704709

705-
# FIXME: Not quite right
710+
# FIXME: Not quite right. We only handle color
706711
ticks_style = [elements.create_style(s).get_style(_Color, face_element=False)[0] for s in ticks_style]
707712

708713
axes_style = [elements.create_style(s) for s in axes_style]

0 commit comments

Comments
 (0)