We enjoyed Cadaques, could have stayed there forever. Medes Islands are also nice, stayed at the mooring buoys for a while, but it was quite windy and thus couldn't land at the island.
The Spanish Med mainland coast is more a coast of transit rather than a good cruising ground, though it has some good wintering sites. Having said that, Costa Brava at least has more anchorages than other parts of the coast. By all means drop in the less touristy spots to use the tapas bars and seafood restaurants though!
Sadly the locals have taken over so many of the anchorages with buoys for their own boats. Port Ligat where we used to anchor and obtain water from Dali's tap (with his permission) is the worst example. It is also difficult to find a shallow enough anchorage off Cadaques for the same reason.
San Felieu de Guixols, where we used to tie up alongside the outer mole and more recently anchored in the middle, now has a monopoly operated by the Club Nautico who will charge you a small fortune for minimal facilities.
Apart from the Baleares the Costa Brava has the most expensive marinas in Spain.