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

x y axis issue #14

Closed
GuangchuangYu opened this issue Mar 9, 2017 · 6 comments
Closed

x y axis issue #14

GuangchuangYu opened this issue Mar 9, 2017 · 6 comments

Comments

@GuangchuangYu
Copy link

According to YuLab-SMU/ggtree#96.

I think ggstance has an issue of calculating x-y coordinates.

Here is a very simple example:

library(ggplot2)
library(ggstance)

set.seed(123)
d =data.frame(id=rep(1:10, each=20), val=as.vector(sapply(1:30, function(i) rnorm(20, mean=i))))
ggplot(d)+ geom_boxploth(aes(x=val, y=id, group=id))

screen shot 2017-03-09 at 5 55 28 pm

In this example, y coordinates should range from 1 to 10, but in the above plot, we can find that it range from 0 to 30 which should be the range of x coordinates.

It works fine if y is categorical variable.

## this code works
ggplot(d)+ geom_boxploth(aes(x=val, y=factor(id), group=id))
@lionel-
Copy link
Owner

lionel- commented Jul 19, 2018

It seems this is now fixed somehow. Thanks for the report!

@lionel- lionel- closed this as completed Jul 19, 2018
@GuangchuangYu
Copy link
Author

still not working with:

> packageVersion("ggplot2")
[1] ‘3.0.0’
> packageVersion("ggstance")
[1] ‘0.3’

@lionel-
Copy link
Owner

lionel- commented Jul 20, 2018

I haven't sent the development version to CRAN yet. Can you try with master?

@GuangchuangYu
Copy link
Author

yes, it works now. Thanks!

@GuangchuangYu
Copy link
Author

I have this problem with my geom too. @lionel- can you give me some ideas of how this problem was solved?

@lionel-
Copy link
Owner

lionel- commented Jul 23, 2019

Sorry I don't 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