Following the advice of @baptiste , I've created a custom axis ticks and labels on the top which worked out perfectly and made the code much nicer. Here it is:
axisG <- function(side, ...){
if (side == "top"){
at <- unique(test$GROUP)
panel.axis(side = side, outside = TRUE, at = at, labels = at, rot = 0)
}
else axis.default(side = side, ...)
}
plot(hexbinplot(test$VAR1 ~ test$VAR2,
axis = axisG,
panel = function(...){
panel.hexbinplot(...)
panel.abline(v = test$GROUP)}
))