To achieve 1/4 duty cycle, you will need to have a small data buffer, so that each row/col that you light will remain lit until you switch it off again. You will also need the uln chip so that when 4 LEDs in the same row are lit at the same instant, the 595 pins are not overloaded and damaged.
I don't have any example code but I will try to help you with that later.