No. gg.gap can introduce gaps in ggplot, but that's not possible with plotrix. plotrix is based on r base graphics and it gives better plots than gg.gap. try the following code df
library(ggplot2) library(ggbreak) ggplot(iris,aes(Sepal.Length,Petal.Length,color=Species))+ geom_point()+ scale_x_break(c(5, 6.5)) the overlap of axis tick labels at break is not addressed yet. also both the axis can not havde gap simaltaneously. for multiple gaps multiple scale_x_break() statements have to used. Its a recent package, published day before yesterday.
This graph occurred very user friendly and good visualization
Thanks for appreciation.
If i want to gap in y axis label suppose i have to write some trait and below it , i want to write its symbol, how can we add
library(ggplot2)
p
Can we add multiple gaps on the x-axis using R package like plotrix?
Any option to create plotrix gap in ggplot?
No. gg.gap can introduce gaps in ggplot, but that's not possible with plotrix. plotrix is based on r base graphics and it gives better plots than gg.gap. try the following code
df
Very helpful video. I see the legend disappears with gg.gap function. Is there a way to add it again?
I didn't notice that. Will see the code again and revert back.
Legend need to ba added explicitly to plot object. This us example from gg.gap documentation.
library(ggplot2)
mtcars$gear
Thank you for the video! Is there a way to use gg.gap in the x axis?
library(ggplot2)
library(ggbreak)
ggplot(iris,aes(Sepal.Length,Petal.Length,color=Species))+
geom_point()+
scale_x_break(c(5, 6.5))
the overlap of axis tick labels at break is not addressed yet. also both the axis can not havde gap simaltaneously. for multiple gaps multiple scale_x_break() statements have to used. Its a recent package, published day before yesterday.