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.

In 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.

This output driver produces vector graphics in the SVG format as defined by the W3C. The SVG output can be viewed by many web browsers directly (Firefox, Opera, Safari) or can be viewed within Internet Explorer, with the help of a plug-in, such as the Renesis Player, or a JavaScript library, such as SVGWeb. SVG is also used by many graphics programs as input format (Inkscape or Adobe Illustrator). SVG is not only a static format, but also allows for interactivity. This is used by Magics to optionally implement features such as the toggling of layers.

By default the generated maps are scalable. This means that the image is rendered according to the viewers size. If the user changes the size of the browser window also the image is rescaled to fit in. In many viewers, such as Firefox, the key combination 'Crtl +', 'Crtl -' and 'Crtl 0' allows to zoom in/out of a SVG graphics.

Since SVG is based on XML it is, to a degree, human readable and can also be parsed by search engines. As with all XML derived formats, SVG allows the processing through various XML technologies, such as XSLT or the manipulation through JavaScript (AJAX).

On the web server side there is a Batik, a Java-based toolkit for applications or applets that want to use images in the SVG format for various purposes, such as display, generation or manipulation.

For more information on SVG, please have the look at following resources:

Column
width30%
Panel
titleQuick links

Postscript SVG examples

Png Postscript output

KML PNG output

SVG KML 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/14157178/svg.json");
</script>