Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width60%
Panel

Image RemovedImage Added  output ( macro/python )

Since traditionally meteorological maps were aimed for print-outs, PostScript is historically the default output of Magics.

No third-party library is required to generate PostScript files and the driver is always available to users.

 PostScript was developed by Adobe and is still the main format for printers under UNIX.

This output driver provides output in PostScript, PDF and Encapsulated PostScript (EPS) formats. These are all vector formats which are used for printing and publishing. PostScript and PDF can contain multiple pages, while Encapsulated PostScript only contains one page at a time.


The Cairo driver offers PNG as a raster output. This output is intended for use on web pages. PNG output has two extra feature compared to the other outputs: possible transparent background and the return of meta information about the plot inside the PNG. Both features are intended for when PNGs are used for web pages. The transparent overlay allows overlays of multiple images. The meta information generated by Magics++ allows JavaScript developer navigate the PNG and implement interactions on top of the PNGs content.

This driver uses the Cairo graphics library to generate various output formats. The library is quite new and might not be installed on older or non-mainstream systems. However the situation is improving with Firefox and Inkscape requiring Cairo being installed. Cairo works internally with vectors and produces high quality output.

For more information on Cairo, see the documentation at Cairo home pageIn past versions of Magics, the PostScript driver had a special property by having a plot always scaled to 95% of its size to allow for the frame to be better visible. This is now changed to 100 %(full page size), but can for backwards compability be overriden by setting 'output_ps_scale'  to 0.95.

Column
width30%
Panel
titleQuick links

Postscript examples

Png PS output

KML output

SVG output

HTML
<div id="magics">	
</div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://software.ecmwf.int/wiki/download/attachments/13207038/magdoc.js"></script>
<link rel="stylesheet" type="text/css" href="http://software.ecmwf.int/wiki/download/attachments/13207038/magics.css" />
<link rel="stylesheet" type="text/css" href="http://software.ecmwf.int/wiki/download/attachments/13207038/jquery.miniColors.css" />
<script src="http://software.ecmwf.int/wiki/download/attachments/13207038/jquery.miniColors.js"></script>
<script>
	load("http://software.ecmwf.int/wiki/download/attachments/14157174/cairo.json");
</script>