I am using the following (graphical) element in a document to introduce the concept of a linear revision control history:

Image showing three listings with depict commit history

Once printed, it is, by definition, a listing ("a printed list of lines of computer code") . Actually, three listings. But clearly it has visual elements beyond a typical listing. In fact, the source code doesn't even serve the purpose of the graphic.

So: is it a listing or a figure? Should the caption say "Listing x.y" or "Figure x.y"?


It' s a figure. Without the graphical elements, it is not comprehensible any more. A listing could be formated in other ways without changing the meaning, but changing the graphical elements would change the meaning.

| improve this answer | |
  • 5
    Also, while it contains code, the intention is not to convey the algorithm the code expresses, but to explain how the code is manipulated. The code is merely an example. An illustration for a graph manipulation algorithm might show a before and after picture of a graph, but that would not make the image a graph, just an illustration. – Peter Aug 10 '16 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.