In general, this is possible. Please provide your code or an example using some toy data and I am sure we can help you.
The general idea would be: calculate the median and, within the ggplot, to split the data into lower and higher groups based on this threshhold.