Skip to content

Commit

Permalink
Adjust sizes and text to match Mathematica better?
Browse files Browse the repository at this point in the history
graphics.py: Reduce size on PointSize, Thickness, AbsoluteThickness
svg.py: reduced thickness of text in InsetBox
  • Loading branch information
rocky committed Dec 16, 2024
1 parent e2312db commit 1b54be8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mathics/builtin/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class _Size(_GraphicsDirective):
def init(self, graphics, item=None, value=None):
super(_Size, self).init(graphics, item)
if item is not None:
self.value = item.elements[0].round_to_float()
self.value = item.elements[0].round_to_float() * 0.7
elif value is not None:
self.value = value
else:
Expand Down
1 change: 1 addition & 0 deletions mathics/format/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ def inset_box(self, **options) -> str:
font_color=self.color,
edge_color=self.color,
face_color=self.color,
stroke_width=0.2,
opacity=self.opacity.opacity,
)
text_pos_opts = f'x="{x}" y="{y}" ox="{self.opos[0]}" oy="{self.opos[1]}"'
Expand Down

0 comments on commit 1b54be8

Please sign in to comment.