I'm about to get emotional so bear with me.
Code is an art, but not a presentation art. It's a personal art, and in some ways a performance art. I code to satisfy myself, it keeps me sane. I don't code for anyone else, I create software for everyone else. The structure, flexibility, power, scalibility, and speed all come out to decide it's beauty. We cannot compare paint or pixels with ones and zeros because they are different fruit.
Art has a defined process. Definition, Creation, Review, Feedback. For most performance and presentation arts, an audience takes the role of Review and Feedback, but when looking at code as a personal art, the coder takes the role of all four, definition, creation, review, feedback. Looking at it as a performance art, it performs in a structured, but unpredictable manner. I dont mean unpredictable as in buggy unpredictable. Take for instance the World Trade Centers. I considered them beautiful before they were gone. To me that means that they were a work of art despite the fact that they are just as logical and unpredictable as coding.
In unpredictable I mean that you can't classify a piece of software and know what it will be like. It has distinct features, distinct behaviour, and a distinct look. It can be abstracted, but no more than any other art.
Art to me is admiration. A piece of art is something that is beautiful. I see code as beautiful because of it's precise stream. You know the resulting software will do exactly what's in the code, but that doesn't mean that by reading the code you will know what the software will do.
Code can do anything. It's not limited to showing pixels, or for showing emotion either. On the opposite end of the spectrum it's not limited to show only logic either.
Code can create chaos. If something could only be logicial, it could not create chaos. Code can attack other code, which can cause other code to fail, which takes away power from half of New York state.
Bottom line: Art is what is beautiful.