eulerr icon indicating copy to clipboard operation
eulerr copied to clipboard

Modifying size of legend symbols and text independently

Open alberto-martin opened this issue 4 years ago • 3 comments

First of all, thank you for creating and mantaining this package. It has become very useful to me for various analyses.

My question is whether it is possible to change the size of a legend symbol, without this affecting the size of the legend text. Currently, increasing the cex parameter (pt.cex does not seem to work) increases both the size of the legend symbol, and the size of the legend text. Adding an additional parameter fontsize = 12 does not help to maintain the size of the text in its default size, and if I set the parameter to a lower size (for example fontsize = 4), the size of the symbol also decreases.

I would like to be able to render larger legend symbols without increasing the fontsize.

Thank you very much in advance.

alberto-martin avatar Nov 16 '19 20:11 alberto-martin

Yes, I'm sorry about this. Unfortunately, given the current implementation using grid::legendGrob(), this is currently out of my hands. I have been meaning to design something new, but have not yet found the time for it.

In fact, I believe that this might be fixed very easily in legendGrob(). I will contact the maintainer and see if I can effect some kind of change.

jolars avatar Nov 17 '19 09:11 jolars

A possible solution would be to simply fork the code in legendGrob() and rewrite it for eulerr. Would you be interested in doing this @alberto-martin ?

jolars avatar Nov 17 '19 11:11 jolars

Thank you for your quick response.

Much as I would love to help, I'm afraid this is beyond my skills (I only have experience with R as a user, not as a developer). I've taken a look at where your code calls grid::legendGrob() (plot.euler.R) and at the code of grid::legendGrob() itself, but I don't know what would have to be changed to add the functionality we are discussing.

However, I would be interested to learn how to solve these kind of problems, in case I find similar issues in the future. So if you think I can help with something, let me know.

alberto-martin avatar Nov 17 '19 14:11 alberto-martin