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

time scale #87

Closed
zuranojp opened this issue Nov 5, 2016 · 3 comments
Closed

time scale #87

zuranojp opened this issue Nov 5, 2016 · 3 comments

Comments

@zuranojp
Copy link

zuranojp commented Nov 5, 2016

Hi Guangchuan,

Can you add an option into the theme_tree2() function to show time scale as Reverse axis in Figtree or like AxisPhylo() function.

require(ape)
tr <- rtree(10)
ggtree(tr) + theme_tree2()

I´m suggesting to show the time whether possible like

tr <- rtree(10)
plot(tr)
axisPhylo()

@zuranojp zuranojp changed the title reverse argument to show time scale argument to show time scale Nov 5, 2016
@zuranojp zuranojp changed the title argument to show time scale time scale Nov 5, 2016
@GuangchuangYu
Copy link
Member

> p =ggtree(tr) + theme_tree2()
> p1 = revts(p)
> p2 = p1 + scale_x_continuous(breaks=c(-4:0), labels=abs(-4:0))
> multiplot(p, p1, p2, ncol=3)

revts function is now available in github version.

screen shot 2016-11-07 at 11 00 08 am

@Ax3man
Copy link

Ax3man commented Jun 13, 2019

For future visitors, passing abs as the labels is probably easiest in most cases:

p <- ggtree(tr) + theme_tree2() + scale_x_continuous(labels = abs)
multiplot(p, revts(p), ncol = 2)

Rplot

@GuangchuangYu
Copy link
Member

@Ax3man thanks for the tip.

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

3 participants