More fine-grained control over display of Polar objects is possible. In particular, sometimes one wants both a verbose multi-line printing format, used for displaying a single object in the REPL and other interactive environments, and also a more compact single-line format used for print() or for displaying the object as part of another object (e.g. in an array). Although by default the show(io, z) function is called in both cases, you can define a different multi-line format for displaying an object by overloading a three-argument form of show that takes the text/plain MIME type as its second argument (see Multimedia I/O), for example:
More control over display of Polar objects is possible.
For displaying a single object with multi-line printing format and for displaying the object as part of another object (e.g. in an array) with compact single-line format, define a different multi-line format by overloading show() that takes type text/plain MIME as the second argument, e.g.