alandefreitas / matplotplusplus

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾
https://alandefreitas.github.io/matplotplusplus/
MIT License
4.24k stars 325 forks source link

Heatmap labels only work for small data sets #384

Open liamnwhite1 opened 9 months ago

liamnwhite1 commented 9 months ago

Feature category

The problem When using a heatmap to plot a data set, the data labels will only be plotted if the data has less than 20 values horizontally and less than 30 values vertically. This is due to hard-coded limits contained within the should_plot_labels() function of the matrix class.

The solution I'd like I think it would be beneficial to remove these hard-coded limits to allow for the labeling of larger data sets in heatmap plots. In order for this to work properly, the font size of the labels would need to scale down accordingly for larger data sets. This can be handled automatically or manually by the user. Additionally, I think it would be beneficial for the user to be able to set the precision of the data labels. Currently, the precision is hard-coded with a value of 5 in the matrix_data_string() function of the matrix class.