So an exemplar format would be: plt.plot([1],[1],\'rs\') In this circumstance the marker would be a red square, however, I\'m not sure how to do this with a defined variable