I have a figure (below) in python.
i want to make double right-angle triangles as my legend using ax.get_legend_handles_labels.
I want this (legend shape below) could you please help me get the shape of double right-angle triangles as the legend (below) using matplotlib.Line2D?
i tried the following codes but it fails.
#define right angles triangles
angle=180
verts_ob = [[-1, -1], [1, -1], [1, 1], [-1, -1]]
verts = mpl.markers.MarkerStyle(marker=verts_ob)
verts._transform = verts.get_transform().rotate_deg(angle)
##apply mlines.Line2D to get shapes of the desired marker
import matplotlib.lines as mlines
Del_triangle_cna = mlines.Line2D([], [], color='#001261', marker=verts_ob, linestyle='None',mec='white', mfc='#C3B477', mew=1, markersize=100)
Neut_triangle_cna = mlines.Line2D([], [], color='#001261', marker=r'$\blacktriangleleft/\blacktriangleright$', linestyle='None',mec='white', mfc='grey', mew=1,markersize=200)
Thanks for your help.