Usage of Plot2svg

> plot2svg % opens a file dialog to plot the active figure


> plot2svg('myfile.svg',figure handle, pixelfiletype)
pixelfiletype = 'png' (default), 'jpg'

IMPORTANT: Firefox 1.5 may hang if too many linear shaded patches are used in the figure.

Supported Features

  • line, patch, contour, contourf, quiver, surf, …
  • markers
  • image (saved as linked png pictures)
  • grouping of elements
  • alpha values for patches
  • subplot
  • colorbar
  • legend
  • zoom
  • reverse axes
  • controls are saved as png pictures
  • log axis scaling
  • axis scaling factors (10^x)
  • labels that contain Latex commands are interpreted (with some limitations):
    alpha, Alpha, beta, Beta, … infity, pm, approx
    {it…..} for italic text
    {bf…..} for bold text
    ^{…} for superscript
    _{…} for subscript

How to use SVG files in HTML code

To include your SVG plot into a HTML file you can use an object of type ‘image/svg+xml’. Following code fragment is an example.

<object type="image/svg+xml"data="./mySVGfile.svg" width="140px"height="100px" />

The SVG figure may use some external PNG or JPEG files. These files should always be kept together with the SVG file in the same directory.