def _retrieve_handles_for_html( ax: plt.Axes) -> Optional[colls.PatchCollection]: nodes_collection = None for child in ax.get_children(): if isinstance(child, colls.PathCollection): nodes_collection = child return nodes_collection
def _retrieve_handles_for_html(ax: plt.Axes): nodes_collection = None all_text_collector = [] for child in ax.get_children(): if isinstance(child, colls.PathCollection): nodes_collection = child elif isinstance(child, text.Text): all_text_collector.append(child) _x = [] _y = [] for t in all_text_collector: x, y = t.get_position() _x.append(x) _y.append(y) weights_scatter = ax.scatter(_x, _y, alpha=0, s=5) return nodes_collection, weights_scatter