Plotting a filled contour and saving as eps or svg

Oh yes I saw after when I had a look at GMT. That’s more like it :slight_smile:

FYI: you are not completely correct here. PostScript 3 and PDF share the same rendering model, so transparency and font features (like multi color - think emoji) and extended Device Color Models (Color Spaces like Lab).

PostScript was designed as page description language, because at that time sending the content - describing what is on the page - was lower effort then sending a pre-rendered bitmap and enabled btw compositing of different sources (PS has image and bitmap content also) in the same rendering process. PDF is a document format containing not only the to be rendered content, but als document navigation and all sorts of metadata.

EPS is assumed to be included in other PS documents easily, but might not be in practice. Including PDF into PDF is no easy matter (think encryption) but SW exists.

1 Like

I am not sure about this, AFAIK one problem with PostScript is that you cannot render a page separately, but have to “execute” the code for the preceding pages. Cf PDF, in which pages are independent.

I’ve stopped working actively on format conversion 13 years ago, but afair the DSC - document structure conventions were created to have Postscript documents/files that enable independent rendering and processing per page. As PS is mostly a general programming language (stack based, think forth + graphical elements) one can of course create documents which work against the DSC and some printer drivers were notorious for putting DSC comments into the file but at the same time had active code within pages that created interdependencies. I remember one session where i manually edited a .ps for a friend (~15 pages) to enable printing at all (punchline here is: The paper included some figures by GMT).

PostScript doesn’t support transparency but has extensions that allow transparency when the ps file is converted to PDF. The use of it has changed very recently when, for security reasons, ghostscript 9.25 dropped the -dSAFE keyword that was used by GMT and other software for transparency in PDF.

Another useful ps extension is the one that allow embedding geographical info and produce the so called geoPDFs that show coordinates on mouse movements when displayed on AcrobatReader. GMT produces such geopdfs.

This reverberates with my experience in tex/latex/pdftex usenet groups some years ago …

PS(3) doesn’t support transparency is correct, but i wrote above, that PS3 and PDF share the same rendering model, which - if you take chapter 4.8.5 overprint control of the PLRM3 into account plus K of the PDF-32000-ISO spec, this means you have the tools to do transparency in both rendering models, you just(!) need to define the correct color in the correct colorspace (see figure 4.5 and 4.6 in PLRM3). This is of-course device dependent, but all rendering is (if you need stories about proper colorspace to paper color calibration, i have them available …).

Btw even in PDF setting a transparent colorant is not straight forward.

While PS3 improved a lot of things, I think that the bottom line is that for practical purposes most end users not in electronic/desktop publishing should just use PDF and forget about PS unless they have a compelling reason to do otherwise.