Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying size of legend symbols and text independently #60

Open
alberto-martin opened this issue Nov 16, 2019 · 3 comments
Open

Modifying size of legend symbols and text independently #60

alberto-martin opened this issue Nov 16, 2019 · 3 comments

Comments

@alberto-martin
Copy link

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.

@jolars
Copy link
Owner

jolars commented Nov 17, 2019

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
Copy link
Owner

jolars commented Nov 17, 2019

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 ?

@alberto-martin
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants