Is it possible to control matplotlib marker orientation?

You can create custom polygons using the keyword argument marker and passing it a tuple of 3 numbers (number of sides, style, rotation).

To create a triangle you would use (3, 0, rotation), an example is shown below.

import matplotlib.pyplot as plt

x = [1,2,3]
for i in x:
    plt.plot(i, i, marker=(3, 0, i*90), markersize=20, linestyle="None")

plt.xlim([0,4])
plt.ylim([0,4])

plt.show()

Plot

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)