Hanley Ramirez drove in a pair of runs without a hit to back Anibal Sanchez's first win in four starts, and the Miami Marlins rebounded from a rough stretch for a 3-2 victory over the San Francisco Giants on Thursday and a three-game sweep.