USNavalResearchLaboratory / cxxplot

A simple to use C++ 2D plotting library.
Other
31 stars 8 forks source link

Legend titles #7

Closed jml1795 closed 1 year ago

jml1795 commented 1 year ago

Hi, thanks again for the really useful tool. I am looking for the ability to display legends on only a subset of the plotted items on a graph. For example, it I have three line plots on a graph but want the legend to reflect only items 1 and 2. I looked through some of the qcustomplot code and the graph and figure but wasn't seeing a way to make this happen. Do you have any suggestions on where to look? I can take a hack at adding the feature (if it doesn't already exist) if you can get me pointed in the right direction.

niliopoulos commented 1 year ago

Thank you for the suggestion!

I added legend entry visibility control. You can find an example in the examples folder under the name "13_legend_entry_visibility".