...
Info |
---|
Please be aware that not all output drivers might be installed on your system. Some output drivers dependent on third-party libraries. If these are missing at compilation time Magics++ can can not support all formats. Please consult the installation guide for more information. |
...
...
A special output driver is generating Qt which is only intended for screen display. This driver is used by Metview and is not documented further here.
...
Table 3.1. Output Formats
Value | Graphics File Format | Pages | Driver |
---|
PS | vector | produces a single file* | PostScript |
EPS | vector | produces multiple files | PostScript |
PDF | vector | produces a single file | Cairo |
PNG | raster | produces multiple files | Cairo |
GIF | raster | produces multiple files | GD |
GIF_ANIMATION | raster | produces a single file | GD |
JPEG | raster | produces multiple files** | GD |
SVG | vector | produces multiple files | SVG |
KML | vector | produces single KMZ file | KML |
*It is also possible to produce multiple single-page PostScript files, see “Page Splitting” below.
...
Table 3.2. Selecting Multiple Output Formats
CHARACTER*10 FORMATS
DIMENSION FORMATS(2)
DATA FORMATS /'PS', 'PNG'/
CALL POPEN
CALL PSET1C ('OUTPUT_FORMATS ', FORMATS, 2) |
const char *formats [NumFormats] = {"PS", "PNG"};
mag_open ();
mag_set1c ("OUTPUT_FORMATS ", formats, 2); |
For a single-page plot, the above code will produce two files: multiformat.ps
and multiformat.1.png
. The following section explains the file-naming rules in more detail.
Filenames
For a single-file plot, as produced by PS
, PDF
and GIF_ANIMATION
, the default output filename will be magics.<ext>
where <ext> is replaced by the extension appropriate to the output format. For the default format (PostScript) this would produce the file magics.ps
, for animated PNG it would be magics.png
and so on. The following code shows how to change the filename:
CALL PSETC ('OUTPUT_NAME
', 'plot')
...
Table 3.3. Filename Examples
CALL PSETC ('OUTPUT_FORMAT ', 'PNG') |
CALL PSETC ('OUTPUT_NAME ', |
the resultant files will be: plot.1.png
plot.2.png
plot.3.png
Note that even if the plot has only one page and therefore produces just one file, the name of that file still obeys the rules in the table above. |
First page numbering OFF |
CALL PSETC ('OUTPUT_FORMAT ', |
CALL PSETC ('OUTPUT_NAME ', |
CALL PSETC ('OUTPUT_NAME_FIRST_PAGE_NUMBER ', 'OFF') |
the resultant files will be: plot.png
plot.2.png
plot.3.png
|
The formatting of the numbers can be modified through the parameter OUTPUT_FILE_MINIMAL_WIDTH
. For instance, setting this to 2
would produce a filename such as plot.02.png
instead of plot.2.png
.
...
Filenames - Legacy and Fine Control
The above file-naming control should be enough for most purposes and is recommended for the most consistent naming of output files.
However, an extra degree of control is available by not using OUTPUT_NAME
, but instead:
OUTPUT_FULLNAME
: does not add an extension to the supplied filename, instead it needs to be supplied with the file name
OUTPUT_LEGACY_NAME
: behaves similar to MAGICS 6 filenaming
...