Recently I've read quite a few books that had a fantastic plot with tons of exciting twists but lackluster writing, as well as books with gorgeous prose but a plot that never went anywhere or did anything. Ideally, a book would contain both a great plot and beautiful writing, but in cases where it's one or the other, I've been wondering which is better.
For example, The Night Circus had a rather meandering plot but the writing was just so incredible that I thoroughly enjoyed the book nonetheless. Similarly, Deadly Cool had a bit of an unoriginal plot that I would normally dislike, but the voice was so well-written, authentic, and funny that I had a great time reading it.
However, a book can have the most intriguing plot in the world but I will only have a cursory interest in it if the writing lacks polish or skill. What do you think? Which is more important: plot or writing?