Convert Graph to Graphics
Well, just after I had posted the question, I found a very simple way to do it:
In[1]:= Show[CompleteGraph[8]] // Head
Out[1]= Graphics
Contextual menu bindings are defined in the file here:
FileNameJoin[{$InstallationDirectory,
"SystemFiles", "FrontEnd", "TextResources", "ContextMenus.tr"}]
Examining the contents of that file, you can discover that the "Convert to Graphics" contextual menu item maps to the Mathematica command GraphComputation`GraphConvertToGraphics
. Thus, for example,
GraphComputation`GraphConvertToGraphics[
Graph[{1 -> 2, 2 -> 3, 3 -> 1}]] // Head
(* Out: Graphics *)
I actually prefer your Show
technique, which is more natural and more likely to remain stable between versions, but it is nice to know how to find what commands these contextual menu items map to.