separated slice plotting functionality