Fix uploading 3D plots with matplotlib plt shows 2D plot on task results page

This commit is contained in:
allegroai 2022-04-09 14:20:58 +03:00
parent 260690b990
commit 55f5f198ec

View File

@ -135,7 +135,7 @@ class Exporter(object):
self.draw_text(ax, text)
for (text, ttp) in zip([ax.xaxis.label, ax.yaxis.label, ax.title],
["xlabel", "ylabel", "title"]):
if(hasattr(text, 'get_text') and text.get_text()):
if(hasattr(text, "get_text") and text.get_text()):
self.draw_text(ax, text, force_trans=ax.transAxes,
text_type=ttp)
for artist in ax.artists:
@ -246,6 +246,8 @@ class Exporter(object):
"""Process a matplotlib collection and call renderer.draw_collection"""
(transform, transOffset,
offsets, paths) = collection._prepare_points()
if hasattr(collection, "_offsets3d"):
offsets = collection._offsets3d
offset_coords, offsets = self.process_transform(
transOffset, ax, offsets, force_trans=force_offsettrans)