You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing label to mp.ColorMesh or mp.Colors and saving as SVG I get an error:
...
File ~/.local/lib/python3.11/site-packages/matplotlib/text.py:797, in Text.draw(self, renderer)
793 textrenderer.draw_tex(gc, x, y, clean_line,
794 self._fontproperties, angle,
795 mtext=mtext)
796 else:
--> 797 textrenderer.draw_text(gc, x, y, clean_line,
798 self._fontproperties, angle,
799 ismath=ismath, mtext=mtext)
801 gc.restore()
802 renderer.close_group('text')
File ~/.local/lib/python3.11/site-packages/matplotlib/backends/backend_svg.py:1269, in RendererSVG.draw_text(self, gc, x, y, s, prop, angle, ismath, mtext)
1267 self._draw_text_as_path(gc, x, y, s, prop, angle, ismath, mtext)
1268 else:
-> 1269 self._draw_text_as_text(gc, x, y, s, prop, angle, ismath, mtext)
1271 if gc.get_url() is not None:
1272 self.writer.end('a')
File ~/.local/lib/python3.11/site-packages/matplotlib/backends/backend_svg.py:1112, in RendererSVG._draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext)
1110 if prop.get_variant() != 'normal':
1111 font_parts.append(prop.get_variant())
-> 1112 weight = fm.weight_dict[prop.get_weight()]
1113 if weight != 400:
1114 font_parts.append(f'{weight}')
KeyError: 600
I think this is because maybe a default is making this label bold (600)?
Also tried setting label_props=dict(fontweight=400) or label_props=dict(fontweight='regular') with same effect.
Saving as PDF works, but can't be opened by Inkscape for example.
Might be only Linux-specific.
The text was updated successfully, but these errors were encountered:
Yes, by default the legendkit will try to use the bold setting for the title in the legend, the exact weight value is decided by matplotlib. May I ask which font are you using?
When passing
label
tomp.ColorMesh
ormp.Colors
and saving as SVG I get an error:I think this is because maybe a default is making this label bold (600)?
Also tried setting
label_props=dict(fontweight=400)
orlabel_props=dict(fontweight='regular')
with same effect.Saving as PDF works, but can't be opened by Inkscape for example.
Might be only Linux-specific.
The text was updated successfully, but these errors were encountered: