Using ggplot2, can I insert a break in the axis?

后端 未结 7 1842
我寻月下人不归
我寻月下人不归 2020-11-22 03:27

I want to make a bar plot where one of the values is much bigger than all other values. Is there a way of having a discontinuous y-axis? My data is as follows:



        
7条回答
  •  一向
    一向 (楼主)
    2020-11-22 03:57

    Not with ggplot, but with plotrix you can easily do that:

    library(plotrix)
    gap.barplot(df$a, gap=c(5,495),horiz=T)
    

提交回复
热议问题