We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 584153f commit 8b11616Copy full SHA for 8b11616
src/tikzplotlib/_axes.py
@@ -53,6 +53,11 @@ def __init__(self, data, obj): # noqa: C901
53
54
labelcolor = obj.xaxis.label.get_c()
55
xlabel = re.sub(r"\smm", r" \\si{\\mm}", xlabel)
56
+ xlabel_spl = xlabel.split(",")
57
+ if len(xlabel_spl) == 2:
58
+ xlabel = ",".join(["$" + xlabel_spl[0].replace(" ", "\\ ") + "$",
59
+ xlabel_spl[1]])
60
+
61
if labelcolor != "black":
62
data, col, _ = _color.mpl_color2xcolor(data, labelcolor)
63
self.axis_options.append(f"xlabel=\\textcolor{{{col}}}{{{xlabel}}}")
@@ -67,6 +72,11 @@ def __init__(self, data, obj): # noqa: C901
67
72
if ylabel:
68
73
ylabel = _common_texification(ylabel)
69
74
75
+ ylabel_spl = ylabel.split(",")
76
+ if len(ylabel_spl) == 2:
77
+ ylabel = ",".join(["$" + ylabel_spl[0].replace(" ", "\\ ") + "$",
78
+ ylabel_spl[1]])
79
70
80
labelcolor = obj.yaxis.label.get_c()
71
81
82
0 commit comments