The basic structure is "We can (action1) (comparison) than (action2)", so:

> We can represent the structure of sentences in more detail than is done in a diagram like 2

Is broken down as

* "represent the structure of sentences" - action1
* "in more detail" - comparison
* "[creating] a diagram like 2" - action2

The clause "in more detail", as a whole, qualifies the action "represent the structure of sentences".

Grammatically, the comparison could be replaced, like "using fewer colours", or even just "better".