ggtree
ggtree copied to clipboard
Control x-axis ticks on geom_fruit
Hi !
I was wondering if there was a way to control x-axis ticks limits and breaks on geom_fruit ?
For example, on the plot attached, I have a tree with two overlapping barplots added with geom_fruit. I would like the first geom_fruit axis labels to stop at 200 with 5 ticks at 0, 50, 100, 150, 200 (i.e. remove the gray lines at 250 and 300). And for the second grom_fruit, I would like to remove the gray line at 2500 and 3000. Maxime_example_xaxis_ticks.pdf
It seems like we can only control the number of ticks using "nbreak" in the axis.params list.
Thanks for any help or suggestions,
Maxime Policarpo
Now, the github version (reinstall it by remotes::install_github("YuLab-SMU/ggtreeExtra")) supports this feature, the limits you want will be done after re-run in default, Or you can add limits=200 or limits=2500 in the list of axis.params.
Thanks a lot, I installed the new github version and it now works perfectly using "limits" !
All the best,
Maxime