Hanging Gardens definitely favours early Legalism, I think, since going straight for maths means it's going to be a loooooong time before you get to Philosophy, and you're likely to really want Monarchy very soon as well. And the 15% growth from Tradition finisher is going to be great in your HG city. Probably Tradition->Legalism->Aristocracy->Monarchy as the order. HG is a really good wonder, but it's a big sacrifice because it's a lot of beakers down a pretty terrible opening tech path, so if you race for it your empire is going to suffer along the way and if you miss it, it's pretty much game over. Great if you've got a really nice production city or a Tradition capital, otherwise probably not worth it, I think.