Can't create legend for symbol type lineplot in python (reportlab)

628 views Asked by At

I'm using Python's ReportLab library to create pdfs from some data for which I need to create line plots. In these plots, instead of colors, I need to identify different lines by symbols.

For colours, I could simply use :

self.legend.colorNamePairs  = [(marker_kind_list[i], colnames[i]) for i in xrange(len(lp.data))]

from the legends.py library in reportlab and have the color names legend associated with each plot, like a red line means case1, blue means case2. However, the same is not possible for symbols. I want to make a square mean case1, a cross - case2 and so on. I'm using reportlab in python 2.7 which calls Label() from the init of textlabels.py to insert labels.

Could you please recommend a way to get this to work for symbols, since colors are not an option.

Edited to clarify the case.

0

There are 0 answers