Problems with patternplot and type==blank

Hello everyone,
I'm struggling with ggpattern right now, seems easy to fix but I can't do a simple barplot with patterns.

Here's my script :

x<-factor(riviere$Caging.Time, c('0', '7',  '14', '20'))
pattern.type<-c('hdashes', 'blank', 'crosshatch', 'crosshatch')
pattern.color=c('black','black', 'black', 'black')
background.color=c('white','white', 'white', 'white')
density<-c(20, 20, 20, 20)
p<-patternbar(riviere,x, y,group=NULL, pattern.type=pattern.type,pattern.color=pattern.color, background.color=background.color,pattern.line.size=c(5.5, 1, 4),frame.color=c('black', 'black', 'black', 'black'), density=density, vjust=-1, hjust=0.5, bar.width=0.75)+scale_y_continuous(limits = c(0, 8000))+ggtitle('(A) Vertical Bar Chart')

R Studio sends this error message :
Error in if (type == "blank") { : missing value where TRUE/FALSE needed

I've searched everywhere but I've never seen a similar problem with patternplot. Anyone has an idea ?

patternbar doesnt seem to be a function provided by ggpattern, are you using other libraries in addition to ggpattern ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.