You have to pressure wash it with soap and water after you ride, don't let it sit dirty. I always roll my bike in the backyard and hit it good with the pressure washer, wipe down the plastics with a rag, and then wipe the wheels off, pipes, and anything shiny. It usually takes about 30 minutes to an hour.
Something else to do which helps keep your plastics from collecting so much dirt, more or less mud, is to wipe them down with armor all after you clean them. The dirt that does get on them doesn't stick as bad and cleans up much easier. If you have a lighter color of plastic (like white), simple green works great to take out any dirt stains.