Skip to content

Commit 60bef85

Browse files
committed
spine linewidth
1 parent b9c8096 commit 60bef85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/matplotgl/axes.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def __init__(self, *, ax: MplAxes, figure=None) -> None:
2222
self._ymin = 0.0
2323
self._ymax = 1.0
2424
self._fig = None
25+
self._spine_linewidth = 1.0
2526
self._ax = ax
2627
self._artists = []
2728
self.lines = []
@@ -341,13 +342,14 @@ def _make_xticks(self):
341342
bottom_string = (
342343
f'<svg height="calc(1.2em + {tick_length}px + {label_offset}px)" '
343344
f'width="{self.width}"><line x1="0" y1="0" x2="{self.width}" y2="0" '
344-
'style="stroke:black;stroke-width:1" />'
345+
f'style="stroke:black;stroke-width:{self._spine_linewidth}" />'
345346
)
346347

347348
self._margins["topspine"].value = (
348349
f'<svg height="{self._thin_margin}px" width="{self.width}">'
349350
f'<line x1="0" y1="{self._thin_margin}" x2="{self.width}" '
350-
f'y2="{self._thin_margin}" style="stroke:black;stroke-width:1" />'
351+
f'y2="{self._thin_margin}" style="stroke:black;stroke-width:'
352+
f'{self._spine_linewidth}" />'
351353
)
352354

353355
for tick, label in zip(xticks_axes, xlabels, strict=True):
@@ -394,13 +396,13 @@ def _make_yticks(self):
394396
f'<svg height="{self.height}" width="{width}">'
395397
f'<line x1="{width}" y1="0" '
396398
f'x2="{width}" y2="{self.height}" '
397-
'style="stroke:black;stroke-width:1" />'
399+
f'style="stroke:black;stroke-width:{self._spine_linewidth}" />'
398400
)
399401

400402
self._margins["rightspine"].value = (
401403
f'<svg height="{self.height}" width="{self._thin_margin}">'
402404
f'<line x1="0" y1="0" x2="0" y2="{self.height}" '
403-
f'style="stroke:black;stroke-width:1" />'
405+
f'style="stroke:black;stroke-width:{self._spine_linewidth}" />'
404406
)
405407

406408
for tick, label in zip(yticks_axes, ytexts, strict=True):

0 commit comments

Comments
 (0)