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.
2 parents 90480fb + a1cfd17 commit 94aa071Copy full SHA for 94aa071
matplotlib2tikz/line2d.py
@@ -128,6 +128,17 @@ def draw_line2d(data, obj):
128
# xdata, ydata = _transform_to_data_coordinates(obj, *obj.get_data())
129
xdata, ydata = obj.get_data()
130
131
+ # matplotlib allows plotting of data containing `astropy.units`, but they will
132
+ # break the formatted string here. Try to strip the units from the data.
133
+ try:
134
+ xdata = xdata.value
135
+ except AttributeError:
136
+ pass
137
138
+ ydata = ydata.value
139
140
141
+
142
try:
143
has_mask = ydata.mask.any()
144
except AttributeError:
0 commit comments