-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Adding y-axis labels on the marginal plots #64
Comments
There is no way to do that, the axis labels on the marginal plots are purposely explicitly suppressed. If you absolutely need them, you can modify the source code to NOT remove the labels |
It makes sense to remove the axis that are shared, but what about the other axis of these plots? For example, the x-axis of the marginal plot on the top is removed. However, I want the y-axis along with its units printed. I also want to add the y-axis label "count". If there is a way to add this in the ggMarginal function, it would be greatly helpful for the users. Thanks. |
I suppose that could make sense for histograms. I don't think I will implement this parameter, but I will leave the issue open so that someone in the future could add support for it |
I'm in agreement with lavkan. I was asked by a reviewer to succinctly display sample size. A histogram worked great to display distribution in the margin, but I'm still lacking magnitude. Being able to add y-axis counts on histograms would be beneficial, in my opinion. Thanks for a great package! |
@bencneely feel free to submit a pull request if you want to work on this! |
yes, that's my case as well. I'm a reviewer in this case and I fully recommend the axis of marginal plots... |
I understand that can be a useful feature. I would welcome anyone who wants to tackle this feature and implement it - I'll very happily accept that feature |
Thanks you your answer. I would like to but I'm an experienced beginner so it'll be a bit difficult to do it for the moment but maybe in the future ;D |
@daattali can you tell me where I have to modify your code in order to show the y-axis for histogram marginal plots? |
@ms-gx I haven't touched the core functionality of this package in 3+ years so I can't tell you. It would need to be found out by walking through the code, with a debugger perhaps |
Hey @ms-gx , here's where the main plot grab associated with the histogram is pulled out of the marginal plot, leaving behind all of the axis grobs. You'd have to edit this code so that the axis grobs are pulled out along with the main plot grob. ggExtra/R/ggMarginal-helpers.R Lines 68 to 108 in 5d51a7f
|
@crew102 Thanks so much! I tried, but couldn't figure it out. So I might have to use another package for marginal plots or just leave it as it is. Thanks again. |
Hi,
I would like to add y-axis labels for the marginal plots. Is there a way to do it using ggMarginal command?
Thanks,
Lavanya
The text was updated successfully, but these errors were encountered: